Cost Per Successful Task: How to Measure AI Agent Cost
Cost per successful task is the total spend for a piece of AI agent work divided by the number of tasks that pass a defined check. The metric counts retries, failed attempts, routing calls, and tool calls. Cost per token counts none of those, so cost per token can fall while the cost of each finished task goes up.
What is cost per successful task?
Cost per successful task is total task spend divided by the number of tasks that passed. Total spend includes every model call, retry, failed attempt, routing or judge call, tool call, and cache charge. A task passes when the task meets a check you define before you measure, such as a test suite or a human review.
Evaluation teams sometimes call the same metric cost per passing task. FinOps teams treat the metric as a unit economics measure, next to cost per customer or cost per transaction.
A related term is cost per agent workflow. Cost per agent workflow divides spend by every workflow run. Cost per successful task divides spend only by the runs that passed.
Why does cost per token mislead for AI agents?
Cost per token prices one unit of text, and an AI agent spends many units to finish one task. Agents make many calls per task, reasoning models produce more tokens per call, and every retry adds cost. A lower price per token can still give you a higher bill for each finished task, and nothing on the rate card warns you.
Gartner predicted on August 17, 2026 that AI inference costs per agentic workflow will increase more than fivefold through 2028, even as token prices fall. In the same press release, Gartner analyst Will Sommer said, “Product leaders cannot rely on more efficient token economics to rationalize AI costs.”
Cost per token is still the right unit for pricing a single call. Cost per successful task is the unit for judging whether an agent is worth running.
How do you calculate cost per successful task?
Add up every charge for a batch of tasks, count the tasks that passed your check, and divide the spend by the passing count. Use the same check every time you measure, or the numbers won’t compare. The example below uses round numbers to show the method. The numbers are illustrative and don’t describe any real system.
| Item | Illustrative example |
|---|---|
| Tasks attempted | 100 |
| Tasks that passed the check | 90 |
| Total spend, including retries and routing calls | $45.00 |
| Cost per successful task | $45.00 ÷ 90 = $0.50 |
| Cost per attempted task, for comparison | $45.00 ÷ 100 = $0.45 |
The gap between $0.45 and $0.50 is the cost of the 10 failed tasks, spread over the tasks that passed. In the same example, if 95 tasks pass at the same spend, cost per successful task falls to about $0.47, and no price changed.
Two limits. The result depends on your pass check, so a looser check makes the number look better. And a small batch can swing the pass rate, so measure over a batch large enough that the pass rate stays steady from one run to the next.
What is inference tiering?
Inference tiering sends simple subtasks to smaller, cheaper models and keeps larger models for the hard steps of a task. An agent run often mixes planning, which needs a strong model, with many routine steps that a small model can do. Tiering matches each step to the cheapest model that can do the step well.
Model cascades and escalation are two ways to do inference tiering. A model cascade tries a small model first and passes the request to a larger model when confidence is low. Escalation starts on a small model and moves up after errors or failed checks. LLM routing compares these methods with other routing methods.
How does LLM routing lower cost per successful task?
LLM routing lowers cost per successful task in three ways. Routing sends routine steps to smaller models. Routing runs open-weight models on GPU capacity you already pay for before sending traffic to per-token APIs. And a cheap routing decision keeps the decision from costing more than the routing saves.
Tetrate measured the cost and delay of the routing decision in Jev-directed model routing.
Two limits. Routing to a model that fails more often can raise cost per successful task, because each failure adds a retry or a lost task. And GPU capacity you already pay for is cheaper only while the capacity has room, so overflow traffic goes back to per-token prices. Measure pass rate next to cost every time you change a routing rule.
What must the metric include to be honest?
An honest cost per successful task counts every charge the task caused, including charges that don’t appear on the main model’s bill. If you leave one out, the metric looks better than the real cost. Check that your numbers include each item in the list below.
- Judge or classifier calls. A router that uses a classifier or an LLM judge makes one more model call per request.
- Retries. A call that times out or returns a bad answer and runs again costs twice.
- Failed attempts. A task that fails the check still spent money. The spend stays in the total, and the task stays out of the count.
- Cache charges. Writing to a prompt cache can cost more than a normal input token, and reading from the cache costs less.
- Tool calls. Search, code execution, and other paid tools add cost to the task.
- Amortized GPU-hours for self-hosted models. Self-hosted models have no per-token bill, so spread the GPU cost over the tasks the GPUs served.
How do you report cost per successful task to finance?
Attribute spend to the team, agent, and project that caused the spend, then divide each owner’s spend by that owner’s passing tasks. Finance then sees a unit cost for each owner, next to the pass rate behind that cost. The attribution has to happen per request, because one provider invoice covers every team.
Showback reports each team’s AI spend to that team without moving money between budgets. Chargeback bills each team’s AI spend to that team’s budget.
AI cost visibility by team, user, and customer explains per-team attribution. Claude API spend governance covers budgets for one provider. How to report AI ROI to leadership covers the report itself.
Two limits. Numbers for different teams compare only when the teams use the same kind of pass check. And a unit cost doesn’t show the value of the work, so report cost per successful task next to the business result each task produces.
Agent Router Enterprise
Frequently asked questions
What is a good cost per successful task? There is no universal number. A good cost per successful task depends on the task, the pass check, and what the finished work is worth. Compare your result against your own single-model baseline on the same tasks and the same check, then track the change over time.
Is cost per successful task the same as cost per request? No. Cost per request divides spend by every model call. Cost per successful task divides the total spend for a piece of work by the number of tasks that passed a check. One agent task can make dozens of requests, and a failed task still costs money.
How does model routing change cost per successful task? Model routing can lower cost per successful task by sending routine steps to smaller, cheaper models. Routing can also raise cost per successful task if the cheaper model fails more often and tasks need retries. Measure pass rate and cost together after every routing change.
What is the difference between cost per successful task and cost per token? Cost per token is the price of one unit of text on one model. Cost per successful task is the total spend for a piece of agent work, including retries, failed attempts, and routing calls, divided by the tasks that passed. Token price can fall while cost per successful task rises.
Related reading
- Cost per token
- Token optimization
- What is LLM routing?
- AI cost governance
- Tokens are the new unit of spend. Can you prove the return?
Learn more about Tetrate Agent Router Enterprise — enterprise AI agent routing with policy, cost controls, and audit across every gateway.