What is an AI agent?
A model plus a loop plus tools: the act–think–observe cycle that turns a chatbot into a worker.
By the end of this page — you can tell a chatbot from an agent, name the three steps of the agent loop, and explain why the loop is both the superpower and the risk.
An LLM by itself is a one-shot machine: you send text, it sends text back. Ask it “what’s on my disk?” and it can only guess — it has no disk, no eyes, no hands.
An agent is the same model wired into a loop with tools:
┌──────────────────────────────┐
│ ▼
┌─────────┐ tool call ┌─────────────┐ result ┌───────────┐
│ THINK │ ─────────────▶ │ ACT (tool) │ ──────────▶ │ OBSERVE │
│ plan, │ │ read file, │ │ read the │
│ decide │ │ run command │ │ outcome │
└─────────┘ └─────────────┘ └─────┬─────┘
▲ │
└────────────────────────────────────────────────────────┘
| Step | The model does | Example |
|---|---|---|
| 1. Think | Reasons about the goal, picks the next move | “I don’t know the file list — let me check” |
| 2. Act | Emits a structured tool call (JSON) | list_files("src/") |
| 3. Observe | Reads the tool’s result, added to its context | "main.py, utils.py, test_main.py" |
| 4. Decide | Loop again, or stop and answer | “Found it — now let me read main.py” |
Why the loop is the superpower
- Multi-step jobs. “Summarize this repo” needs: list files → read the big ones → draft → polish. No single chat turn can do that; a loop can.
- Self-correction. The tool returns an error? The model sees the error, reads it, and retries differently. A one-shot chat would have just hallucinated an answer.
- Growing context. Each observation adds real, verified facts to the conversation — the agent learns from its own actions (within the context window).
Why the loop is also the risk
Errors compound — Every step is a small probability of a mistake. Ten steps at 95% accuracy end up at **~60%** — the whole job succeeds only if *every* step succeeds. Longer loops = more power **and** more places to go wrong.
The kitchen analogy — The model is the chef's brain. The tools are knives, stove and oven. The loop is the taste-and-adjust cycle. And the **harness** is the kitchen itself — where all of it is allowed to happen.
Next stop: what that kitchen — the harness — actually does for you.