Articles

When a deterministic workflow beats an agent

Fixed code paths win when the steps are known; a model loop wins when they are not.

Reading: 4 minAutomation & AI

Article cover: When a deterministic workflow beats an agent

Anthropic draws the line in two sentences: “Workflows are systems where LLMs and tools are orchestrated through predefined code paths”, whereas agents are “systems where LLMs dynamically direct their own processes and tool usage”. The difference is not how clever the system is. It is who chooses the next step: code the developer wrote in advance, or the model at run time.

That one question decides this sheet. When the steps are known ahead of time — fetch the record, call the API, format the reply — a fixed code path is cheaper, faster and easier to test. When they cannot be written down in advance, no amount of prompt engineering replaces a model that chooses its own path.

The axis: who chooses the next step

OpenAI states the same boundary from the other side. “A workflow is a sequence of steps that must be executed to meet the user’s goal,” while “Agents are systems that independently accomplish tasks on your behalf.” In that guide an agent is distinguished by controlling workflow execution itself: it decides when the workflow is finished and what to do next.

A deterministic workflow is therefore not a weaker agent. It is a different control structure — the sequence lives in code, not in the model — and the engineering that goes into it (explicit branches, checks between steps, fixed hand-offs) is the point, not an absence of intelligence. One of the workflow patterns Anthropic lists is exactly this: prompt chaining “is ideal for situations where the task can be easily and cleanly decomposed into fixed subtasks”, and the usual way to build it is to add programmatic checks “on any intermediate steps to ensure that the process is still on track.”

What a fixed path buys you

Anthropic’s own summary of the trade-off is direct: “workflows offer predictability and consistency for well-defined tasks, whereas agents are the better option when flexibility and model-driven decision-making are needed at scale.” Read that as the buying list. A written-down path has a known cost per run, a known worst case, and a step you can test on its own; a model-driven loop has none of those by default.

That predictability is the deliverable. A check between steps stops the sequence before a bad intermediate result travels further — which a free-running agent cannot promise, because it is deciding the path as it goes.

What an agent costs you

The price is stated just as plainly. “Agentic systems often trade latency and cost for better task performance,” and “The autonomous nature of agents means higher costs, and the potential for compounding errors.” Compounding is the part people underestimate: each turn’s output becomes the next turn’s input, so a small mistake early is amplified by every decision built on top of it. That is a fair price when the task genuinely needs judgement, and a strange one for a process you could simply have written down.

The three cases that still need a model

OpenAI recommends an agent only where “traditional deterministic and rule-based approaches fall short”, and names three signals. The first is decision-making that turns on “nuanced judgment, exceptions, or context-sensitive decisions”. The second is rules that have become so extensive and intricate that they are unwieldy to maintain — so costly to update that handwritten code is no longer the cheaper option. The third is heavy reliance on unstructured data — interpreting natural language, or extracting meaning from documents. Then the decisive sentence: “Before committing to building an agent, validate that your use case can meet these criteria clearly. Otherwise, a deterministic solution may suffice.”

Drawing the line in practice

The practical rule is to ask whether you can enumerate the steps. If you can, prefer the workflow — and prefer the smallest version of it. Anthropic advises “finding the simplest solution possible, and only increasing complexity when needed”, and notes that “optimizing single LLM calls with retrieval and in-context examples is usually enough.” Reserve the agent “for open-ended problems where it’s difficult or impossible to predict the required number of steps, and where you can’t hardcode a fixed path.”

Most real systems sit between the two ends: a deterministic workflow with a model used only at the steps that need judgement, and the route between them still fixed in code. That hybrid is the default rather than a compromise — the guidance is to “add multi-step agentic systems only when simpler solutions fall short.” The one way to get this wrong is to force a process that genuinely needs judgement into brittle hand-written rules — the reverse of the ruleset that has become too unwieldy to maintain.

Level and prerequisites. L4 — a decision sheet in the layer on workflows, agents and technical safety: the reader must already know what an agent’s action loop is and how a tool call is defined, and must be able to judge a workflow’s controllability, cost and failure surface rather than merely describe it. Prerequisites: the L1 and L2 sheets of this area, and the earlier sheets that define an agent’s loop and its use of tools.

Where to go next

References

  • Anthropic — Building effective agents — the definition of workflows and agents as control structures; the trade-off between predictability and model-driven flexibility; the cost of autonomy and compounding errors; the advice to keep the simplest solution.
  • OpenAI — A practical guide to building agents — the definition of an agent and of a workflow; the three signals that still justify an agent; the concluding test that a deterministic solution may suffice.
Nodrius Field Kit — cover

Get the Nodrius Field Kit

Enter your email and we'll send you the complete Field Kit: eight technical resources in one download.

Your email address is sent to Nodrius and used to deliver the Field Kit to you by email. Marketing messages are separate and optional: the checkbox does not affect your download, and you are only added to our updates list if you tick it. Privacy Policy.

Privacy & cookies

This site does not use cookies, analytics or tracking, and it does not profile you. There is nothing technical to switch off, so Accept and Reject change nothing about how the site works: either choice lets you browse everything normally.

The only difference is what your browser remembers: two entries in local storage — your choice here, so this notice is not shown again, and a marker that the Field Kit offer has already been made — so the offer is presented once and not on every page. They contain no identifier, they are not shared with anyone, and the site sets no cookie for either.

What we do with your data
How your email address is used when you ask for a Resource, how long it is kept and which rights you have — in the Privacy Policy.
What the site stores in your browser
Two entries in local storage — your choice on this notice and whether the Field Kit offer has been shown — and no cookies, no session storage, no third-party content: in the Cookie Policy.