Agent economics

What does an AI agent actually cost?

Model price is the rate card. Your bill comes from turns, resent context, cache behavior, tools, retries and failures. Model the full run, compare buying routes and set a hard stop before the loop starts.

57 live API routes Cost per successful task Checked 2026-09-04

Agent cost calculator

Model turns, resent context, cache hits, retries, tools and success rate in one estimate.

Live rates · updated 2026-09-04

Modeled economics

Attempted run

$0.347

Successful task

$0.463

Monthly spend

$34.73

Expected successes

75

Suggested runaway guardrails

Alert
15 turns or $0.434
Hard stop
18 turns or $0.695

57,600 fresh · 79,200 cache-read · 7,200 cache-write · 14,400 output tokens before retry overhead.

Rate card: $2.00/M input · $0.200/M cache-read · $2.00/M cache-write · $10.00/M output.

This is planning math, not a performance claim. Measure actual model calls and accepted outcomes before setting production budgets.

Compare the billing route

Agent pricing is not one meter

A seat, a prompt, a premium request and an API token are different units. Use current plan pages for payable prices; use the calculator for metered API economics.

Agent routeHow it billsWhat to watch
Claude CodeClaude subscription allowance or metered API routePlan limits and model-call usage are not interchangeable
OpenAI CodexChatGPT plan allowance or OpenAI API tokensTasks can contain many model and tool calls
CursorEditor seat plus included or on-demand usagePremium requests and selected models change the effective cost
GitHub CopilotSeat price plus premium-request rulesAutocomplete and autonomous agent tasks consume different resources
OpenCode, Aider and ClineUsually free/open-source harness plus BYO model APIHarness overhead, tools and retries remain billable
Z.ai Coding PlanFixed subscription with rolling and weekly prompt quotasOne prompt can invoke the model many times

Real evidence

What has been measured—and what has not

Agent harness overhead

33K vs 7K starting tokens

Systima reported Claude Code sending about 33,000 tokens before the prompt versus about 7,000 for OpenCode. In its captured task, two Claude subagents moved metered input from roughly 121,000 to 513,000 tokens. This is third-party evidence, not a universal multiplier.

Read the evidence and limitations →

Context-tool experiment

42% fewer tokens; 32% lower model cost

Graft's vendor-run 162-run study reported 8,070 to 4,650 mean tokens and $0.0429 to $0.0292 mean direct model cost. The public repository did not include the raw replay bundle, so we treat it as shortlist evidence, not an independently reproduced result.

Read the evidence and limitations →

Our current Labs boundary

16 models × 49 deterministic tasks

AI Pricing Guru records raw task outputs, correctness and spend. Those are short model calls rather than autonomous repository agents. A separate paired agent harness experiment is required before we rank coding agents.

Read the evidence and limitations →

Our agent-loop pilot · September 4, 2026

Planner route cost 2.07× more

On one pinned code-fix task, both GLM-5.2 routes passed the same tests. The direct loop used 5,811 tokens and cost $0.006723; adding a separate planning call used 10,790 tokens and cost $0.013914. One task cannot establish a general winner.

Read the evidence and limitations →

How to run an agent on a budget

A practical run policy

  1. 1. Define the accepted outcome. Tests pass, sources are cited, or a human accepts the change. “Agent finished” is not success.
  2. 2. Set two stops. Enforce a maximum model-call count and a maximum dollar amount. Stop on either.
  3. 3. Pin the environment. Record model snapshot, harness version, repository commit, tools, permissions and cache state.
  4. 4. Log the whole meter. Fresh input, cached input, cache writes, output, tools, retries, latency and final acceptance.
  5. 5. Escalate models deliberately. Start routine search and classification cheaply; reserve frontier models for hard planning, debugging and verification.
  6. 6. Review failed loops. Three repeated failures should trip a circuit breaker, not trigger another paid retry.

Eight ways to reduce agent cost

Trim repeated context

Remove stale instructions and duplicated examples, while keeping rules that prevent expensive mistakes.

Expose fewer tools

Unused MCP and function schemas consume input on every applicable call.

Stabilize cache prefixes

Keep reusable instructions byte-stable and separate dynamic content when the provider supports prompt caching.

Summarize old history

Compact completed steps and tool output instead of resending an ever-growing transcript.

Cap output

Verbose reasoning and reports can dominate the bill because output usually carries the highest rate.

Route by difficulty

Use cheaper models for search, extraction and classification; escalate only uncertain or high-value steps.

Budget subagents

Parallelism can save human time, but each branch creates its own context, calls and retry path.

Measure accepted work

Optimize dollars per accepted change or resolved task, not tokens per prompt.

Controlled pilot · September 4, 2026

Does a separate planning agent pay for itself?

We ran the same pinned JavaScript maintenance task through two GLM-5.2 tool loops. Both produced an accepted, test-passing change. The only intended difference was an extra diagnostic planning call before implementation.

RouteModel callsTool callsTokensBilled run costResult
Single agent loop465,811$0.006723Tests passed
Planner + agent loop5610,790$0.013914Tests passed

Verdict: the planner added 86% more tokens and 107% more billed cost without changing acceptance on this easy task. That supports a practical rule—do not delegate routine diagnosis by default—but it is one run, not a universal subagent multiplier or a product ranking.

Open the machine-readable fixture, per-call usage and limitations →

Billed through OpenRouter under the Labs budget. Direct-list estimates are recorded separately. Next expansion: repeat across multiple repository tasks and coding harnesses before making comparative buying claims.

AI agent pricing questions

How much does an AI agent cost to run?

The model rate is only one input. Multiply average metered input and output per model call by the number of calls, then add cache writes, search, tools, sandbox time, retries and failed runs. Cost per successful task is the most useful final metric.

What is a turn budget for an AI agent?

A turn budget is a maximum number of model or tool-loop iterations permitted for one run. Providers and harnesses count turns differently, so production controls should enforce both a call limit and a dollar limit.

Are coding-agent subscriptions cheaper than API usage?

They can be for sustained interactive work, but advertised message or prompt limits do not equal model calls. API billing is easier to attribute for automations; subscriptions can cap spend for one human developer. Compare both using the same accepted tasks.

How can I reduce agent token costs?

Shorten repeated instructions, expose only necessary tools, keep cacheable prefixes stable, summarize old context, cap output, route easy steps to cheaper models, use subagents selectively and stop loops after repeated identical failures.

Does the Labs leaderboard measure autonomous agents?

No. The current Labs leaderboard uses short deterministic single-model tasks. It is evidence for model cost and correctness on that task mix, not evidence for coding-agent harnesses, tool use or repository-level success.