
Short answer: If you can write the steps of a process down in advance, build a workflow: language model calls arranged along a fixed path in code. It is more predictable, easier to test and usually cheaper. Choose an agent, where the model decides its own steps and which tools to use, only when the path can’t be fixed ahead of time, for example when every case needs judgement or the rules keep changing. Anthropic’s advice is to start with the simplest solution that works and add complexity only when it clearly improves the result.
The difference in one sentence each
Anthropic’s Building effective agents draws the line like this. In a workflow, language models and tools follow predefined code paths. In an agent, the model directs its own process and tool use and stays in control of how it completes the task.
Both are built from the same basic block: a language model with access to retrieval, tools and memory. For many applications, Anthropic notes, a single well-prompted call with retrieval and examples is usually enough.
Five workflow patterns
| Pattern | How it works | Example from the article |
|---|---|---|
| Prompt chaining | A task is split into fixed steps; each call builds on the previous one, with optional checks between them. | Write marketing copy, then translate it. |
| Routing | The input is classified and sent to a specialised prompt, tool or model. | Send refund questions and technical questions down different paths; send easy questions to a smaller model. |
| Parallelisation | Subtasks run at the same time and the results are combined in code. | One model answers while another screens the input for misuse. |
| Orchestrator–workers | A central model decides which subtasks are needed, hands them out and combines the results. | Changes that touch many files in a codebase. |
| Evaluator–optimiser | One model writes, another critiques, and they loop. | Polishing a translation until the reviewer is satisfied. |
In orchestrator–workers the subtasks aren’t predefined; the orchestrator decides them for each input. The other patterns follow a path you designed.
When an agent is worth it
OpenAI’s A practical guide to building agents names three signs that rule-based automation is falling short:
- Decisions that need judgement, with exceptions and context, such as approving a refund.
- Rules that have become hard to maintain, where every change is costly and error-prone.
- Heavy use of unstructured data: natural language, documents, conversations.
If your use case doesn’t clearly meet these criteria, the guide says a deterministic solution may suffice.
The cost of autonomy
Anthropic is direct about the trade-off: agentic systems often spend more time and money in exchange for better results on hard tasks, and because they act in a loop, a mistake early on can carry through later steps. Their three principles for building agents are to keep the design simple, to make the agent’s planning steps visible, and to invest in clear tool descriptions and testing. They also suggest starting with the model API directly rather than a framework, or at least understanding what a framework does underneath.
A quick way to decide
- Can you draw the flowchart? If yes, start with a workflow.
- How many cases fall outside the flowchart? If most do, consider an agent.
- What does a wrong step cost? The higher the cost, the more you need fixed steps, limits and human approval.
- Can you measure success? Without a clear measure you can’t tell whether added autonomy helped.
For the difference between an agent and a scripted chatbot, see AI agent vs chatbot.
Summary
- Workflow: fixed path, predictable, cheaper. Agent: the model chooses the path.
- Try the five workflow patterns before reaching for an agent.
- Choose an agent for judgement-heavy, rule-resistant, language-heavy work, and keep it simple and visible.


