Agent run cost
Every agent turn re-sends the whole history, so cost grows faster than turns. Compare a naive loop with caching and with trimmed tool results.
Naive loop
$0.27
250,800 input tokens · $806/mo at 100 runs/day
With prompt caching
$0.07
250,800 input tokens · $218/mo at 100 runs/day
Trim used tool results
$0.12
105,600 input tokens · $371/mo at 100 runs/day
- Every full tool result stays in history and is re-sent each turn.
- The repeated prefix is billed at the cached rate.
- Used tool outputs are cut down (no caching, since history changes).
Input tokens sent on each turn (naive loop)
Turn 12 sends 6.6× the tokens of turn 1. Total input grows roughly with the square of the number of turns.
1
5,500
2
8,300
3
11,100
4
13,900
5
16,700
6
19,500
7
22,300
8
25,100
9
27,900
10
30,700
11
33,500
12
36,300
A simplified model: each turn adds the same amount of new content, caching is assumed to cover the whole previous prefix, and cache-write surcharges and tool-call overhead are ignored. Use it to compare strategies and spot runaway growth, not to forecast an invoice. Prices come from this site's model directory and may be out of date.