AI Agent Cost Calculator
Models what agents actually do: multi-step loops, resent tool schemas, growing history, and retries. Prices updated 2026-08-02.
- Per task
- $—
- Tokens per task
- —
- Caching saves
- $—/mo
- vs single-request naive estimate
- ×—
Simulates context accumulation step by step — the thing flat per-request math misses.
Worked example: a support-automation agent
An agent resolving 200 tickets/day, averaging 8 steps per ticket, with a 2,500-token system-plus-tools prefix, 250-token outputs and 400-token tool results, on a $5/$25 flagship:
- By step 8, the resent context has grown to ~7,000 tokens — the last step alone costs more than the first three combined.
- Without caching: ~$0.42/task → ~$2,530/month.
- With caching (~90% off the resent prefix and history): ~$0.13/task → ~$790/month.
- Routing 6 of 8 steps to a mini model: under $200/month — a 12× total reduction with the same task success rate on routine tickets.
The naive estimate (one request per ticket) would have predicted ~$100/month — off by 25×. This is the calculator to run before you promise management an agent budget.
Frequently asked questions
› Why do agents cost so much more than chatbots?
Three compounding factors: agents make multiple LLM calls per task (5–20 steps is typical), every step resends the system prompt plus tool schemas plus the growing action history, and failed steps trigger retries. A task that "feels like" one request is often 15 requests with 3–5× the context each — which is why agent bills surprise teams by 10–30×.
› How many steps does a typical agent task take?
Simple lookups: 2–4 steps. Research or multi-tool workflows: 5–15 steps. Complex coding or browsing tasks: 15–50+ steps. Measure your real traces — the step count distribution matters more than the average, because long-tail tasks dominate cost.
› How do I cut agent costs without hurting quality?
In order of impact: (1) prompt caching — the static prefix (system + tools) is resent every step, so caching typically cuts agent input cost 50–70%; (2) route steps by difficulty — use a mini model for tool-selection and formatting steps, the flagship only for reasoning steps; (3) trim tool schemas (every unused tool definition is paid tokens on every step); (4) cap max steps and add early-exit conditions.
› Should agents use flagship or mini models?
The emerging production pattern is mixed: mini models handle 70–90% of steps (parsing, tool calls, formatting) at 10–30× lower cost, escalating to a flagship for planning and hard reasoning. Pure-flagship agents are the single most common source of runaway AI bills.