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 direct their own tool use trade latency, cost, and predictability for autonomy, while 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 the model making decisions at runtime.
Why it happens
An agent loop adds cost each turn: latency, tokens, state drift, and another chance to choose the wrong branch. If the task has known categories and a known decision structure, put that structure in code. Use the model for the ambiguous judgment inside the workflow, not for rediscovering the workflow every run. A five-way routing task is usually a classifier plus a switch, not an autonomous planner. Reach for open-ended agents when the branches cannot be listed ahead of time and runtime judgment is genuinely needed.
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. Move up to an agent only when the branching is too open-ended to script.