The decision table: script, workflow, or agent
Lesson 1 of 4 in When NOT to Build an Agent.
The previous module taught you what an agent is. This one teaches the more valuable skill: recognising when you don’t need one — which, in 2026, is most of the time.
That is not agent-skepticism; it is engineering. A problem you can solve with a script instead of an agent is a gift: deterministic, testable with assertions, auditable by reading the code, nearly free to run. Every one of those properties disappears the moment the model takes the steering wheel. The senior move is not building the most capable system — it is spending non-determinism only where the task actually demands it.
So before any architecture discussion, put the three candidates side by side and score the task against five dimensions. This table is the whole module in miniature.
| Dimension | Script | Workflow (may contain LLM steps) | Agent |
|---|---|---|---|
Task variability | One fixed shape. Anything unexpected breaks it — loudly, which is a feature. | Enumerable variants: branches a human drew in advance. LLM steps absorb fuzzy inputs; the step order stays frozen. | Open-ended: the action sequence genuinely differs per task and cannot be enumerated. The only dimension that ever requires an agent. |
Tolerance for error | Zero tolerance is fine — same input, same output, every run. | Deterministic skeleton; fuzziness confined to individual LLM steps you can check. | A failure rate is a precondition, not a bug. Some runs will go wrong; the design question is whether wrong runs are survivable. |
Cost per run | Compute pennies. Effectively free at any volume. | One or a few model calls — predictable, flat, budgetable. | Tokens × iterations × retries. Variable per run, superlinear in steps, and the demo run is the cheapest you will ever see. |
Auditability | Read the code. The behaviour is the source. | Read the graph plus per-step logs. Reproducible on demand. | Read traces, run by run. The behaviour is not in the code — two identical inputs can take different paths. |
Latency | Milliseconds. | Seconds, and predictable — you know how many calls it makes. | Seconds to minutes, and unpredictable — the loop runs as long as the model decides it needs to. |
Key terms: agent, workflow, non-determinism, token, trace, rule of least power
Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.