Cost Per Task: Measuring What AI Agent Work Really Costs

BusinessEvaluationPublished Updated By Simon Budziak

Cost per task is the full cost of one completed unit of AI agent work. It counts model tokens, tool calls and retries across every attempt, which makes agent economics comparable to the cost of the same task done by a person, and it is the number to watch instead of monthly API spend.

How do you calculate cost per task honestly?

Divide everything the agent consumed by the tasks it actually completed. The denominator is completed tasks, not attempts, which ties the metric to task completion rate: an agent that fails four tries in ten carries those four in the price of the six. The numerator takes all model calls, tool charges and retries, plus a fair share of the fixed costs around the system. Token-level levers like reasoning effort and model choice move it more than any infrastructure decision.

What decisions does cost per task drive?

Three. Whether to automate at all, by comparing against the loaded cost of the same task done manually inside the AI ROI case. Whether to build or buy, since a vendor’s per-seat price converts to a per-task price the moment you know your volumes. And where to optimize, because a per-task number localizes waste the monthly bill hides. Tracking it continuously, not just at purchase, is the core of AI FinOps.

How do you bring cost per task down without losing quality?

Route, cache, and shorten. Model routing sends the easy cases to a cheaper model and saves the expensive one for tasks that need it. Prompt caching stops you paying repeatedly for the same instructions and reference material. Trimming what the agent reads on each step cuts tokens at the source. Every lever trades cost against completion rate, so move one at a time and watch both numbers: a cheaper model that fails more often can raise the honest cost per task while lowering the price of each call.

Why can the bill rise while cost per task falls?

Because volume answers price. Once a task costs less to hand to an agent than to queue for a person, teams route more work to it, and the monthly total grows even as each task gets cheaper. That is usually success, not waste, and only the per-task number can tell you which: a rising bill with falling cost per task means adoption, rising both means leakage. Budgets that track totals alone cannot see the difference, which is why the per-task figure anchors the AI business case long after the pilot ends.

How do we track cost per task on our own agents?

We attribute token spend to the task that caused it, not to the month it landed in, the method in our guide to token cost attribution. The same measure-first discipline is how we halved one coding agent’s token usage without touching quality: find where the tokens go, then cut what the measurement names. Every unattended run we schedule carries a spend cap it checks before each paid call, and when a model switch promises a lower per-call price, we re-measure completed tasks first, because switching models changes retry behavior, and the honest per-task number moves with it.

Written with AI assistance and reviewed by Simon Budziak. The production notes come from systems Soba Labs builds and runs.

Frequently asked questions

What goes into cost per task?

Everything one completed task consumed: model tokens across all calls, tool and API charges, retries and failed attempts, and a share of fixed costs such as hosting and monitoring. Leaving out the failures is the classic mistake, because a 60 percent completion rate raises the honest number by two thirds.

What is a normal cost per task?

The spread is wide and moves with model prices: routed simple tasks cost fractions of a cent, typical multi-step agent tasks sit in the cents, and long research or coding tasks on frontier models can reach several dollars. The comparison that matters is against what the task costs a person.

Summarize this page with

See this working in a system we built