Guides / cost per agent step

What is cost per agent step?

Cost per agent step is the model spend for one call inside an agent run, and it isn't constant across the run. Each step carries the transcript of the steps before it, so input grows as the agent works. Culpa, a local-first LLM cost, margin, and forecast ledger, prices every step individually and shows where in a run the money actually goes.

Why this happens

Teams reason about agent steps as if they were identical units, which makes step count feel like a linear dial. It isn't. Step twenty resends everything steps one through nineteen produced, so input per step climbs with each iteration while output stays roughly flat. Total input across a run grows with the square of the step count rather than in proportion to it. A step budget raised from twenty to forty looks like a doubling and lands as something much larger.

What this usually looks like

  • Raising a step limit produced a cost increase far bigger than the ratio of the limits.
  • Long runs cost disproportionately more than short ones on the same feature.
  • Input tokens per call climb steadily within a single run and nobody plots that curve.
  • The agent's most expensive steps are its last ones, which is the opposite of where attention goes.

Free, no card, no account

Run the free Cost Leak Scan

It shows your most expensive conversation before you install anything.

Run a free scan

Mistakes that cost the most

MistakeWhy it hurtsDo instead
Treating step count as a linear cost dial.Input accumulates, so total run input grows roughly with the square of the step count.Model the run as accumulating context, and price a step budget before raising it.
Resending the full transcript at every step.Early steps get paid for over and over, once per remaining step in the run.Summarise older steps into a compact state object, and keep only recent turns verbatim.
Setting one step budget for every task the agent handles.Easy tasks finish early and hard ones run to the ceiling, so the ceiling sets your cost, not the work.Let the agent stop when it's done, and put the ceiling on accumulated spend rather than on steps.

Run this check tonight

  1. Plot input tokens against step number for one long run. The slope is your accumulation rate.
  2. Compare the cost of the first step and the last step of the same run. Most teams have never looked.
  3. Take your step limit, double it on paper, and compute the new run cost. It won't be double.
  4. Check what share of runs actually hit the step ceiling. If most do, the ceiling is setting your bill.
  5. Confirm older steps get compacted rather than resent verbatim, and price the difference before deciding.

Twenty steps, then forty, on the same task

Illustrative example

An agent on Claude Haiku 4.5 at real rates of $0.001 per 1k input and $0.005 per 1k output. The base prompt is 2,000 tokens, each step adds about 900 tokens of transcript, and each step returns 300 tokens. Those volumes are modelled.

Step 1: (2.0 x $0.001) + (0.3 x $0.005) = $0.0020 + $0.0015 = $0.0035
Step 20 input is 2.0k + (19 x 0.9k) = 19.1k: (19.1 x $0.001) + (0.3 x $0.005) = $0.0191 + $0.0015 = $0.0206
Total input over 20 steps = (20 x 2.0k) + (0.9k x 190) = 211k, so 211 x $0.001 = $0.211
Output over 20 steps = 6k, so 6 x $0.005 = $0.030. Run total = $0.241
At 40 steps input becomes (40 x 2.0k) + (0.9k x 780) = 782k, and the run total is $0.842

Step twenty costs six times step one, and doubling the step budget multiplied the run cost by 3.5 rather than by 2. The step count is the dial everyone reaches for, and it isn't the dial that sets the bill.

Every number, with its confidence and source

FigureWhat it meansConfidenceSource
$0.0035 to $0.0206modelled cost of a single agent step, first step against twentieth, on Claude Haiku 4.5estimatedBoth endpoints at real Claude Haiku 4.5 rates per 1k tokens from the price book, effective 2026-07-02. A range because the per-step token volumes are modelled.
$0.241modelled total cost of a 20-step run before any step-budget increasecalculated211k input tokens x $0.001 plus 6k output tokens x $0.005 per 1k, from the teardown arithmetic.

What a generic answer can’t know

A provider prices each step in isolation, correctly and uselessly. Which run a step belonged to, what number it was in that run, and how much of its input was transcript rather than new work are facts your orchestration holds and nobody else does. Culpa records them on your infrastructure, keeps your prompts and responses there, and counts the calls to run your plan.

Questions founders ask next

Why does a later agent step cost more than an earlier one?

Because it resends what the earlier steps produced. Output per step stays roughly flat while input climbs with every iteration, so the last step of a long run can cost several times the first one on identical rates.

Does doubling the step limit double the cost?

No, it more than doubles it. Total input across a run grows roughly with the square of the step count, so a run allowed forty steps instead of twenty can cost three to four times as much rather than twice.

What's the cheapest way to cut cost per agent step?

Stop resending the full transcript. Compact older steps into a short state summary and keep only recent turns verbatim. That flattens the accumulation curve, which matters far more on long runs than the per-step rate does.

On your infrastructure

Culpa runs on your infrastructure. Your prompts and responses never leave it. Culpa counts calls to run your plan, and it fails open, so if it ever breaks your app keeps running.


How Culpa works

Find the culprit. Not just the total.

Your dashboard shows what you spent. It stops short of who spent it. Culpa shows the conversation, the user and the feature behind it.

Your prompts stay local.

Culpa runs on your own infrastructure. What you send to a model reaches us at no point.

Every dollar has a name.

Follow any charge to the conversation, the user, the feature and the customer behind it.

See the bill before it lands.

Cost your next feature before you ship it. You get the likely bill and the worst case, at best, median, p90 and p99.

Three steps to your first answer.

1

Change one base URL.

Or drop in the Python or TypeScript library.

2

Find your most expensive conversation.

In the first session, not the first week.

3

Cost your next feature before you ship it.

Base URLhttp://localhost:4545/v1Your traffic keeps flowing if Culpa ever stops.

Why the bill went up

Example dashboard

Calls traced

418,209

across 3 projects

Spend this week

$378.41

+ $182 vs last week

Failed calls

312

74% retried, and you paid for all of them

+ $182 this week traced to one culprit

Spend over 14 days

$0$20$40$60$8024262830020406
user_384report_generatorconv_91fprompt_v1894,220 tokens3 retries$6.81

Most expensive users

user_384$38.42
user_119$21.07
user_562$14.90
user_204$8.30
user_871$5.10

Next week forecast

Best$180
Median$240
p90$310
p99$395

Graded against reality. Accuracy shown as results land.

Free, no card, no account

Run the free Cost Leak Scan

It shows your most expensive conversation before you install anything.

Run a free scan

Keep reading


Sources: Anthropic pricing. Last reviewed 2026-08-01. Plain text version.