AI Agent Token Consumption

We compiled agent token figures from Anthropic, Claude Code docs and a SWE-bench Verified study, then priced one 40-call task on five current models.

AI Agent Token Consumption

A single AI agent uses about four times the tokens of a chat. A multi-agent system uses about 15 times. Anthropic measured both ratios on its own multi-agent research system, so they make a fair baseline for AI agent token consumption.

Coding agents go much further. A study of eight frontier models on SWE-bench Verified found agentic coding tasks used about 1,000 times more tokens than code chat.

We pulled vendor docs, official price lists and that benchmark paper into one table. Then we priced a 40-call agent task ourselves. Our small model landed close to the 1,000 times figure.

Agent Token Figures We Compiled From Original Sources

Every figure in the table comes from the source that first published it. We also noted the setup behind each number, because a chat baseline and a coding benchmark measure very different work.

StatisticFigureOriginal source
Tokens an agent uses against a chatAbout 4 timesAnthropic engineering post on its multi-agent research system
Tokens a multi-agent system uses against a chatAbout 15 timesSame Anthropic post
Share of BrowseComp performance variance explained by token use alone80%Same Anthropic post
Gain of an Opus 4 lead with Sonnet 4 subagents over a single Opus 4 agent90.2%Same Anthropic post
Tokens on agentic coding tasks against code reasoning and code chatAbout 1,000 times“How Do AI Agents Spend Your Money?” (arXiv, April 2026)
Spread in total tokens between runs of the same taskUp to 30 timesSame paper
Best correlation between a model’s token forecast and its real use0.39Same paper
Average Claude Code cost per developer per active dayAbout $13Claude Code docs, “Manage costs effectively”
Average Claude Code cost per developer per month$150 to $250Same Claude Code docs page
Developers who stay under $30 per active day90%Same Claude Code docs page
Extra tokens used by Claude Code agent teams in plan modeAbout 7 times a standard sessionSame Claude Code docs page
Hidden tool-use prompt on Claude 5.5 models286 tokens per request (auto tool choice)Claude API pricing docs

Most rows come from vendors describing their own systems. Still, they are first-hand numbers from teams that see real traffic. The paper row is the only independent study in the set, so we gave it its own section.

Why One Agent Task Eats So Many Tokens

A chat is one request and one reply. An agent, on the other hand, works in a loop. It calls the model, runs a tool, reads the result and calls the model again. So the bill grows with every lap of that loop.

The Whole History Rides Along on Every Call

Claude Code sends your full conversation with every request. Then each tool use sends another request carrying that batch of tool results. So a one-line question late in a long session still pays for the whole history.

That is why input tokens dominate agent bills. The arXiv study found that input tokens drive the overall cost of agentic coding. Output tokens matter far less. You can read more on what to keep in that history in our guide to context engineering for AI agents.

Line chart of input tokens per call in our scenario, rising from 15,000 tokens on call 1 to 132,000 on call 40, against a flat 2,000-token chat question
Chart: AI Agents Choice

Tool Definitions and Tool Results Add Weight

Tools are not free either. For example, Anthropic adds a hidden system prompt of 286 tokens whenever a request includes tools on its 5.5 models. That rises to 406 tokens when the model is forced to call a tool.

Each tool also brings its own definition. The Claude bash tool adds 325 input tokens on Claude 4.7 and later models. Likewise, the text editor tool adds 974 tokens. Web search costs $10 per 1,000 searches, and the results then count as input tokens in later turns.

Thinking Tokens Bill at the Output Rate

Reasoning adds a third layer. Claude Code’s docs note that thinking tokens are billed as output tokens. Also, the default thinking budget can reach tens of thousands of tokens per request, depending on the model. Output prices run five times the input price on Anthropic’s current models, so long thinking adds up fast.

What Anthropic Learned From Its Research Agents

anthropic.com
Anthropic Multi-Agent Research System Post website screenshot
Anthropic Multi-Agent Research System Post

Anthropic built its Research feature as a team of agents. A lead agent plans the work and then spins up subagents that search in parallel. In its engineering post, the team shared how many tokens this design really costs.

Agents used about 4 times the tokens of chat, and multi-agent systems used about 15 times. However, the spend paid off on hard tasks. A Claude Opus 4 lead with Claude Sonnet 4 subagents beat a single Opus 4 agent by 90.2%.

The team also tested what drives results on the BrowseComp benchmark. Three factors explained 95% of the performance variance. Token use alone explained 80%, with the number of tool calls and the model choice as the other two. Even so, model quality mattered a lot. Upgrading to Claude Sonnet 4 gave a bigger gain than doubling the token budget on Claude Sonnet 3.7.

Anthropic also published rough effort rules for its agents. For instance, plain fact-finding needs 1 agent with 3 to 10 tool calls. Direct comparisons might need 2 to 4 subagents with 10 to 15 calls each. Complex research might use more than 10 subagents. Early versions, by contrast, spawned 50 subagents for basic queries.

So the lesson is economic. Anthropic says multi-agent systems need tasks valuable enough to pay for the extra performance. Our explainer on multi-agent communication protocols covers how those agents pass work between them.

Read also: What Is Context Engineering for AI Agents? Techniques, Origins and Token Math

Coding Agents on SWE-bench Verified Use About 1,000 Times More

huggingface.co
How Do AI Agents Spend Your Money Paper Page website screenshot
How Do AI Agents Spend Your Money Paper Page

By contrast, the independent number comes from “How Do AI Agents Spend Your Money?”, a paper posted to arXiv in April 2026. Its authors include Erik Brynjolfsson and Alex Pentland, and Microsoft Research lists it on its site. The team studied agent runs from eight frontier models on SWE-bench Verified, a 500-task coding benchmark.

Their headline finding matches what builders see on their bills. Agentic coding tasks used about 1,000 times more tokens than code reasoning and code chat. In addition, input tokens drove most of that cost.

The study also found three more patterns worth planning for.

  • Runs on the same task differed by up to 30 times in total tokens. So one test run tells you little about the average.
  • More tokens did not reliably buy more accuracy. Instead, accuracy often peaked at a middle level of spend and then flattened.
  • Kimi-K2 and Claude Sonnet 4.5 used over 1.5 million more tokens than GPT-5 on average, on the same tasks.

The paper also asked models to predict their own token use. They did it poorly, with correlations of 0.39 at best. Worse, they kept underestimating their real costs. For that reason, we would never let an agent set its own budget. Hard caps belong in your code, as our guide to controlling AI agent costs explains.

Notice the tension with Anthropic’s finding. Token use explained most of the variance on BrowseComp research tasks. Yet on coding tasks, extra tokens past a middle point added little. So test your own task type before you raise any budget. You can compare coding agents in our coding agents category or in our list of agentic AI coding tools.

What Claude Code Spend Looks Like per Developer

code.claude.com
Claude Code Manage Costs Docs website screenshot
Claude Code Manage Costs Docs

Anthropic publishes real spend figures for its own coding agent. Across enterprise deployments, Claude Code averages about $13 per developer per active day. That works out to $150 to $250 per developer per month. Also, 90% of users stay under $30 per active day.

Anthropic also shares a sample session. In it, Claude Sonnet 4.6 processed 1,200 input tokens, 5,300 output tokens, 940,000 cache reads and 50,000 cache writes. The session cost $0.55. We checked the math against the list prices, and it holds. Cache reads made up about 99% of the tokens and about half the cost.

Team features raise the bill further. Agent teams use about 7 times more tokens than standard sessions when teammates run in plan mode. That is because each teammate keeps its own context window. In contrast, background jobs such as session summaries cost under $0.04 per session.

Our Cost Math for One 40-Call Agent Task

Ratios are useful, but budgets need dollars. So we built a small model of one agent task and priced it on five current models. We used official list prices from the Anthropic and OpenAI pricing docs.

Inputs We Used for the Model

  • The task makes 40 model calls.
  • Every call carries a fixed prefix of 15,000 tokens for the system prompt, tool definitions and instructions.
  • The context grows by 3,000 tokens per call from tool results and earlier replies.
  • Each call writes 800 output tokens, thinking included.
  • With caching, the repeated history is billed as a cache hit and the new 3,000 tokens as a cache write. For OpenAI, we priced new tokens at the input rate.
  • A chat question, for comparison, is 2,000 input tokens and 800 output tokens.

These are our assumptions, so swap in your own logs. Still, the shape holds for most loops. The last call carries 132,000 tokens, and the task sends 2.94 million input tokens in total. Against our chat question, that comes to about 1,061 times the tokens. That sits close to the paper’s 1,000 times figure.

Results per Task and per 1,000 Tasks

ModelInput / output price per million tokensCost per task, no cachingCost per task, with caching1,000 tasks with caching
Claude Opus 5.5$4 / $20$12.40$1.86$1,862
Claude Sonnet 5.5$2 / $10$6.20$0.93$931
OpenAI gpt-6.1-sol$2 / $10$6.20$0.86$865
Claude Haiku 5.5$0.10 / $0.50 (up to 100K-token prompts)$0.84$0.14$145
OpenAI gpt-6-luna$0.10 / $0.50$0.31$0.06$57
Bar chart of one 40-call agent task: Claude Opus 5.5 costs $12.40 without caching and $1.86 with it, Sonnet 5.5 $6.20 and $0.93, gpt-6.1-sol $6.20 and $0.86, Haiku 5.5 $0.84 and $0.14, gpt-6-luna $0.31 and $0.06
Chart: AI Agents Choice

Caching cut the cost per task by 82% to 86% across the five models. By comparison, the same chat question costs $0.024 on Opus 5.5 and $0.0006 on Haiku 5.5. So the agent loop sets most of the bill, more than the model price does.

One detail surprised us. Haiku 5.5 costs more than gpt-6-luna here, even at the same headline rates. That is because Haiku 5.5 switches to $0.50 input and $2.50 output once a prompt passes 100,000 tokens. Our last ten calls cross that line. Long agent runs can trip pricing tiers like this, so read the fine print on context length.

platform.claude.com
Claude API Pricing Docs website screenshot
Claude API Pricing Docs
developers.openai.com
OpenAI API Pricing Docs website screenshot
OpenAI API Pricing Docs

Ways to Cut Agent Token Use

The levers that worked in our math are the same ones the vendors document. For a full playbook with turn limits and budget caps, see our guide on how to control AI agent costs. Then trace a week of real runs in an observability tool such as Langfuse before you change anything.

Prompt Caching Cut Our Scenario Cost by Over 80%

Caching gave the biggest single drop. On Claude Opus 5.5 and Sonnet 5.5, a cache hit costs 0.05 times the base input price. A five-minute cache write costs 1.25 times, and a one-hour write costs 2 times. So keep the prefix stable. If the tool list or system prompt changes, the cache misses and you pay full price again.

Compaction and Context Trimming

Next, shrink what each call rereads. Claude Code compacts the history when it nears the context limit, and you can steer what the summary keeps. Anthropic also suggests keeping CLAUDE.md under 200 lines. For example, a hook that greps a 10,000-line log for errors can cut context from tens of thousands of tokens to hundreds. Our guide on keeping agent state across sessions shows where to store facts outside the prompt.

Smaller Models for Routine Steps

Then route routine steps to a cheaper model. In our table, Sonnet 5.5 costs half of Opus 5.5 per task, and Haiku 5.5 costs a fraction of both. Claude Code’s docs suggest Sonnet for most coding work and Haiku for light subagent tasks. Also, plan the loop before it runs. Our explainer on dynamic planning in LLM agents covers how planners cut wasted calls.

Batch Pricing for Work That Can Wait

Some agent jobs can wait hours, such as nightly reports or bulk tagging. Anthropic’s Batch API takes 50% off input and output tokens, and it stacks with caching. Likewise, OpenAI’s Flex and Batch tables list half the standard rates. So move anything without a user waiting to those tiers.

Fewer Teammates and Subagents

Finally, keep multi-agent teams small. Each teammate runs its own context window, so token use rises roughly with team size. Anthropic’s own early agents spawned 50 subagents for basic queries. That is the failure mode to watch for. Frameworks such as CrewAI let you set the crew size, and our post on agent-to-agent communication explains the handoffs.

Token Questions Teams Ask Before a Rollout

How Many Tokens Does an AI Agent Use per Task?

So it depends on the loop length. Anthropic found agents use about 4 times the tokens of a chat. Coding agents on SWE-bench Verified used about 1,000 times more than code chat. In our 40-call example, one task sent 2.94 million input tokens.

Why Do AI Agents Use More Tokens Than Chatbots?

An agent resends its full history on every model call. It also carries tool definitions, tool results and thinking tokens. A chatbot, by contrast, answers once and stops. For the wider difference, see our post on AI agents vs AI chatbots.

Does a Bigger Token Budget Make an Agent More Accurate?

It helps only up to a point. On BrowseComp, token use explained 80% of performance variance in Anthropic’s tests. However, the SWE-bench Verified study found accuracy often peaked at a middle level of spend. So test budgets on your own tasks.

How Much Does Prompt Caching Save on Agent Runs?

In our scenario, caching cut the cost per task by 82% to 86%. Also, the saving grows with longer loops and a stable prefix. More agent numbers sit in our roundup of agentic AI statistics.

Related AI Agents

Read also: Agentic AI Statistics: Adoption, ROI, Jobs and Pricing Data

Explore Agent Categories

Related Articles

Joydeep Bhattacharya Avatar

Written by