Agent Loop Cost
The compounding token cost of a tool-using agent. Each turn of the loop feeds the entire conversation history plus the tool result back into the model, so costs grow non-linearly with the number of steps. A five-step agent can cost fifteen to twenty times a single-prompt equivalent.
An agent loop is the cycle where a model calls a tool, receives a result, and decides what to do next. Each iteration requires re-sending the entire prior conversation to the model, which means input tokens grow with every step. By step five, you are paying to re-read steps one through four. By step ten, the read-cost dominates.
The Simple Version
A single prompt is one charge. A tool-using agent is many charges, each bigger than the last. The cost is not just n times the first call. It is the sum of n increasingly expensive calls. A chatbot is a few cents. A research agent that runs fifteen tool calls can be several dollars.
Why It Matters
Agents look magical in demos because the demo is one run. In production, an agent that runs 10,000 times a day can quietly become the single biggest line item on your cloud bill. The operator’s job is to cap loop depth, cache the stable parts of the prompt aggressively, and use cheaper models for the middle turns. Without those disciplines, agent budgets run away before you notice.
How It’s Used on This Site
TWO’s digest pipeline is explicitly not an agent loop. Three agents run in sequence, each seeing only its own input. That keeps costs linear and predictable. When we eventually ship a real agent, for example a research agent that follows citation chains, we will cap loop depth at five steps and route middle turns to Haiku.