AI Coding Agents
An AI coding agent is software that pursues a coding goal on its own — it reasons about the task, reads and edits files across your repository, runs your build and tests, and reacts to the results, looping until the work is done. This guide explains what separates an AI agent from autocomplete and chat, how the plan → edit → run → verify loop and tool use actually work, and why grounding an agent in your real codebase is the difference between a convincing demo and a dependable teammate.
- What Is an AI Coding Agent?
- AI Agent vs. Autocomplete vs. Chat
- The Plan → Edit → Run → Verify Loop
- Tool Use: How an AI Agent Takes Action
- Grounding an AI Agent in Your Codebase
- Autonomy Levels: How Much to Let It Run
- Why a Grounded AI Agent Beats an Ungrounded One
- How SlicerCode Grounds Its AI Agent
- Getting Started with an AI Coding Agent
What Is an AI Coding Agent?
An AI coding agent is a program built around a large language model that turns a natural-language goal into a sequence of concrete actions in your development environment. Where a plain LLM only predicts text, an AI agent wraps that model in a loop: it decides what to do next, takes an action through a tool — read a file, edit code, run a command — observes the result, and decides again. The model supplies the reasoning; the surrounding harness supplies memory, tools, and control flow.
The distinction that matters is agency. A chatbot answers a question and stops. An AI agent keeps going until the goal is met or it gets genuinely stuck — writing to disk, invoking your compiler, reading stack traces, and correcting course. That autonomy is what lets it complete a multi-step request like *"add pagination to this endpoint and update the tests"* instead of merely describing how you would do it.
Modern agents are also multi-file and stateful. They hold a working model of the task, track which files they have touched, and revisit earlier decisions when a test fails. Crucially, the quality of an agent is determined far less by the raw model and far more by what the harness feeds it — the tools it can call and the context it can see, a discipline covered in context engineering.
AI Agent vs. Autocomplete vs. Chat
Three categories of AI coding tools get conflated, and the differences are real. Tab autocomplete (fill-in-the-middle) predicts the next few tokens at your cursor — fast, local, and scoped to the line or block you are typing. It has no goal beyond finishing your current thought and no ability to run anything.
Chat assistants go a step further: you ask a question in a side panel and get an answer, often with code you copy back into your editor. Chat can reason about a snippet you paste, but it is effectively stateless about your project and cannot act — it doesn't even know whether the code it suggested compiles.
An AI coding agent closes that gap. It has a goal, a set of tools, and a feedback loop. It reads the files it needs, proposes edits as diffs you can accept or reject, runs your build and tests, and uses the output to fix its own mistakes. SlicerCode ships all three modes — an agentic chat plus optional fast autocomplete — but the agent is the part that finishes work rather than just accelerating typing.
- Autocomplete saves keystrokes — it predicts the next tokens at your cursor.
- Chat saves lookup time — it answers questions but can't act on your repo.
- An agent completes tasks — it plans, edits across files, runs, and verifies.
The Plan → Edit → Run → Verify Loop
Every capable coding agent runs some version of the same cycle. Plan: decompose the goal into steps and gather the context needed to act — which files, which functions, which call sites. Edit: make the change, almost always as a diff so a human can review it. Run: execute the build, type-checker, or test suite. Verify: read the output, decide whether the goal is met, and if not, loop back armed with what it just learned.
The verify step is what makes an agent trustworthy. An agent that writes code and stops is guessing; an agent that runs your tests and reads the failures is anchored to reality. When a compile error or red test comes back, a good agent feeds that output straight into the next planning step and repairs the change instead of declaring premature victory.
This loop maps directly onto how a careful engineer actually works, which is why *run-and-verify* beats *generate-and-hope*. After it edits, SlicerCode's agent runs your build, type-check, and tests, reads the output, and fixes failures until the suite is green — then finishes with a short summary of what changed.
Tool Use: How an AI Agent Takes Action
Tools are the hands of an AI agent. The model can only emit text, so the harness exposes a set of functions — read a file, write a diff, run a shell command, search the codebase, fetch documentation — and the model "calls" them by emitting a structured request that the harness executes. The result is handed back to the model as its next observation, and the loop continues.
Good tool design is most of what separates a reliable agent from a flaky one. Tools should be narrow, clearly described, and return compact, informative output. An agent with a precise run_tests tool and a semantic_search tool outperforms one that can only blindly read whole files, because each well-shaped tool call teaches the model something specific about the task. The mechanics of tool-calling are covered further in LLMs for developers.
The most valuable tools are the ones that report ground truth about *your* specific project. Generic file I/O lets an agent read code; project-aware tools let it understand behavior. SlicerCode exposes analyzer-backed tools — get_architecture, get_project_structure, get_flow_context, and get_runtime_values alongside semantic_search — so the agent queries facts about your system instead of inferring them, as documented in the agent docs.
Grounding an AI Agent in Your Codebase
An LLM's training data is the public internet up to some cutoff — it has never seen your repository. Left ungrounded, it fills the gap by guessing: inventing method names, assuming a framework you don't use, or hallucinating a file path that doesn't exist. Grounding means feeding the agent facts about your actual code before it writes a single line.
The common approach is retrieval-augmented generation (RAG): embed your files and pull in the chunks most similar to the request. That helps, but similarity search retrieves *text*, not *behavior* — it can't tell the agent which implementation of an interface actually runs, or what shape an object has at runtime. Getting this layer right is the whole subject of context engineering.
Deeper grounding uses structure: a call graph showing who calls what, data- and object-flow tracing how a value moves through the system, and real runtime values captured while the code executes. An agent that consults those before editing writes code that fits how your project actually behaves — not how a generic project on the internet behaves. See code flow and graph analysis for how those graphs are built.
Autonomy Levels: How Much to Let It Run
Autonomy is a dial, not a switch. At the cautious end, the agent proposes every edit and command and waits for you to approve each one. At the aggressive end, it edits files and runs commands on its own, surfacing only the result. Where you set the dial depends on how much you trust the repository, the task, and the agent's track record.
A sensible middle ground auto-applies file edits — which are reversible and reviewable as diffs — but still asks before running terminal commands or fetching from the network, since those carry side effects. That keeps the loop fast without handing over irreversible actions blindly.
SlicerCode exposes exactly this as three per-session permission modes. Ask prompts before every edit and command; Auto-edits applies file edits but still asks for terminal and fetch; Bypass auto-approves everything for repositories you fully trust. You pick the mode from the chat input and change it whenever the task changes — the details are in the docs.
Why a Grounded AI Agent Beats an Ungrounded One
Two agents can use the same underlying model and produce wildly different results. The ungrounded one starts from a blank slate on every task: it reads a few files, pattern-matches against what it saw in training, and hopes. It is quick to demo and brittle in practice, because it doesn't know your conventions, your indirection, or your data.
A grounded agent starts from facts. Before editing an endpoint, it can see the full call graph beneath it, know which concrete class handles a polymorphic dispatch because runtime tracing recorded what actually ran, and assert against the real values your code produced rather than fabricated fixtures. That is the difference between code that merely *looks* plausible and code that *fits*.
The payoff compounds across the loop. Grounding improves the plan — it targets the right files — the edit — it uses real signatures — and the verify step — it knows what "correct" looks like from observed behavior. This is SlicerCode's core bet: the agent is grounded in the same analyzer that builds your flows, captures runtime values, and validates against a PRD.
How SlicerCode Grounds Its AI Agent
SlicerCode ships as a VS Code extension that is both an AI coding agent and a deep code analyzer, and the two are wired together. On workspace open it parses your project with tree-sitter across 6+ languages and builds a call graph for every endpoint and job, then derives data- and object-flow and detects external systems on the path — Kafka, databases, HTTP, and queues — rendering the whole thing as a graph you can open in an editor tab.
When you hand the agent a task, it consults that analysis through dedicated tools before it writes: architecture and project structure once per session, flow context for the code path it is touching, and captured runtime values for real data shapes. Runtime analysis attaches the VS Code debugger (DAP) to record actual arguments, object state, and best-effort returns — with secrets and PII redacted — so the agent asserts on truth instead of inventing fixtures.
After editing across files as accept/reject diffs, it runs your build and tests, reads the output, and repairs failures until green. It can validate a flow against a PRD across four dimensions — code, executed flow, changes still to make, and tests — and generate deterministic, self-repairing tests seeded from real captures. Everything is routed through task-aware model routing, so you never manage API keys.
Getting Started with an AI Coding Agent
Adopt an agent where its loop pays off: multi-step, verifiable changes. Tasks with a clear "done" signal — a passing test suite, a green build, a satisfied requirement — let the agent self-correct. Open-ended design work with no feedback signal is where you stay in the driver's seat and reach for chat instead.
Start cautious. Run new repositories in Ask mode, watch which files the agent reads and edits, and graduate to Auto-edits once you trust its judgment. Give it good context up front — point it at the relevant flow or requirement — and it will spend fewer turns rediscovering what you already know, a habit reinforced in context engineering.
SlicerCode runs in VS Code today, with IntelliJ and a CLI on the roadmap. You can install it, sign in to activate the agent, and open the analyzer to see the flows and runtime values it grounds against — then give it a real task and watch the plan → edit → run → verify loop close.
Frequently asked questions
What is an AI coding agent?
An AI coding agent is a large language model wrapped in a loop of tools, memory, and control flow. Instead of only answering questions, it plans a task, edits files across your codebase, runs your build and tests, and reacts to the results — repeating until the goal is met.
How is an AI coding agent different from autocomplete or Copilot-style suggestions?
Tab autocomplete predicts the next few tokens at your cursor and can't run anything. An AI agent has a goal, calls tools, edits multiple files as reviewable diffs, and runs your tests to verify and repair its own work — it completes tasks rather than just finishing lines.
What is the plan-edit-run-verify loop?
It's the core cycle of an AI coding agent: plan the change and gather context, edit the code (usually as a diff), run the build or tests, and verify the result — looping back to fix failures until the goal is satisfied. The verify step is what keeps the agent grounded in reality.
What does it mean for an AI agent to be grounded in your codebase?
Grounding means feeding the agent facts about your real code — a call graph, data- and object-flow, and captured runtime values — before it writes. A grounded agent uses your actual signatures and behavior instead of guessing or hallucinating APIs that don't exist in your project.
Are AI coding agents safe to let run autonomously?
Autonomy is adjustable. A safe default auto-applies reversible file edits (reviewable as diffs) but still asks before running terminal commands or network fetches. SlicerCode offers Ask, Auto-edits, and Bypass permission modes so you choose how much the agent can do per session.
Does SlicerCode's AI agent work in VS Code?
Yes. SlicerCode is a VS Code extension that combines an AI coding agent with a deep code analyzer; you install it, sign in to activate the agent, and start giving it tasks. IntelliJ and a CLI are on the roadmap.
Keep learning
See it in your codebase
SlicerCode brings the agent, flow graphs, runtime capture, PRD validation and test generation into VS Code.