Software Engineeringunpacked

AI workflow vs agent: a three-question rule, and what agents and multi-agent systems really cost

In a workflow, your code decides the steps; in an agent, the model does. Start with the simplest design: a single well-prepared call, then a workflow when you can write the steps down in advance, and an agent only when the next step depends on what the last one found. Agents cost more and their errors can compound, and multi-agent systems use about 15 times the tokens of a chat, so they pay off only on valuable work that splits into independent parts.

Video · AI Workflow vs Agent: The Simple Rule for Choosing (CCAR-F) · 4:03

Video · Single Agent vs Multi-Agent: When the Token Bill Pays Off (CCAR-F) · 3:55

Workflow vs agent: who decides the steps

Both are built from the same block, which Anthropic calls the augmented LLM: "an LLM enhanced with augmentations such as retrieval, tools, and memory". What differs is who is in charge of the steps:

Workflow Agent
Definition LLMs and tools "orchestrated through predefined code paths" LLMs "dynamically direct their own processes and tool usage"
Who picks the next step Your code The model, from each tool result
Strength "Predictability and consistency for well-defined tasks" Flexibility "when flexibility and model-driven decision-making are needed at scale"
Cost Fixed number of calls Variable: more tokens, more latency, errors can compound

In practice an agent is "LLMs using tools based on environmental feedback in a loop": the agentic loop.

The rule: three questions, in order

Anthropic's advice is to find "the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all." As three questions:

  1. Does one call do the job, with good retrieval and a few examples? "For many applications", that's "usually enough". Stop there.
  2. Can you write the steps down in advance? Use a workflow: a prompt chain, routing or parallel calls, with checks in code between steps.
  3. Do the steps depend on what you find along the way? That's when an agent earns its place.

Take a bike-rental shop. Every night, damage emails get the same treatment: extract the facts, check them, file the report. Fixed steps: a workflow. The support chat ("where's my refund?", "can I swap to an e-bike tomorrow?") can't be scripted in advance: an agent. And even inside the agent, some rules never move: refunds over $100 need a person, enforced in code, not left to the model.

What an agent costs

The same article warns that "the autonomous nature of agents means higher costs, and the potential for compounding errors", and recommends "extensive testing in sandboxed environments, along with the appropriate guardrails". Agents also need ground truth at each step, such as tool results or code execution, rather than their own guesses.

Single agent vs multi-agent: the token bill

Anthropic's engineering team measured its own research system:

So a multi-agent system buys more work in parallel, at a price. It fits when:

Good fit Poor fit
The task is valuable enough to pay for the tokens Every agent needs the same shared context
It splits into many independent directions (broad research) The steps depend on each other
The information exceeds one context window Most coding: fewer truly parallel tasks

For the shop: "where's my deposit?" is one booking, each step needing the last, so one agent. Researching e-bike rental rules in twelve candidate cities is twelve independent questions with real money at stake: a coordinator with subagents.

Workflow vs agent on the Claude Certified Architect exam

Domain 1 of the CCAR-F exam tests this in task 1.1 (model-driven decisions versus pre-configured decision trees), task 1.2 (a coordinator should pick which subagents to invoke, not route everything through the full pipeline) and task 1.6 (prompt chaining for predictable reviews, dynamic decomposition for open-ended work). The common trap: an agent, or a whole team of agents, for a task whose steps are known in advance. See also AI agent architecture.

More in all articles.

Sources: Building effective agents (Anthropic); How we built our multi-agent research system (Anthropic, June 2025); How tool use works; Claude Certified Architect Foundations exam guide v1.0, task statements 1.1, 1.2 and 1.6.

FAQ

What is the difference between an AI workflow and an AI agent?

Anthropic defines workflows as systems where LLMs and tools are orchestrated through predefined code paths, and agents as systems where LLMs dynamically direct their own processes and tool usage. In practice, an agent is a model using tools in a loop, reacting to each result.

When should I use an AI agent instead of a workflow?

When the task is open-ended and you can't predict the steps or how many there will be, so the next step depends on what the previous one found. If you can write the steps down in advance, a workflow is more predictable, cheaper and easier to test.

How much more do AI agents cost?

Anthropic measured that agents typically use about 4 times the tokens of a chat, and multi-agent systems about 15 times. Agents also add latency and the risk of errors compounding across steps.

When is a multi-agent system worth it?

When the task is valuable enough to pay for the extra tokens and splits into many independent directions, such as broad research, or needs more information than one context window holds. It fits poorly when every agent needs the same context or the steps depend on each other.