New: outcomized services. Pay per result, with a monthly cap you set. See pricing →
Engineering

Cost Per Task: The One Number Every AI Feature Needs

Updated 2026-10 · 8 min read · By the Founder of Outcomizer, former CTO and co-founder

Teams track the monthly model bill, and the monthly model bill tells you almost nothing. It goes up when usage grows, which is good, and when a prompt doubles in size or an agent loops, which is not. Both look the same on an invoice.

The number we put on every AI feature we build or run is cost per task: what it costs, all in, to complete one unit of the work the feature exists for. One resolved ticket. One processed invoice. One answered call. Here is how we measure it and the levers that move it.

Is your agent live and unmeasured?A one-week audit: evals, failures, cost per task, permissions. $2,500.

Define the task before you count the cost

A task is a unit of business outcome, not a model call. A support resolution might take one classification, two retrieval calls, one draft, and one verification. Cost per task is the sum of all of them, plus tool calls, plus retries, plus the share of failed attempts that never completed anything.

This is also how we price outcome-based services. A Support Resolution Desk billed at $1 per resolved conversation only works if we know, per conversation, what resolution costs us to produce. Pricing per outcome forces honest measurement.

How to measure it

Give every task an ID at the start and pass it through every model call, tool call, and background job, the same way you would pass a correlation ID for debugging. Log input tokens, output tokens, model name, and any paid tool usage against that ID. Then cost per task is a group-by query, not a guess.

Track the distribution, not just the average. A feature that averages a few cents per task but has a long tail of runaway tasks costing a hundred times that has a loop or a retry storm hiding in it. Look at the most expensive ten tasks every week. They are where the bugs are.

Once you can see cost per task, the question becomes which levers to pull, and whether the agent is even safe to optimize. That is the part of an Agent Audit that most teams find the most surprising.

Route simple steps to small models

Most steps in a typical agent are not hard. Classifying intent, picking from a short list, extracting a field from a known location, checking whether an answer cites a source: these are small typed decisions, and smaller, cheaper models handle them well. Reserve the largest model for the steps that genuinely need reasoning, and for the cases the small model is unsure about.

Do not route on intuition. Build a set of real cases with known outcomes, run each step on the small model, and compare accuracy against the large one. Route where the gap is acceptable for that step's consequences. Recheck when models or prompts change.

Is your agent live and unmeasured?

A one-week audit: evals, failures, cost per task, permissions. $2,500.

See the Agent Audit

Cache what repeats

Two kinds of caching pay off. Prompt caching, offered by the major providers, cuts the cost of a long, stable prefix such as a system prompt, policies, or product context that every call repeats. Structure prompts so the stable part comes first and the changing part comes last.

Then result caching in your own code: if the same document is classified twice, or the same question is answered from the same sources, store the answer with a sensible expiry. Do not cache anything that depends on live state, such as order status or account balance.

Cap every task, and alert on drift

Every task gets hard limits: maximum model calls, maximum tokens, maximum tool calls, maximum wall-clock time. When a task hits a cap it stops and escalates to a person instead of continuing. A cap turns an infinite loop from a billing incident into a support ticket.

Then alert on change, not just on totals. A daily check that compares cost per task against its recent baseline catches a prompt that grew, a retrieval step that started returning ten times more context, or a provider price change, before the month closes.

Where cost per task lives after launch

Cost per task is not a launch metric. It drifts as content grows, models change, and edge cases accumulate. In our Agent Care retainers (from $1,500 per month) it sits next to error rate and escalation rate on the weekly review, with the most expensive tasks of the week pulled out for a look.

When not to bother: if a feature runs a few hundred times a month and costs less than a coffee, measure it once, set a cap, and move on. Optimization effort should follow the money.

Key takeaways

  • Measure cost per completed task, including retries and failed attempts, not cost per call.
  • Pass a task ID through every call and log tokens and model against it.
  • Review the most expensive tasks weekly; that is where loops and retry storms hide.
  • Route simple typed decisions to small models, based on measured accuracy, not intuition.
  • Cap calls, tokens, and time per task, and alert when cost drifts from its baseline.

Frequently asked questions

One that is comfortably below the value of the task. Compare it with what the same outcome costs when a person does it, and with what you charge for it. There is no universal target number.

On the wrong steps, yes. That is why routing should be based on measured accuracy on your own cases, step by step, with low-confidence cases escalated to a larger model or a person.

It should stop, record what it was doing, and escalate to a human. Silently giving up or returning a partial answer as if it were complete is worse than stopping.

Yes. Cost per task is one of the core checks, alongside evals, failure review, safety and permissions. The output is a fix list you can act on, for $2,500 flat in five business days.

Free playbook

The 15-Day AI MVP Playbook

Day-by-day plan, a starter CLAUDE.md, the Lovable-to-production checklist, eval and cost worksheets, and 10 prompts. Pure value, no pitch.

Get the playbook →
Next step

Book 20 minutes, or send a brief

A former CTO replies. You leave with a written plan and a fixed estimate.

No spam. One reply within one business day. Or skip the form and book a call.

Thank you. Your brief is on its way. Grab a time now so we can talk it through.

Prefer LinkedIn? Connect with Harish.

HG
Harish Ganapathi, Founder of Outcomizer, former CTO and co-founder

I started Outcomizer because hourly billing rewards the wrong thing. As a CTO I led an 18-engineer team and shipped the products in these case studies, including a Fortune 100 shipping system and a SaaS we later sold. Now I put my fee on the result. I still do the work. You work with me, not a sales layer on top of a bench.

Connect on LinkedIn →
Book a callFree lead test