Orientation
Anatomy of an agent
Model, loop, tools, memory, orchestration
Every agent, from a customer-support bot to Claude Code, is built from the same five parts. Learn them once here and you get a mental scaffold you will reuse in every lesson that follows: a place to hang tokens, tool calls, retrieval, and multi-agent handoffs as we meet them.
Start from one unit: the augmented LLM
Before "agent," there is a smaller, more fundamental thing. Anthropic calls it the [1], a base model wired up with three capabilities it can drive itself:
Tap a node to see what it does.
The atomic building block
An agent is what you get when you put an augmented LLM in a loop and hand it a goal. Below are the five parts, color-coded the way this entire course will color them.
The five parts, one diagram
1 - Model: the reasoning core
The LLM is the "brain" - it plans a sequence of actions and decides whether the task is done.[2] Its per-step accuracy compounds, so it sets the ceiling on how long a loop can safely run.
2 - Loop: the verb
Reason, act, observe, repeated. The model gains ground truth from the environment at every step and stops on a goal or a bound.[1] This is the part that makes it an agent and not a single call.
3 - Tools: the hands
Three functional kinds: data tools (search, DB reads), action tools (send email, write to a DB), and orchestration tools (other agents).[3] Read-only is safe; writes need guardrails.
4 - Memory: the knowledge
Short-term lives in the finite ; long-term lives in an external store queried by nearest-neighbor search over embeddings.[4]
5 - Orchestration: the team
When one agent is not enough: a manager coordinates specialists via tool calls, or peers hand off execution to each other.[3] Start single-agent; add agents only when you must.
Instructions and a goal glue these together - a system prompt, guardrails, and a stopping condition. We treat those as the agent's configuration rather than a sixth organ; they get their own lesson in Prompting for agents.
The loop, close up
The word "agent" is really a verb. A single model call that emits one tool call and stops is tool use, not an agent. An agent keeps going - it reads the tool result, reasons again from that feedback, and repeats until the goal is met.[5]
Why the loop is the whole game
Worked example: annotate a coding agent
Take a coding agent solving a GitHub issue, the archetype Karpathy called "a little ghost that lives on your computer."[6] Here is the same five-part anatomy, mapped onto something concrete:
| Part | In a coding agent |
|---|---|
| model | The LLM that reads the issue, plans the patch, chooses the next command, and judges when the task is done.[2] |
| loop | edit, run tests, read the failures, edit again. The test output is the ground truth that closes each turn.[1] |
| tools | read_file, grep (data); apply_patch, run shell / tests, git (action) - OpenAI's data-versus-action split, live.[3] |
| memory | Short-term: the transcript and open files in context. Long-term: the repo itself, retrieval over the codebase, and a persisted notes file (for example CLAUDE.md). |
| orchestration | On a big refactor: a lead agent spawns sub-agents per module, or hands off to a dedicated reviewer agent.[3] |
The interface is a first-class surface
Your map of the rest of the course
This anatomy is a table of contents in disguise. Every remaining module deepens one organ - bookmark this and you always know where a new idea plugs in.
| Part | What it does | Where you master it |
|---|---|---|
| model | Picks the next action; judges done. | 03 LLMs, 04 Reasoning, 05 Prompting |
| loop | Reason, act, observe until a stop. | 06 Loop and ReAct, 09 Planning, 10 Reflection |
| tools | Data, action, and orchestration calls. | 07 Tool use, 08 Structured outputs, 17 MCP |
| memory | Context window plus external store. | 11 Context, 12 Embeddings, 13 RAG, 14 Memory |
| orchestration | Many agents: manager or handoffs. | 15 Patterns, 16 Handoffs, 19 A2A |
Check yourself
Match each part of the agent to the job it does.
decides the next action from context
repeats reason-act-observe until done
execute actions outside the model
curates what the context contains
governs budgets, stops, and routing
You attach tools and a memory store to an LLM. Which part actually makes it an agent rather than a fancy one-shot call?
What is the augmented LLM, and why build it first?
What is everything larger just made of? Try to state it, then check.
Name the five parts of an agent's anatomy and which three form the augmented LLM.
Which three are the inner unit? Try to state it, then check.
Lock it in
- The augmented LLM is the atom: model plus tools plus retrieval plus memory. Build this unit well before wrapping anything around it.
- Five parts: model (reasoning), loop (the verb), tools (hands), memory (knowledge), orchestration (team).
- The loop is the discriminator: feeding each observation back is what turns an LLM using tools into an agent, and demands a stopping condition.
- Ground truth closes the loop: verifiable environments (tests, tickets) are why coding and support are the flagship agent domains.
- This anatomy is your map: every later module deepens exactly one of these five parts.
Primary source
Anthropic, Building Effective AgentsThe piece that named the augmented LLM and drew the composition map this whole lesson is built on. Read it after this.
Sources