Part 18 / Topic 4 of 6
When not to build an agent
The agent loop is the last resort, not the first:
| Task shape | Right tool |
|---|---|
| Classify, extract, summarise | One call (+ structured output) |
| Known steps, fixed order | A workflow: your code calls the model N times |
| Unknown steps, needs exploration | An agent |
Agents add cost (every loop iteration is a full call over growing history), latency, and failure modes (loops, wrong tools, partial completion). The honest default: start with one call; add a workflow when steps are known; reach for an agent only when the model must decide what to do next.
🧪 Quick quiz
- When is a plain single LLM call better than an agent?
Show the answer
When the task is well defined — classify, extract, fixed transformations — and needs no open-ended exploration. Agents add cost, latency and failure modes; use the simplest design that works.
Done here? The practice set for Part 18 — 4 exercises with solutions — is on the part page.