# What is cost per agent? > Cost per agent is the total spend for one autonomous run, including sub-calls, tool steps and retries. Why one run is a tree, with worked math. URL: https://getculpa.com/what-is-cost-per-agent Last reviewed: 2026-08-01 ## Answer Cost per agent is the total model spend for one complete autonomous run, counting every sub-call, tool step and retry the agent made before it answered. One run isn't one call, it's a tree. Culpa, a local-first LLM cost, margin, and forecast ledger, traces each call back to the run that spawned it and prices the whole tree as a single unit. ## Why this happens An agent presents one interface and generates many calls behind it. The developer sees the first prompt and the final answer, so that's the shape they carry in their head when they estimate cost. What actually happened was a planner call, a dozen tool-using steps that each resent the growing transcript, two sub-agents with their own call trees, and a synthesis pass over everything. Pricing the run means collecting all of it under one identifier, and that identifier has to be created at the top and passed down. ## What this usually looks like - Your call count is many times your run count and nobody has stated the ratio out loud. - Cost estimates for a feature were built from the prompt a developer wrote, not from the calls it produced. - Sub-agent calls appear in the bill with no link back to the run that triggered them. - Two runs of the same feature differ in cost by an order of magnitude depending on how long the agent worked. ## Common mistakes - Pricing an agent feature from its opening prompt. Why it hurts: The opening prompt is the cheapest call in the tree and usually a tiny fraction of the run. Do instead: Price a full run end to end, then multiply by run volume. Never extrapolate from a single call. - Letting sub-agents create their own trace identifiers. Why it hurts: The sub-tree becomes an orphan, so its spend lands in the bill with nothing to attribute it to. Do instead: Pass the parent run identifier into every sub-agent and tool call, so the whole tree rolls up. - Capping agents on wall-clock time rather than on spend. Why it hurts: A fast model can burn more in sixty seconds than a slow one does in ten minutes, so time bounds nothing. Do instead: Cap the run on accumulated cost, and stop when it crosses the ceiling regardless of how long it took. ## Self-check - Count calls and runs for one agent feature last week. The ratio is the multiplier you've been ignoring. - Take your most expensive single run and list its calls in order. The shape will surprise the person who built it. - Check whether a sub-agent call carries the parent run identifier. If it doesn't, that spend is unattributable. - Compare your cheapest and dearest run of the same feature. Variance that wide is a product question, not a cost one. - Confirm a run has a spend ceiling that stops it, rather than a step limit that a long step can blow through. ## One research run, eighteen calls, one bill (illustrative) A research agent on Claude Opus 4.8 at real rates of $0.005 per 1k input and $0.025 per 1k output. The call tree and token volumes below are modelled on a typical tool-using run. Planner call: (4 x $0.005) + (0.8 x $0.025) = $0.020 + $0.020 = $0.040 Six tool steps, average 12k in and 400 out: 6 x [(12 x $0.005) + (0.4 x $0.025)] = 6 x $0.070 = $0.420 Two sub-agents, five calls each at 9k in and 600 out: 10 x [(9 x $0.005) + (0.6 x $0.025)] = 10 x $0.060 = $0.600 Synthesis pass: (20 x $0.005) + (1.2 x $0.025) = $0.100 + $0.030 = $0.130 Run total = $0.040 + $0.420 + $0.600 + $0.130 = $1.19 across 18 calls The planner call a developer watches in the logs is $0.040 of a $1.19 run, about 3%. Anyone estimating this feature from the prompt they wrote was out by a factor of thirty. ## Cost figures Every figure carries its confidence and its source. No figure on this site is provider-reported. - $1.19 — modelled cost of one complete agent run across 18 calls on Claude Opus 4.8 [calculated] Source: Sum of the teardown arithmetic at real Claude Opus 4.8 rates per 1k tokens from the price book, effective 2026-07-02. The call tree and token volumes are modelled. - 3% — share of a modelled run's total cost carried by the opening planner call [calculated] Source: $0.040 divided by $1.19, from the teardown arithmetic. ## FAQ Q: How is cost per agent different from cost per call? A: A call is one request to a model. An agent run is every call the agent made to finish the job, including tool steps, sub-agents and retries. Reasoning about agents at the call level gives you a number that's correct and unusable. Q: How do I stop an agent run getting expensive? A: Cap it on accumulated spend rather than on step count or elapsed time. Steps vary in cost by more than an order of magnitude across a run, so a step limit bounds the wrong quantity and time bounds nothing at all. Q: Do failed tool calls count in cost per agent? A: Yes. A tool step that errored still sent a prompt and still billed for whatever the model generated before the failure. Excluding it understates the run by exactly your failure rate, and failures cluster in the hardest runs. ## Sources - Anthropic pricing: https://platform.claude.com/docs/en/docs/about-claude/pricing Run the free Cost Leak Scan: https://app.getculpa.com/scan?source=pseo&slug=what-is-cost-per-agent&cluster=metric Machine-readable index of every guide: https://getculpa.com/api/pages Human-readable index of every guide: https://getculpa.com/guides Site overview: https://app.getculpa.com/llms.txt Privacy: 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.