NOTES / AGENTIC DESIGN PATTERNS
Workflows vs agents
The split between fixed LLM pipelines and model-directed agents, and the five workflow patterns that sit between them.
The distinction
Anthropic groups everything built from LLM calls under “agentic systems”, then splits that into two kinds1:
- Workflows: the LLM calls and tools run along code paths you define in advance.
- Agents: the model decides its own steps and which tools to use, in a loop, until the task is done.
Their main advice is to reach for the simplest thing that works, and they found the most successful teams relied on “simple, composable patterns” rather than heavy frameworks1.
The building block
Both start from an LLM augmented with retrieval, tools and memory1. Everything else is a way of wiring those calls together.
Diagram: my own, based on the idea described in 1. Filled boxes are LLM calls; dashed boxes are ordinary code.
Five workflow patterns
| Pattern | Idea | Good when |
|---|---|---|
| Prompt chaining | Break a task into fixed sequential steps, with checks between them | The task splits cleanly into stages |
| Routing | Classify the input, then send it to a specialised prompt or model | Inputs fall into distinct categories |
| Parallelisation | Run sub-tasks at once (sectioning) or the same task several times (voting) | You need speed or more confidence |
| Orchestrator-workers | A central LLM breaks the task down and delegates to workers | Sub-tasks can’t be known in advance |
| Evaluator-optimizer | One call generates, another critiques, and they loop | There are clear criteria for “better” |
All five patterns come from 1. The diagrams below are my own drawings of them.
Prompt chaining
Each step’s output is the next step’s input. A check in code between steps can stop the chain early if something looks wrong.
Routing
A first call classifies the input. Each category gets its own prompt, tools or even a cheaper or stronger model.
Parallelisation
Either split the work into independent pieces (sectioning), or run the same task several times and compare (voting). Code combines the results.
Orchestrator-workers
Looks like parallelisation, but the orchestrator decides the sub-tasks at run time instead of you fixing them in code.
Evaluator-optimizer
One call drafts, another judges against criteria and sends feedback, and the loop repeats until it passes or hits a limit.
When to use an agent
Agents trade predictability and cost for flexibility. They suit open-ended problems where you can’t hard-code the steps, and they need good tools, clear stopping conditions and guardrails1.
Further reading
Gullí’s book catalogues 21 patterns, from prompt chaining and routing to multi-agent collaboration, each with code2.
Sources
- [1]Building effective agents — Erik Schluntz and Barry Zhang · Anthropic · 2024PARAPHRASED, SHORT QUOTE
- [2]Agentic Design Patterns: A Hands-On Guide to Building Intelligent Systems — Antonio Gullí · Springer · 2025FURTHER READING