A classic assistant makes one request per question. An agent runs a loop: it thinks, calls a tool, reads the result, thinks again. Every turn drags along everything before it, so the context grows and the tenth turn looks nothing like the first. That is why estimates built from a single request fall short by a wide margin.

At a glance

What happensThe history is resent on every turn of the loop
EffectCost grows faster than the number of steps
How to measure itPer completed task, not per request
LeversPrune the history, cap the steps, drop the model inside the loop

Where the cost comes from

Three things add up. First, the history: on turn N the model reads the previous N-1 all over again. Second, the tool descriptions, which travel on every request even if the agent uses two of its fifteen tools. Third, retries: a step that fails is repeated and paid for twice.

The result is that the spend of an agentic task is not linear in the number of steps. Doubling the length of the conversation can more than double the bill.

Measure per task, not per request

The right unit is not the request, it is the completed task. An agent that solves the case in four steps with an expensive model can come out cheaper than one that takes twenty turns with a cheap one, and the price per million tokens will not tell you that. It is exactly what cost per task measures.

Add a second column: the share of tasks that finish correctly. A cheap agent that fails one time in four forces a redo, and that redo is billed too.

Where to rein it in

Prune the history. Not everything that happened eight steps ago is needed on the ninth. Summarizing the old and keeping the recent intact cuts the growth at the root.

Trim the tools. Show the agent only the ones it can use at that point in the flow, not the whole catalog.

Cap the steps. An agent with no limit is a bill with no limit. Better that it gives up and flags the case than that it takes forty turns.

Drop the model inside the loop. Deciding the next step is usually easier than solving the task. Many loops work just as well with a small model to navigate and the large one only for the hard step, as in picking the model per task.

Cache the fixed part. System instructions and tool descriptions do not change between turns: they are the textbook case for prompt caching.

Frequently asked questions

How much more expensive is an agent than a normal assistant? It depends on the number of turns, but it is common for an agentic task to cost an order of magnitude more than a single equivalent request.

Is capping the steps worth it? Yes. The cap protects you from the rare cases, which are the ones that eat the budget, and it usually affects a very small fraction of tasks.

How do I know if my agent is looping too much? Look at the distribution of steps per task. If the long tail concentrates most of the spend, you have a loop problem, not a pricing problem.


At e-ficient we measure the cost per task of companies that already run AI in production and tell you how much you would save with each lever at your real volume. The first audit is free if you start a plan with a three-month commitment and returns a diagnosis within 72 hours.