Tools & agents: the loop around a frozen model
A single call can't search, compute, or act.
The idea inside
An agent is a loop: the model acts, a tool runs, the result re-enters.
After this lesson
You can explain that an agent is a loop around a frozen model, calling tools.
Where it leads
RAG and tools keep stuffing the context, so surely more context is always better?
Inside this lesson
That's the real lesson stage, paused. Claim your pass to operate it.
See how AI actually works, end to end.
This lesson is one stop on the full arc. Unlock all of it, and keep it for life.
What you get
- The 34-lesson main path, a finishable route from a word to agents
- Goal tracks for using AI at work and building AI features
- Boss labs that make you apply a whole act, not just recognize it
- Spaced recall that brings each idea back before you forget
- Course memory: every term defined, with links to where it first appears
- A shareable capability card when you finish the main path
- Lifetime access on every device, every future lesson included
Not videos to watch. You predict, operate the machine, then prove it. That is why it stays.
99 interactive lessons and challenges. No videos, no code.
Free launch pass: lifetime access, no card needed
New here? The first lessons are free to try. Start with lesson 0.1
What this lesson shows
An agent is a loop: the model acts, a tool runs, the result re-enters.
The question it opens with
A single call can't search, compute, or act.
The walkthrough, in the lesson's own words
- The model wrote a tool call it can't run. Tap a node to see what happens.
- Agents aren't a smarter model, they're a smart loop.
- The harness (the plain program wrapped around the model) reads that line, runs the real calculator, and pastes the result back to the model as text:
- The model never stops being a word-predictor; the harness does the doing.
- Back in 5.1 you saw the model is frozen: it can't run code or look anything up, and it can't reliably do exact arithmetic. So instead of guessing the answer, it has learned to write the request out as plain text. On its own that line does nothing, it's just words.
- The harness is the plain program running around the model. It watches the output for lines like calculator(46.50 × 0.18), runs the real calculator, and pastes the result back into the model's context as text. The model never stops being a word-predictor; the harness does the doing.
- One modernizing note: today the model emits a structured tool request it was specifically trained to produce (a labeled block naming the tool and its arguments), not loose prose the harness has to fish out. Same handshake, machine-readable on purpose.
- In practice there's a fourth beat, check: the harness or a human verifies each result before trusting it (lesson 6.5).
- An agent is a smarter, more capable model that can run code and browse on its own.
- It's the same frozen model, wrapped in a plain loop. The model only writes text; a harness runs the tools and feeds each result back, over and over, until the task is done.
- If a fixed pipeline decides the steps in advance (always transcribe, then summarize, then email), that's a workflow. It's an agent when the model itself decides what to do next based on what it just observed.
- A coding agent reads your files, runs the tests, sees they fail, and fixes the bug, all on its own. The model can't actually run anything. So how?
- It isn't a smarter model, it's a loop. The model writes tool calls as text; the harness runs them and pastes each result back in, so the model thinks, acts, observes, and repeats until the task is done.
- Think, Act, Observe loop. The model wrote a tool call at Act.
Key takeaway
Agents aren't a smarter model, they're a smart loop around the same model.
What you can do after this lesson
You can explain that an agent is a loop around a frozen model, calling tools.
Check yourself: What is an AI agent?
- A loop that calls the model, runs tools, feeds results back(correct)
- A smarter, larger model
- A model with internet built in
- A faster GPU cluster
An agent is a loop: the model proposes an action, a harness runs the tool, and the result goes back into context for the next step.
Prefer reading first? This lesson has a companion explainer: AI agents
Where it leads: RAG and tools keep stuffing the context, so surely more context is always better?
This is the written summary. The lesson itself is interactive: you predict, drag and operate the mechanism above, and the reveal answers you.