AI agent cost per task: the unit that predicts your bill
Agent prices arrive in seats, credits, actions and tokens per million. Only two units survive contact with production: tokens consumed by one unit of work, and the dollars that buys. The public dataset ranks both โ and the spread between agents doing comparable work is far wider than the model price list suggests.
Published ยท 9 min read ยท by AgentBurn Editorial ยท dataset snapshot 2026-10-27
1. Three units, one bill
A seat costs the same whether the agent burns 50,000 tokens or 50 million. A credit hides the token conversion behind a vendor-specific table. Dollars per million tokens are comparable across providers but say nothing about how many tokens a finished task needs. That last number is the one that shows up on the invoice, and it is the number almost nobody publishes.
AgentBurn exists to make it publishable. Every project in the project library reports the same six metrics, each with a provenance label: stated by the cited source, derived with a formula shown on the page, or not published โ in which case the field stays empty rather than being estimated. No composite scores, no weighted index of the week.
2. The published spread: 0.137M to 24.1M tokens per task
From the current dataset snapshot (2026-10-27), three projects publish both a token count and a per-task cost. They describe very different kinds of work, which is exactly why a single average would be useless:
| Project | Tokens per task | Cost per task | Source type |
|---|---|---|---|
| Claude Code | 24,100,000 | $13.30 | Benchmark |
| Codex CLI | 3,900,000 | $1.50 | Benchmark |
| n8n AI agents | 137,000 | $0.42 | Community report |
The public benchmark sheets show the same dispersion on a single task family. Terminal-Bench 3.0 rows in the snapshot run from 126,000 tokens and $0.35 per run (Kimi K3 via terminus-2) to 870,000 tokens and $5.54 per run (Claude Opus 4.8 via terminus-2). Those are runs of the same benchmark, not different products โ the harness and the reasoning budget do the rest.
Two orders of magnitude separate the cheapest and most expensive task in the library. If you compare agents by model list price, you are comparing the smallest part of the bill.
3. Where the tokens actually go
Take the Claude Code row. Its workflow breakdown in the dataset splits the token budget across six phases of one completed task: orient in the repo (6%), plan the change (7%), edit files (22%), run tests (18%), debug and retry (31%), verify and commit (16%).
Three things follow from that split:
- Generation is not the cost. Edits are 22% of the budget. Most tokens are re-reading context: the repository map, the plan, the failing test output, the previous attempt.
- Retries are the largest single line. Debug and retry at 31% is what makes agent cost look unpredictable. A run that fails twice before passing pays for the same context three times.
- Prompt caching is the difference between $13 and $48. The published cost works out to roughly $0.55 per million tokens across the whole run. At Sonnet 5.5's uncached input rate of $2 per million token, 24.1M tokens would cost about $48. Caching the repeated context at $0.20 per million brings the blended average down; the row is only affordable because the harness keeps the prefix warm.
4. Turning tokens into dollars
The methodology page documents the exact formula. The short version: blend input, output and cached-token prices by the workload's mix, then multiply by tokens per task.
blended $/1M = (input_share * input_price)
+ (output_share * output_price)
- (cache_hit_share * input_share * (input_price - cached_price))
attempt cost = (tokens_per_task / 1e6) * blended $/1M
Run it with your own numbers, not with the averages. The cost and ROI calculator prices one task across all 22 models in the snapshot with retries, cache hit rate, success rate and a human baseline. Point it at the tokens your agent actually consumes; the model list is already loaded.
5. What to compare when the units disagree
- Normalise to tokens per completed task. Not per API call, not per session, not per seat-month. If a vendor will not state it, treat the cost as unknown rather than cheap.
- Ask for the cache assumption. The same workload at a 90% cache-hit rate and at 0% differs by more than 3x on input-heavy agents.
- Keep retries in the number. Cost per task flatters agents that fail; the bill includes the failures. Divide by success rate โ the next post in this blog walks through the arithmetic.
- Check the snapshot date. Model prices moved several times this quarter. A 2025 cost table reproduced against 2026 prices is a different number.
6. What this dataset does not tell you
Three limits are worth stating plainly, because they apply to every number on this site:
- Run volume is modelled. No vendor publishes daily runs for its agent. The fleet-volume board multiplies a labelled run-rate estimate by per-task tokens and never ranks efficiency with it.
- List prices only. No negotiated discounts, no batch-API pricing, no peak/off-peak differences. Your invoice can be lower, not higher, than the modelled cost.
- Some benchmark rows cannot be re-verified. The dataset flags those explicitly rather than silently updating them; the Artificial Analysis Coding Agent Index rows are marked as pending re-benchmark against v2.0.
Per-task cost is a floor for planning, not a forecast. The useful move is to measure your own fleet: the telemetry SDK posts input, output, cached tokens, tool calls, retries and outcomes to the ingest API, so the next version of this table is your table.
Sources
- AgentBurn dataset snapshot 2026-10-27 โ projects.json, benchmarks.json, models.json.
- Artificial Analysis Coding Agent Index v1.5 (Oct 2026) โ Claude Code vs Codex comparison page; row flagged for re-verification against v2.0.
- Terminal-Bench 3.0 leaderboard (bench.turing.com) โ per-run token counts and costs.
- n8n issue #38130 โ community report of ~137k input tokens and $0.42 for a five-word question.
- Model list prices from official provider pricing pages, captured 2026-10-27.