TokenPad
Cost

Agent Loop Cost Simulator

Watch what an agent costs iteration by iteration, including the history it drags.

Settings
Agent Loop SimulatorExact
0Token change
Token change0no change
Input tokens0what you pasted
Output tokens0what you would send
Token cost of this result
Output tokens0
As input$0.00
× 100K requests$0.00

Everything on this page runs in your browser. Nothing you paste is transmitted, because there is no server here to transmit it to.

Result
 

Two costs compound at once

The fixed overhead — system prompt plus tool schemas — is paid on every iteration. The accumulated history grows with every step, because each tool result and each thought is resent on the next call.

Together they produce a cost curve that a per-request estimate misses by a factor of three to ten. The table shows where the money actually goes, iteration by iteration.

What to change

The overhead line is usually the largest single item and the easiest to cut: trim tool descriptions and move conditional instructions into skills. Caching it drops it to roughly a tenth, which the checkbox models.

The iteration count multiplies everything. An agent that cannot finish in four passes rarely finishes in ten either — it just costs more to fail. Lower the ceiling, then investigate why anything was reaching it.

Frequently asked questions

Why does the input column keep growing?
Because the API is stateless. Every previous thought and tool result is resent on the next request to preserve context, so input grows with the square of the iteration count rather than linearly.
Is caching realistic here?
For the fixed prefix, yes — the system prompt and tool schemas are byte-identical on every request by construction, which is the ideal cache prefix. The growing history is not cacheable in the same way.

More cost tools