Law 36 · Architecture & Operations
Don't Build an Agent When a Workflow Will Do
Agents buy flexibility with latency, cost, and unpredictability.

The principle
The simplest solution that works is usually the right one — and sometimes that means not building an agentic system at all. Agents that dynamically direct their own tool use trade latency, cost, and predictability for autonomy; a workflow with predefined code paths is cheaper and more reliable for well-defined tasks. Reach for an agent only when the problem genuinely needs model-driven decisions at runtime.
Why it happens
An agentic loop pays a tax on every turn: each model-driven decision adds a round-trip of latency, more tokens, and a fresh chance to pick a wrong branch, so an open-ended loop is strictly more expensive and less predictable than a fixed code path for the same work. When a task has enumerable categories and a known decision structure, that structure belongs in deterministic code (a switch, a router, a state machine), with the model used only for the genuinely ambiguous judgment inside it. The failure mode is concrete: teams wrap a five-way classification in a multi-step reasoning agent that costs several model calls per item, occasionally invents an output that does not exist, and runs in seconds where a single classification call would run in well under one. The discipline is to reserve runtime model-driven control flow for problems whose branching genuinely cannot be enumerated in advance, and to script everything you can describe.
Watch for
- You can enumerate the possible paths in advance, yet the agent rediscovers them with model calls each run.
- The agent sometimes produces an action or category that does not exist in your fixed set of options.
- Per-item latency and cost are dominated by reasoning steps that always reach the same small set of outcomes.
In practice
A team wires up a multi-step ReAct agent to categorize incoming support tickets and route them to a queue. It costs three LLM calls per ticket, occasionally invents a queue that does not exist, and takes four seconds. The task has five known categories and one decision point: it is a single classification call feeding a switch statement, not an agent. Default to the deterministic workflow and reach for agentic loops only when the branching is genuinely open-ended and you cannot enumerate the paths in advance.
Apply it
- Default to a deterministic workflow with explicit code paths for any task whose branches you can list ahead of time.
- Use the model only for the ambiguous judgment inside the workflow, not for control flow you could script.
- Promote to an agentic loop only after you confirm the branching is genuinely open-ended and cannot be enumerated.
The takeaway
Default to a deterministic workflow. Promote to an agent only when the task's branching is too open-ended to script.