Skip to the page

What an agent run costs

An agent sends its whole conversation to the model again on every turn, so the bill grows faster than the turns. Set up a run and watch each turn's prompt grow, see what a cache saves, and find the turn where the conversation no longer fits.

Prices read from each maker's page on 14 October 2026

The simulator

The agent

Anthropic's worked example: a task that grows from 20,000 to 120,000 tokens over 40 turns and reads about 2.8 million input tokens. How each turn splits into writing and tool results is our own. Source

calls to the model
tokens

The system prompt, the tool descriptions and the task.

tokens

Its thinking and its tool call, billed as output.

tokens

A file, a web page or a command's output, added to the conversation.

The answer

40 turns on Claude Opus 5.5 read 2,799,920 input tokens and cost $1.54. The last turn sends 6 times as much as the first. Without the cache it would be $11.60.

5.2 centsGPT-6 Luna$5.18GPT-6 Astra

Drawn for Claude Opus 5.5. Choose another model in the table below.

What each turn sends · the last: 119,996 tokensRead freshFrom cacheWritten
Turn 1Turn 40
The run on each of the newest models
Model, cheapest firstWith cacheWithoutFits until
5.2 cents29 centsthe end
7 cents43 centsthe end
7.6 cents86 centsthe end
10 cents65 centsthe end
17 cents89 centsthe end
36 cents$3.78the end
37 cents$2.17the end
71 cents$5.80the end
77 cents$5.80the end
77 cents$5.80the end
$1.03$5.72the end
$1.46$8.70the end
$1.54$11.60the end
$1.70$5.72the end
$3.17$29.00the end
$5.18$29.00the end

Standard list prices. With the cache, each turn's new tokens are charged the maker's cache-write price where it lists one, otherwise its input price, and a model that publishes no cached price is charged its input price for cached tokens. A turn past a maker's long-prompt threshold pays its long-prompt prices. A model whose window the run outgrows is priced as if it fitted, and ranked last.

Why an agent's bill grows faster than its turns

A model remembers nothing between calls. An agent works by calling it in a loop: the model writes a step, usually a tool call, the tool's result is added to the conversation, and the whole conversation goes back to the model for the next step. Turn 40 sends everything from turns 1 to 39 again.

So the prompt grows in a straight line, and the input billed across a run grows with the square of the turns. Double the turns and the input roughly quadruples. A tool that returns a large result, such as a whole file or web page, makes every later turn larger.

A prompt cache is what keeps this affordable. The part of a turn's prompt the model read on the turn before is read again from cache, at a tenth of the input price or less. Here, with the cache on, each turn writes its newest step to the cache and reads the rest from it: on Anthropic's example, about 96 of every 100 input tokens, the share Anthropic gives for a steady session. Writing costs the input price, or 1.25 times it at Anthropic and OpenAI, and is counted. Caches are short-lived: 5 minutes at Anthropic by default and about 30 at OpenAI, each renewed on use. An agent that waits for a person between turns can find its cache gone and pay full price, so a real bill sits between the two columns.

Long prompts can cost more per token. Once a turn's prompt passes a maker's long-prompt threshold, such as 272,000 tokens at OpenAI or 200,000 at xAI, that turn is billed at the higher prices, and the sums here switch to them.

The window sets a hard end. Once the conversation and the next answer no longer fit, the agent has to drop or summarise earlier turns, or stop. Agents that run for hours trim their conversation as they go; this simulator does not, so it shows when that has to happen.

Questions

Why do AI agents cost so much?
Each turn sends the whole conversation so far. Anthropic's example task of 40 turns never grows past 120,000 tokens, yet it reads 2,799,920 input tokens in total. With a cache, that run costs from 5.2 cents on GPT-6 Luna to $5.18 on GPT-6 Astra among the newest models.
How much does prompt caching save on an agent?
Most of the input bill, because almost all of each turn's prompt was read on the turn before. The same 40-turn task on Claude Opus 5.5 costs $1.54 with the cache and $11.60 without it.
How do I estimate what my agent will cost?
Measure 4 things from one real run: the first prompt with its tool descriptions, what the model writes each turn, the size of a typical tool result, and the number of turns. Put them in the simulator. Then run the same task a few times, since agents vary from run to run.
What happens when an agent's conversation outgrows the window?
The next call is refused, so the agent has to make room: drop old tool results, summarise earlier turns, or start a fresh conversation with notes. The table shows the last turn that fits on each model.
How can I make an agent cheaper?
Keep the cache warm by not changing the start of the prompt, return only what the model needs from each tool, trim or summarise old turns, and give routine steps to a smaller model. Fewer turns matter most, since the input grows with the square of the turns.