Topic 7
Do you need an agent? And wrap-up
Before building an agent, ask whether you need one. Anthropic's "Building effective agents" (2024) recommends finding the simplest solution possible and only increasing complexity when needed, and notes that agentic systems often trade latency and cost for better task performance. For many applications, a single well-prompted call with retrieval is enough.
Predict first
Scroll sideways to see the whole diagram
This lesson: what an agent is, and the loop at its centre.
Text version
- This lesson: what an agent is, and the loop at its centre.
- Then the first design decision: does code or the model choose the next step?
- Then what the loop carries from step to step, and what it forgets.
- Then failure: tools time out and error, and some actions must never run twice.
- Then seeing what happened: traces, and measuring agents.
- Finally, how far to let it go on its own.
Wrap-up. From this lesson, you can now:
- define an agent by its environment and its actions, and recognise RAG systems as simple agents;
- sort tools into knowledge augmentation, capability extension and write actions, and say why writes need the most care;
- describe the agent loop: think, act, observe, repeat, until the model answers or the harness stops it;
- read a trace and count model calls, tool calls and write actions;
- separate what the model decides from what the harness enforces;
- explain compound errors, and the three levers against them.
Quick check