AI Agent Experiment Cost Calculator
Agent building is early: you test architectures, prompts, tools, memory, and loops. Each iteration burns tokens. Model the loop, watch context accumulate, and budget before the invoice does.
Model Prices
Illustrative sample prices per 1M tokens. Edit to match current pricing from your provider.
| Model | Input $/1M | Output $/1M |
|---|
Loop Simulator
Describe one agent run: base prompt, output per step, steps, and how history accumulates.
Live Results
Cost per run, per day, per month (30 days) for each model.
Monthly Comparison
How this is calculated
Per step s (1-indexed), input tokens = basePrompt + history(s). Full history: history(s) = (s-1) x (avgOutput + growth). Sliding window: min(that, windowSize).
Run cost per model = sum over steps of (inputTokens x inPrice + avgOutput x outPrice) / 1,000,000.
Daily = run cost x runs per experiment x experiments per day. Monthly = daily x 30. All math runs in your browser; nothing is uploaded.
FAQ
Why do agent loops get expensive?
Every step re-sends the growing conversation as input tokens. A 20-step loop does not cost 20x one call: it costs far more, because each later step carries all earlier tool results and reasoning.
How does context growth multiply cost?
With full history, input tokens grow roughly linearly per step, so total input cost grows quadratically with steps. A sliding window caps context and turns that quadratic curve back into a line, at the price of forgotten history.