Module 3: From Chatbots to Coding Agents
What an Agent Is: Technical Definition
Description
"Agent" is one of the most used and least defined terms in AI. Everything is "agentic" now: frameworks, products, features, workflows. This capsule cuts through the marketing and establishes a precise technical definition of what makes a piece of software an agent — and specifically a coding agent.
You don't need a 3-page academic definition. You need a definition that lets you:
- Know whether what you're using is an agent or not
- Understand what capabilities it has and which it doesn't
- Build one yourself in Module 07
The Definition in Four Components
A coding agent has four essential components. If one is missing, it's not an agent — it's something else.
┌──────────────────────────────────────────────┐
│ CODING AGENT │
│ │
│ ┌─────────┐ ┌─────────┐ │
│ │ LLM │ ←→ │ TOOLS │ │
│ │ (brain) │ │(hands) │ │
│ └────┬────┘ └────┬────┘ │
│ │ │ │
│ └──────┬───────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ AGENTIC LOOP│ │
│ │ (process) │ │
│ └──────┬──────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ AUTONOMY │ │
│ │ (decision) │ │
│ └─────────────┘ │
│ │
└──────────────────────────────────────────────┘
Component 1: LLM (the brain)
The Large Language Model is the reasoning engine. It's what Module 02 explained:
WHAT IT PROVIDES:
→ Natural language comprehension (it understands your prompt)
→ Code comprehension (it understands multiple languages)
→ Reasoning (it can plan and decide)
→ Generation (it can create code, text, commands)
WHAT IT DOESN'T PROVIDE:
→ It can't run code by itself
→ It can't read files by itself
→ It has no access to the outside world
→ It has no persistent memory between sessions
ANALOGY:
The LLM is a brain in a jar.
It can think, but it can't act.
Component 2: Tools (the hands)
Tools are functions the agent can invoke to interact with the outside world. Without tools, the LLM only generates text. With tools, it can act.
TYPICAL TOOLS OF A CODING AGENT:
📄 File Read → Read files from the project
✏️ File Write → Create or modify files
💻 Shell Execute → Run commands in the terminal
🔍 Search → Search in the codebase
🌐 Web Search → Search for information on the internet
🔄 Git → Version control operations
HOW IT WORKS:
1. The LLM decides it needs to read a file
2. It generates a "call" to the file_read tool
3. The system runs the function and returns the content
4. The LLM receives the result and keeps reasoning
The LLM does NOT execute the tool directly.
The LLM REQUESTS that it be executed. The system executes it.
Component 3: Agentic Loop (the process)
The agentic loop is the iterative cycle the agent runs until it completes the task (or decides it can't):
┌──────────────────────────────────┐
│ │
▼ │
┌──────────┐ │
│ OBSERVE │ ← Receives information │
│ │ (prompt, result of a │
│ │ tool, error, etc.) │
└────┬─────┘ │
│ │
▼ │
┌──────────┐ │
│ THINK │ ← Reasons about what to do │
│ │ (plans, decides, │
│ │ evaluates options) │
└────┬─────┘ │
│ │
▼ │
┌──────────┐ │
│ ACT │ ← Executes an action │
│ │ (tool call, generate │
│ │ code, respond) │
└────┬─────┘ │
│ │
└───────────────────────────────────┘
UNTIL: task completed, unrecoverable error,
or iteration limit reached
Component 4: Autonomy (the decision)
Autonomy is the agent's ability to decide what to do without the developer telling it every step.
WITHOUT AUTONOMY (chatbot):
Developer: "Read the file auth.ts"
Bot: [reads the file]
Developer: "Now find the login function"
Bot: [finds the function]
Developer: "Now modify the validation"
Bot: [modifies]
→ The developer directs each step
→ Without instruction, the bot does nothing
WITH AUTONOMY (agent):
Developer: "Fix the authentication bug that
makes emails with '+' fail"
Agent: [thinks] "I need to find the auth code"
[tool: search] → finds src/auth/validate.ts
[tool: read] → reads the file
[thinks] "The regex on line 45 doesn't accept '+'"
[tool: write] → modifies the regex
[thinks] "I should verify it works"
[tool: shell] → runs the tests
[thinks] "Tests pass. Task completed."
→ Reports to the developer
→ The agent decides HOW to solve it
→ The developer defines WHAT to solve
The Spectrum: Chatbot → Assistant → Agent
These three aren't discrete categories — they're a spectrum. But understanding the extremes helps you calibrate what you're using.
Chatbot
EXAMPLE: ChatGPT (conversation mode)
CHARACTERISTICS:
→ Input: user text
→ Output: response text
→ It doesn't see your project
→ It doesn't run code
→ It has no tools (or very limited ones)
→ Stateless: each conversation starts from zero*
→ Reactive: it only responds, it doesn't act
USE FOR CODE:
→ "How do I do X in Python?"
→ The developer copies the answer manually
→ There's no integration with the codebase
*ChatGPT has memory between sessions, but it has no
access to your codebase and doesn't run actions on it.
Assistant
EXAMPLE: GitHub Copilot (classic autocomplete)
CHARACTERISTICS:
→ Input: current file's code + prompt
→ Output: inline code suggestions
→ It sees the current file (and sometimes open files)
→ It doesn't run code
→ Limited tools or none
→ Context: the current file, not the whole project
→ Reactive: it suggests as you type, it doesn't act proactively
USE FOR CODE:
→ Smart autocomplete
→ Suggestions based on the current file
→ Tab-accept or reject
→ The developer writes, the assistant suggests
Agent
EXAMPLE: Claude Code, Cursor Agent, Copilot Agent
CHARACTERISTICS:
→ Input: the developer's instruction + access to the whole codebase
→ Output: actions (read, write, execute, search)
→ It sees the whole project (it can navigate files)
→ It runs commands (shell, tests, builds)
→ Complete tools (file R/W, shell, search, git)
→ Context: the whole project (via tools)
→ Proactive: it decides what to do, it doesn't just suggest
USE FOR CODE:
→ "Implement rate limiting following the existing pattern"
→ The agent explores, plans, implements, verifies
→ Multi-step: 5-50 autonomous steps
→ The developer directs, doesn't dictate
Comparison table
┌────────────────┬──────────┬──────────────┬──────────────┐
│ │ CHATBOT │ ASSISTANT │ AGENT │
├────────────────┼──────────┼──────────────┼──────────────┤
│ Context │ Just the │ Current │ Whole │
│ │ prompt │ file │ project │
├────────────────┼──────────┼──────────────┼──────────────┤
│ Tools │ None/ │ Limited │ Complete │
│ │ minimal │ │ │
├────────────────┼──────────┼──────────────┼──────────────┤
│ Code │ No │ No │ Yes │
│ execution │ │ │ (shell) │
├────────────────┼──────────┼──────────────┼──────────────┤
│ Agentic Loop │ No │ No │ Yes │
│ │ │ │ │
├────────────────┼──────────┼──────────────┼──────────────┤
│ Autonomy │ None │ Minimal │ High │
│ │ │ (suggestions)│ │
├────────────────┼──────────┼──────────────┼──────────────┤
│ Who directs │ The │ Developer │ Developer │
│ │ developer│ writes + │ defines WHAT,│
│ │ each step│ asst.suggests│ agent the HOW│
├────────────────┼──────────┼──────────────┼──────────────┤
│ Output │ Text │ Inline │ Actions + │
│ │ │ suggestions │ modifications│
├────────────────┼──────────┼──────────────┼──────────────┤
│ Example │ ChatGPT │ Copilot │ Claude Code │
│ │ web │ autocomplete │ Cursor Agent │
└────────────────┴──────────┴──────────────┴──────────────┘
What Today's Coding Agents Have in Common
Claude Code, Cursor Agent, Copilot Agent, Windsurf Agent, Aider, and others differ in interface, model, and features. But they all share the same fundamental architecture:
ALL coding agents share:
1. AN LLM as the reasoning engine
→ Claude (Anthropic), GPT (OpenAI), Gemini (Google), etc.
2. TOOLS to interact with the codebase
→ File read/write, shell, search (at a minimum)
3. AN AGENTIC LOOP
→ Observe → Think → Act → Observe
→ They iterate until they complete or fail
4. AUTONOMY to decide which tools to use and when
→ The developer doesn't dictate each step
Where they differ
THEY DIFFER in:
→ Base model: Claude 4 vs GPT-4.5 vs Gemini 2.5
→ Interface: terminal (Claude Code) vs IDE (Cursor) vs web
→ Available tools: some have web search, others don't
→ Level of autonomy: how many steps before asking for confirmation
→ Context management: how they handle large projects
→ Configuration: CLAUDE.md vs .cursorrules vs settings
→ Price and business model
BUT:
→ The architecture is the same
→ The agentic loop is the same
→ The principles of use are the same
→ If you understand one, you understand them all
The practical implication
THIS MEANS THAT:
1. What you learn in this guide applies to ANY coding agent
→ We're not teaching "how to use Claude Code"
→ We're teaching "how coding agents work"
2. When a new agent comes out, you already understand it
→ It has LLM + tools + loop + autonomy
→ The interface may be different, the mechanics are the same
3. Your most valuable skill isn't mastering ONE tool
→ It's understanding the underlying PATTERN
→ That's transferable across tools
Agents Outside of Code
Coding agents are a specific type of AI agent. The concept of an "agent" exists in other domains:
CODING AGENTS:
→ LLM + code tools + agentic loop
→ Claude Code, Cursor, Copilot Agent
RESEARCH AGENTS:
→ LLM + search tools + agentic loop
→ Perplexity, Deep Research
TASK AGENTS:
→ LLM + productivity tools + agentic loop
→ Computer Use (Anthropic), AI Assistants
MULTI-AGENT SYSTEMS:
→ Multiple agents collaborating
→ One agent plans, another executes, another verifies
→ Devin (controversial), OpenHands, agent frameworks
In this guide we focus exclusively on coding agents — but the pattern is the same for all of them.
The Concept of "Agenticness"
Not everything is black or white. There are degrees of "agenticness" — how much of an agent something is:
LESS AGENTIC ─────────────────────────── MORE AGENTIC
Autocomplete Chat in IDE Agent Mode Multi-Agent
(Tab accept) (question- (autonomous, (multiple
answer multi-step) agents
in sidebar) coordinated)
Copilot Copilot Chat Claude Code Devin
inline Cursor Chat Cursor Agent (controversial)
Copilot Agent
LEVEL OF AUTONOMY:
None Low High Very high
(only suggests) (responds) (acts) (plans +
acts +
coordinates)
The practical zone today (2026)
Most developers in 2026 work in this zone:
Chat in IDE ◄────── PRACTICAL ZONE ──────► Agent Mode
→ They use chat for quick questions
→ They use agent mode for implementation tasks
→ They alternate between the two depending on the task
→ Multi-agent is experimental and not mainstream yet
Observation Exercise
Exercise 1: Identify the components
The next time you use a coding agent, observe the four components in action:
OBSERVE:
1. LLM: Which model is it using?
→ Can you see it in the configuration?
→ Do you notice a quality difference between models?
2. TOOLS: Which tools does it use?
→ Does it read files? Which ones?
→ Does it run commands? Which ones?
→ Does it search in the codebase?
→ Does it modify files?
3. AGENTIC LOOP: How many iterations does it do?
→ Can you see the observe → think → act cycle?
→ How many steps does it take before finishing?
→ What stop condition does it have?
4. AUTONOMY: What decisions does it make on its own?
→ Does it decide which files to read without you telling it?
→ Does it decide which command to run?
→ Does it ask for confirmation or act directly?
See guided reflection
An example of how you might document this observation using Cursor Agent:
LLM: Claude Sonnet (visible in the model configuration in the bottom-right corner of Cursor). You can notice quality differences if you switch between models — some reason better on multi-file tasks.
Observed tools: The agent typically uses search to find relevant files, file_read to read content, file_write to modify files, and shell_execute to run tests or commands. Notice that the agent decides which files to read without you asking it explicitly.
Agentic Loop: For a task like "fix this bug," the agent does between 5 and 10 iterations. The observe → think → act cycle is visible: first it searches, then it reads, then it reasons about what it found, then it modifies, then it verifies with tests.
Autonomy: The agent decides on its own which files to read, which command to run, and in what order to do it. Depending on the configuration, it may ask for confirmation for file writes or command execution.
The key: the 4 components are always present and active in every interaction with a coding agent.
Exercise 2: Classify your tools
For each AI tool you use, classify it:
TOOL: _______________
□ Chatbot □ Assistant □ Agent
Justification: _______________
TOOL: _______________
□ Chatbot □ Assistant □ Agent
Justification: _______________
TOOL: _______________
□ Chatbot □ Assistant □ Agent
Justification: _______________
Do you use all three categories?
Could you consolidate into fewer tools?
See solution
Examples of correct classification:
| Tool | Category | Justification |
|---|---|---|
| ChatGPT (web) | Chatbot | It has no code tools, doesn't see your project, only generates text as a response |
| GitHub Copilot (inline/Tab) | Assistant | It suggests code based on the current file, but doesn't execute or navigate the whole project |
| Cursor Agent Mode | Agent | It has LLM + tools (file R/W, shell, search) + agentic loop + autonomy to decide what to do |
| Claude Code (terminal) | Agent | Full access to the codebase via the terminal, runs commands, autonomous multi-step loop |
| Copilot Chat (IDE sidebar) | Between chatbot and assistant | It answers questions with some project context, but doesn't execute actions or iterate autonomously |
| Claude.ai / Gemini web | Chatbot | An isolated conversation with no access to your real codebase |
Quick criterion for classifying: Does it have tools + agentic loop + autonomy? → Agent. Does it only suggest code in limited context? → Assistant. Does it only generate text without seeing your project? → Chatbot.
Common Comprehension Mistakes
| Mistake | Reality |
|---|---|
| "An agent is a more powerful chatbot" | An agent is a different category: it has tools, a loop, and autonomy |
| "The agent understands my project" | The agent explores your project step by step via tools — it doesn't "understand" it beforehand |
| "More autonomy = better" | More autonomy without supervision = more risk. The correct level depends on the task |
| "All coding agents are the same" | They share the architecture but differ in model, tools, and UX |
| "The agent makes intelligent decisions" | The agent generates the most probable next response (next-token prediction) — which sometimes looks intelligent |
Summary
A CODING AGENT has 4 components:
1. LLM → The brain (reasoning and generation)
2. TOOLS → The hands (file R/W, shell, search)
3. LOOP → The process (observe → think → act → observe)
4. AUTONOMY → The decision (the agent decides how, you define what)
THE SPECTRUM:
Chatbot (text only) → Assistant (suggestions) → Agent (actions)
ALL CODING AGENTS share this architecture.
The differences are of implementation, not of design.
IF YOU UNDERSTAND THE PATTERN:
→ You understand any coding agent (present and future)
→ You can build one (Module 07)
→ You know what to expect and what not to
Next capsule: 03 - The agentic loop — observe → think → act → observe, the cycle that makes every agent work.
Resources
- Anthropic: Building Effective Agents — Anthropic's definition
- Lilian Weng: LLM Powered Autonomous Agents — A complete technical survey
- OpenAI: Function Calling — How tool calling works in practice
- Harrison Chase: What is an Agent? — The perspective of LangChain's creator
- Simon Willison: AI Agents — Practical and critical analysis