In the FinOps for AI guide

Each step resends everything before it


How much do AI agents cost?

AI agents cost more than chat because they work in steps, and every step resends the whole task so far. An agent that plans, calls a tool, reads the result, and tries again may take 10 to 20 model calls to finish one task, and each call carries all the context of the ones before it. So cost grows faster than the number of steps. A typical agent task costs from a few cents to several dollars, depending on the model, the number of steps, and how much context builds up. The controls are caching the context that repeats, limiting steps, and giving every task a budget.

Agents are where AI spend is growing fastest. The FinOps Foundation cites reasoning and agentic work using 5 to 30 times more tokens per task than simple prompts.

Why agent cost grows faster than steps

A chat answer is 1 call. An agent task is a loop: think, act, look at the result, decide what next. A model keeps no memory between calls, so each step sends the instructions, the tool definitions, the original request, and every previous step and result. The context grows with each step, and the cost of each step grows with it.

Double the steps, and the cost more than doubles. That is why a stuck agent is so expensive, and why removing even a few steps from a long task saves more than it seems.

Worked example: one analysis run

Halden Freight is the fictional logistics company used across these guides. Its analytics agents answer questions like "why did on-time delivery fall in the Central region last month." A typical run takes 18 steps: planning, querying several data sources, checking results, and writing a summary. It uses a large model at $4 per million input tokens and $20 per million output tokens.

Step 1Step 9Step 18Whole run
Input tokens8,00032,00059,000603,000
Output tokens, including reasoning1,8001,8001,80032,400
Cost$0.07$0.16$0.27$3.06

Input is 79% of the cost, and the last steps cost 4 times the first. About 1 run in 10 fails and has to be rerun, which brings the cost to $3.40 per completed analysis. At 64,700 runs a year, that is $220,000.

Figure

Each step costs more than the last, because it resends everything before it.

$0.00$0.10$0.20$0.30Step 1Step 9Step 18As built: $3.06 a runWith caching: $1.05 a runEach step resends every step before it
Halden Freight is fictional and its figures are illustrative. One 18-step analysis on a model at $4 and $20 per million tokens. Caching bills repeated context at 5% of the input price. The first step costs slightly more with caching, because writing to the cache carries a premium.

What changes the cost of an agent task

LeverWhat it doesEffect on Halden's run
Cache the growing contextEach step's earlier context is read from cache at a fraction of the input priceFrom $3.40 to about $1.17 per completed analysis
Cut stepsPlan better, combine tool calls, stop checking what does not need checkingEach step removed from the end saves about $0.27
Summarize as you goReplace long tool results with short summaries before the next stepSlows how fast context grows
Route steps to smaller modelsUse a small model for lookups and formatting, the large one for reasoningLarge saving on the routed steps
Cap reasoning effortLower how long the model thinks on routine stepsCuts output cost
Reduce failuresFix the causes of failed runs, such as unclear tools or bad dataEvery failed run is paid for twice

Caching matters most for agents, because so much of each step repeats the one before. On most providers it needs the repeated part at the start of the request, unchanged, which agent frameworks can be set up to do.

Control agents with budgets, not hope

ControlSettingWhat it stops
Maximum steps per taskSet from the normal range, such as 25 for a task that usually takes 18Loops and plans that wander
Maximum cost per taskSuch as $20 for an analysis runExpensive outliers, whatever the cause
Spend limit per agent keyA daily limit at about twice normalMany tasks going wrong at once
TimeoutsA maximum run time per taskTasks waiting on tools that never answer
Human handoffA clear path to a person when limits are reachedSilent failure, or retrying forever

Halden learned this the hard way. One of its analytics agents retried a broken query about 9,000 times over a weekend and spent about $14,000. A 25-step limit would have stopped it for about $40. See anomalies and guardrails.

Measure agents by completed task

Report agent cost per completed task, not per step or per call, and count failed runs in it. Then read it beside the value of the task. A $3.40 analysis that replaces 2 hours of an analyst's time is cheap. A $3.40 analysis nobody reads is not. Halden's analytics agents are under review for exactly that reason: their cost per run is known, and their value is not. See AI unit economics and how to measure AI ROI.

Agents as spenders

Agents increasingly make spending decisions themselves: choosing a model, deciding to retry, calling a paid tool, or starting other agents. An agent with no budget is an employee with an unlimited card. Give each agent the cost context a person would have: its budget, the cost of its options, and who the spend belongs to. Keeping that context current and readable by software is part of what an Enterprise Operating Model is for.

Questions leaders ask

Why are AI agents expensive?

Because they complete tasks in many steps, and each step resends everything before it: the instructions, the tool definitions, and every earlier step and result. Context grows with each step, so cost grows faster than the number of steps. Failed runs that have to be repeated add to it.

How much does an AI agent cost per task?

From a few cents to several dollars, depending on the model, the number of steps, and how much context builds up. A long analysis with 18 steps on a large model can cost around $3, while a short task on a small model costs a fraction of a cent. Measure your own per completed task.

How do you reduce AI agent costs?

Cache the context that repeats from step to step, cut unnecessary steps, summarize long tool results, route simple steps to smaller models, and fix the causes of failed runs. Caching alone often cuts agent cost by more than half, because each step repeats so much of the previous one.

How do you stop an AI agent from overspending?

Set a maximum number of steps and a maximum cost for each task, a daily spend limit on the agent's key, and a timeout. When a limit is reached, the agent should stop and hand the task to a person rather than retry. Alert the owner when spend leaves its normal range.

How should you measure AI agent costs?

Per completed task, including the cost of failed runs, and read next to the value of the task. Cost per step or per call hides how many steps a task takes. Report the median and the most expensive tasks too, because a few runaway tasks can dominate the total.

Keep going

See every guide in the series

Last reviewed