Building Effective Agents
An Anthropic article from December 2024 that separates workflows (models run through fixed code paths) from agents (models directing their own steps) and describes the common patterns for each. It is for engineers designing any system with more than one model call. Its main lesson is to start with the simplest pattern that works and add autonomy only when the problem needs it.
19 December 2024
Anthropic · Sept 2026
6 plus agents
Anthropic · Sept 2026
Free
Anthropic · Sept 2026
Guide
AI & Machine Learning
Anthropic
About an hour
Advanced
Free
The central distinction
The article defines two kinds of agentic system:
- Workflows, where language models and tools are orchestrated through predefined code paths. They are predictable, cheaper and easier to debug.
- Agents, where the model decides its own process and tool use over many turns, using feedback from its environment. They suit open-ended problems where the number of steps cannot be known in advance.
Most problems are better served by a workflow, or even a single well-prompted call with retrieval. Agents trade latency and cost for flexibility, and that trade is only worth it for a narrower set of tasks than the hype suggests.
The patterns it names
The building block is the augmented LLM: a model with retrieval, tools and memory. On top of that:
- Prompt chaining: split a task into fixed steps, with programmatic checks between them. Good when accuracy matters more than speed.
- Routing: classify an input and send it to a specialised prompt or model.
- Parallelisation: either sectioning (independent subtasks run at once) or voting (the same task run several times for confidence).
- Orchestrator and workers: a central model breaks a task down dynamically and delegates the pieces.
- Evaluator and optimiser: one model generates, another critiques, in a loop, when clear criteria exist.
Having names for these makes design discussions much clearer, and most real systems are combinations of them.
Practical advice worth keeping
- Start with the model API directly. Many patterns take a few lines of code, and frameworks add abstraction that makes debugging harder. If you do use one, understand what it does underneath.
- Keep three principles: simplicity in design, transparency by showing the agent's planning steps, and careful design of the agent-computer interface.
- An appendix on tool design argues that tools deserve as much prompt engineering as the main prompt: clear documentation, examples, natural formats, and parameters designed so mistakes are hard to make.
How to use it
Read it once before designing, then again when reviewing a design. For each part of your system, ask which pattern it is and whether a simpler one would do. Then read Anthropic's later pieces on writing tools for agents and on context engineering, which go deeper on the two areas where agents most often fail.
Common questions
Is this only relevant to Claude? No. The patterns are model-agnostic and apply to any provider's API.
Do I need a framework such as LangChain? The article suggests starting without one. Many patterns are a few lines of code, and you will understand your system better.
How long does it take to read? Around half an hour, longer if you sketch your own system against each pattern as you go.
Is it out of date? It was published in December 2024. Model capabilities have moved on, but the case for starting simple and adding complexity only when results justify it still holds.
Best for: anyone designing an AI feature with more than one model call, especially if the first instinct is to build a fully autonomous agent.
Ready to start?
Opens on Anthropic in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.