An AI agent workflow that calls the model at every step costs more, runs slower, and behaves less predictably than one that uses the model only where judgment is needed. The cost is not one number. It is a per-step charge multiplied by every step, every run, every retry, plus latency your users feel and variance your auditors will eventually ask about.

Lookups, validation, and formatting are deterministic. They have one right answer, and code produces it the same way every time. Paying a model to do them is paying for a probabilistic guess at something you could simply compute.

Every model call is a cost, a delay, and a coin flip

The common demo pattern is a single agent loop: read the request, decide what to do, call a tool, read the result, decide again. Each of those “decide” moments is a model call, and each one carries the whole growing context with it. A ten-step workflow doesn’t cost ten small calls. It costs ten calls whose input gets longer at every step.

Latency compounds the same way. Each call adds seconds, and a workflow that should finish in one second of database and API time takes thirty. In a back-office process where someone is waiting on the result, that gap is the difference between adopted and ignored.

The less visible cost is unpredictability. Ask a model to check whether an invoice number matches the format, and it will be right almost every time. “Almost” is a problem when the step runs thousands of times a month. A regular expression is never “mostly” right, and it never needs a retry.

It also makes the workflow hard to test. If every step is a model call, you can’t write a unit test that says “this input always produces this output.” You can only sample and hope, and that is a weak foundation for anything touching payments, customer records, or access.

Use the model for judgment and code for everything else

The working split is simple. If a step has a correct answer you could write down in advance, it goes in code. If it requires reading ambiguous input, weighing context, or deciding between options that rules can’t enumerate, it goes to the model.

In practice, that means code handles fetching the record, checking required fields, normalising dates and currencies, matching IDs, applying thresholds, and formatting the output for the downstream system. The model handles reading a messy email to work out what the customer is actually asking, classifying an exception that doesn’t fit a known category, or drafting a response that needs to sound like a person wrote it.

This is what we mean by orchestration: a coordinator that decides which kind of worker handles which step, rather than one model doing everything. The orchestration layer is ordinary software. It routes, validates, and enforces order. The model is one tool it calls, with a narrow task and a defined output shape.

The side effects are good ones. Cost drops because the model sees fewer, shorter prompts. Latency drops because deterministic steps run in milliseconds. And the workflow becomes easier to govern, because the places where the model can influence an outcome are small and explicit. When we scope a deployment, we map each step as code or judgment before anything is built, and every model call gets logged with the input it saw and the output it produced. That makes the audit trail something you can read, not something you reconstruct.

Narrow model calls also let you right-size the model. A classification step with four possible labels rarely needs your most capable and most expensive model. A smaller one is often enough, and you only find that out when the step is isolated.

Hardcode too much and the workflow breaks quietly

None of this is an argument for replacing the model with a decision tree. Over-hardcoding has its own failure mode, and it is quieter than an expensive bill.

Rules written for the cases you’ve seen will fail on the ones you haven’t. A rigid parser that handles forty invoice layouts will choke on the forty-first, and if it fails silently or guesses, you won’t know until someone downstream complains. Every deterministic step needs an explicit fallback: when the input doesn’t match what the code expects, hand it to the model or a person, and record that it happened.

There is also a maintenance cost. A thicket of special-case rules becomes its own legacy system, owned by whoever wrote it last. If a rule exists to compensate for the model being unreliable at a task, and a better model would make it unnecessary, it should be reviewed on a schedule instead of left to calcify.

The boundary also moves. A step that needed judgment in March may be fully rule-bound by October because the process stabilised. Another may start needing judgment because the business changed. Getting the split right the first time is unlikely. Making it cheap to revisit is the real goal, and that is easier when you can see in the logs how often each step falls through to the model.

If you aren’t sure where your workflows sit, a diagnostic is the cheapest place to find out. Book a diagnostic call and we’ll walk through one of your processes step by step and mark which parts need a model and which don’t.

The question to sit with

Take the agent workflow you’re running or considering and list its steps. For each one, ask whether you could write down the correct answer in advance. How many of those steps are currently going to a model anyway, and is anyone tracking what that costs per run?