The full answer
Anthropic's "Building effective agents" names five workflow patterns, where your code decides the steps: prompt chaining, routing, parallelization, orchestrator-workers and evaluator-optimizer. A full agent lets the model decide its own steps. Pick a workflow when you can draw the steps in advance. Pick an agent only when you cannot, because agents cost more, are slower and are harder to test.
The five patterns
| Pattern | How it works | Good for |
|---|---|---|
| Prompt chaining | Each call works on the previous call's output, with checks in code between steps | Tasks that split into fixed stages: outline, check, then write |
| Routing | A first step classifies the input and sends it to a specialised prompt or model | Mixed traffic: refunds, technical questions and complaints each get their own prompt; easy questions go to a smaller model |
| Parallelization | Independent calls run at once. Sectioning splits a task into parts; voting runs the same task several times | Checking a text for several issues at once; more confident answers by majority |
| Orchestrator-workers | A central model breaks the task down at run time, hands parts to workers, and combines their results | Tasks whose subtasks cannot be known in advance, such as changes across many files |
| Evaluator-optimizer | One call writes, another grades against clear criteria, and they loop | Translation or writing where feedback measurably improves the result |
When an agent is the right answer
An agent is a model using tools in a loop, deciding the next step from each result. It fits open-ended problems where the number and order of steps cannot be fixed: debugging, research, work across a codebase. It needs a sandbox, limits and good tools, because its path changes every run.
How to choose in practice
- Try a single well-written call, with retrieval or a few examples.
- If quality is not enough, add structure your code controls: a chain, a router, or a parallel step.
- Move to an agent only for the part of the task that truly needs open-ended steps, and measure that it beats the workflow on your evaluation set.
Why interviewers ask this
Many teams build an agentic workflow or a multi-agent system where a router and two prompts would do. Showing you know the simpler patterns, and when each pays, signals that you will build systems that are cheaper, faster and easier to debug.
A concrete example
A support assistant: a router sends billing questions to a prompt with billing documents and tools, and general questions to a smaller model. Long replies go through an evaluator step that checks tone and policy. Only the "investigate this account issue" path is a real agent, with read-only tools and a turn limit.
Last updated 16 October 2026
Sources