Theory
Not all AI coding tools are the same. There's a meaningful spectrum from a one-shot autocomplete to an autonomous agent that plans, executes, and iterates. Understanding where on that spectrum a tool sits helps you choose the right tool and set the right expectations.
The spectrum
Autocomplete Predicts the next line or block as you type. Fast, low-risk, no planning. Useful for boilerplate and patterns, not complex tasks.
Chat / copilot Single-turn or short-session assistant. You describe what you want; it responds with code or explanation. You integrate and iterate. Better for tasks you can describe in a paragraph.
Agent Multi-step autonomous execution. The agent receives a goal, decomposes it into actions, executes them (calling tools, reading files, running tests), observes results, and adjusts until the goal is met or it gives up. Useful for tasks that require reasoning across multiple steps and tools.
What defines an agent
An agent is an LLM augmented with four components:
- Tools: Functions the model can call: file reads, terminal commands, API calls, browser control
- Context: The accumulated state the model uses to reason: rules, code, results of previous tool calls
- Memory: Persistence of information across turns and tasks (more on this in the next topic)
- An agentic loop: The repeated cycle of reason → act → observe → adjust
The agentic loop
- Receive goal The user or an orchestrator gives the agent a task
- Reason The agent plans what to do first and selects a tool or action
- Act The agent calls the tool and waits for a result
- Observe The agent reads the result and updates its understanding
- Adjust It decides whether the goal is met; if not, it plans the next step
- Repeat until done, stuck, or the context budget is exhausted
Tool use and function calling
Tools are the mechanism through which agents affect the world. A tool is a function with a description and a schema; the LLM decides when to call it and with what arguments. Common tools in coding agents include:
- Read/write files
- Run terminal commands
- Search the codebase
- Browse the web
- Call APIs (via MCP (more on that in Day 4))
The quality of the tool's description matters as much as the tool itself. A well-described tool gets called correctly; a vague description produces errors and wasted cycles.
When NOT to use an agent
Agents add complexity and cost. Use them for tasks that are genuinely multi-step and require real execution. For simple lookups, single-file edits, or well-bounded generation, a chat interaction is faster, cheaper, and easier to verify.