Cost per completed task AI is the total cost of running an agent and getting a task accepted, divided by the number of tasks it actually completes. It is more useful than token price because it counts retries, tools, computing and human review as well as model calls. If you are assessing whether agents can improve a workflow, start by defining the outcome and the cost boundary with our AI strategy and solutioning team, then measure the whole task lifecycle.
That distinction matters. A model can be inexpensive for each call and expensive for each useful result. It can also be costly per call yet economical per result if it completes work reliably with little supervision. CFOs need the second number to compare automation with the current process. Engineering leaders need it to find out which parts of the system drive cost and failure.
The calculation is straightforward. The work is in deciding what counts as a completed task, capturing every cost connected to it, and making sure the system did the job to an acceptable standard. This guide walks through those decisions, a worked cost model and the controls that keep a good median cost from hiding expensive failures.
Why measure cost per completed task AI instead of token price?
A token is a small piece of text processed by a language model. Providers generally charge for some combination of input tokens, output tokens and cached tokens. That is useful for understanding a model invoice. It is not, by itself, a measure of work done. Shifting from raw consumption to cost per task rather than cost per token provides a realistic measure of actual output.
A task is a unit of business work with a defined start, expected result and finish. Examples include processing and routing a supplier invoice, preparing a support response for approval, or proposing a code change that passes review. A completed task is one that meets the agreed acceptance criteria, not merely one where the agent stopped running.
This is the key difference:
| Metric | What it tells you | What it leaves out |
|---|---|---|
| Cost per million tokens | The provider's rate for model input or output | Whether the answer was useful, how many calls it took and what people spent fixing it |
| Cost per model call | The direct cost of one model request | Other calls, tool use, compute, retries and review |
| Cost per attempt | Cost of one end-to-end run, successful or not | How often a run succeeds and what failure costs |
| Cost per completed task | Total measured cost divided by accepted outcomes | It still needs a carefully defined boundary and quality standard |
The last metric resembles a unit cost in other operating functions. If a team pays to process a thousand invoices, the relevant question is not only the cost of the software request. It is the total cost per invoice correctly processed under the required controls.
The FinOps Foundation's guidance on AI costs is a useful starting point for treating AI spend as a managed operating cost. For agent systems, extend that cost view beyond provider usage. Include the services the agent calls, the infrastructure it uses and the people required to supervise its work.
A useful outcome definition is specific and observable. For example, an invoice task might be accepted when required fields are extracted, the total matches the source document, the supplier is identified, and exceptions are sent to the right queue. A vague goal such as read the invoice is not enough. It makes completion hard to verify and cost per completion hard to trust.
What costs belong in the calculation?
Use a consistent boundary around one workflow. Count costs incurred because the task ran, whether it succeeded on its first attempt or not.
A practical formula is:
Cost per completed task = total cost of all task attempts and required follow-up ÷ number of accepted completed tasks
The numerator can include:
- Model input and output charges, including reasoning tokens where the provider bills them.
- Charges for tools and external services, such as document extraction, search, enrichment or messaging APIs.
- Compute and storage used for sandboxes, code execution, temporary files or task data.
- Failed and abandoned runs, including their model and tool usage.
- Human time spent reviewing, correcting, approving or completing the work.
- A fair share of workflow-specific infrastructure, where that cost is material and can be allocated consistently.
The denominator is the number of tasks that pass the acceptance test. Do not divide by the number of requests, agent sessions or outputs generated unless those are exactly the outcomes your business values. Measuring cost per completed task as the unit economics of AI agents ensures only finished deliverables are counted.
For a production workflow over a reporting period, calculate:
CPT = (model + tools + compute + failure handling + human work + allocated workflow costs) ÷ accepted tasks
Suppose an agent processes 500 invoice tasks in a month. It uses $220 of model calls, $70 of extraction and validation services, and $40 of compute. Staff spend 18 hours reviewing exceptions and corrections. At an assumed loaded labour cost of $60 per hour, that labour adds $1,080. If 450 invoices meet the acceptance criteria, measured cost per completed task is $1,410 divided by 450, or $3.13.
Those figures are an illustration, not a benchmark. The point is that the $220 model bill is not the cost of processing the invoices. If staff time is already captured in a separate operational budget, show both the direct cash cost and the fully loaded cost. Do not omit labour simply because it does not appear on an AI invoice. Accounting for these broader factors reflects comprehensive AI agent production cost and TCO models across enterprise workflows.
Decide whether shared costs belong
Some costs are easy to connect to one task. A model call has a task identifier. A general platform environment may support many workflows. Allocate shared costs only when the allocation method is understandable and stable. You might allocate a workflow's monitoring or hosting cost by task volume, but document the basis and review it when usage changes.
Avoid false precision. If a shared platform costs $10,000 a month and supports many use cases, assigning cents of that amount to a single task may not help an operational decision. Report direct variable cost per task separately from fully loaded cost, and make the distinction clear.
For comparing AI with a current process, use the same boundary on both sides. Include the current process's labour, software, rework and quality checks. Comparing the agent's full cost with only one slice of manual labour creates a misleading business case.
Separate cost from value
Cost per completed task answers how much it costs to produce an accepted outcome. It does not say whether the outcome is worth buying. A $3 task may be attractive if it reliably replaces a larger cost or shortens a meaningful delay. It may still be a poor investment if the process is rare, the work is low value, or the agent creates risk that requires extensive controls.
Track value and cost as separate measures. Examples of value measures include time returned to the team, faster turnaround, fewer errors or greater capacity. Set the method for measuring each before launch. Do not treat an estimated time saving as cash saved unless it changes staffing, capacity or spend in a way the business can verify.
How do retries, failures and success rates change unit cost?
An agent attempt is one run at a task. It may contain several model calls, tool calls and decisions. Some attempts fail, some succeed and some return an answer that a person must repair. Counting only successful runs' direct charges hides the cost of failures that consumed resources along the way.
Consider an agent with an average direct cost of $0.80 per attempt and an 80% acceptance rate. Over 100 attempts, it costs $80 and produces 80 accepted tasks. Before human follow-up, direct cost is $1 per accepted task, not $0.80. The remaining 20 failed attempts still cost money.
Now include failure handling. If each of the 20 unsuccessful tasks requires six minutes of human repair at a loaded cost of $60 per hour, the repair cost is $120. Total cost is $200 for 80 accepted tasks, or $2.50 per completed task. This example assumes the repair results in an accepted task. If some work remains incomplete, those cases add cost without adding to the denominator.
This is why a cheaper model can be more expensive in production. A lower rate per call does not help if the workflow needs more calls, retries or review to reach the same quality bar. Conversely, a more capable model is not automatically better value. Measure acceptance rate and total workflow cost together.
Reliability compounds across steps
An agent often performs a sequence of actions. If a task requires every step to be correct, the chance of a fully correct run can fall as the number of steps grows. For a simple illustration, if each of 15 steps succeeds independently 95% of the time, the chance that all 15 succeed is 0.95 to the power of 15, or about 46%.
That calculation is an illustration of compounding, not a forecast for a particular agent. Real steps are not necessarily independent, and a workflow can detect and recover from some errors. But it explains why a strong-looking per-call success rate does not guarantee a strong end-to-end completion rate. This dynamic shapes the agent cost curve, where compounding failure across multi-step chains escalates the true cost of an accepted task.
The practical response is not always to choose a larger model. Reduce unnecessary steps, validate high-risk actions, use deterministic checks where possible, and give the agent a safe way to stop and ask for help. Then measure whether those changes improve accepted outcomes per dollar.
A task needs a quality gate
An agent can produce a plausible answer that is wrong. Define acceptance criteria before tracking completion. They can include:
- Required fields are present and match source records.
- A code change passes the relevant automated tests and human review.
- A customer response follows the approved policy and has the right factual support.
- An exception is correctly identified and routed, not silently ignored.
- A person with the appropriate authority approved an action that cannot be safely automated.
Quality gates should reflect the risk of the task. A low-risk draft may only need a sample review. A payment instruction or regulated customer decision may need stronger validation and human approval. A task that is cheap but fails its control requirements is not completed.
Why do median and tail costs both matter?
The median is the middle result when you sort task costs. Half of tasks cost less than the median and half cost more. It describes a typical task, but says little about unusual expensive runs.
The 95th percentile, often written P95, is the cost below which 95% of observed tasks fall. P99 is the equivalent threshold for 99% of tasks. These figures help reveal the long tail: occasional tasks that consume much more than normal because they trigger repeated searches, oversized context, failed tools or multiple model attempts.
Suppose 95% of tasks cost $0.50 and 5% cost $12. The median is $0.50, but the mean is $1.08. If your dashboard only displays the median, it hides a material part of expected spend. If you report only the average, you may miss whether the expensive tail comes from a small group of identifiable failure modes.
For each workflow, review at least:
- Cost per accepted task, both direct and fully loaded.
- Acceptance rate and failure rate.
- Median, P95 and, once you have enough observations, P99 cost.
- Number of attempts and model or tool calls per task.
- Human review and repair time.
- Quality or error measures after completion.
A percentile based on very few observations can be unstable. Show the number of tasks measured and compare like with like. For example, separate short invoices from complex exceptions rather than combining them into one average. Use a reasonable reporting period and label it.
The pattern in the tail is often more actionable than the overall bill. A handful of tasks may repeatedly fail because a source system is unavailable or a document is unusual. Fixing that condition can improve both service quality and unit economics. A task cap can also limit damage while the underlying issue is investigated.
How do you measure task costs in production?
You need an end-to-end record that links cost and outcome to the same task. Without that link, a model invoice and a workflow completion report cannot reliably produce cost per completed task.
1. Give every task an identifier
Create a unique task ID when work enters the workflow. Carry it through model calls, tool requests, retries, sandbox work, human review and the final outcome. Do not use a person's name, email address or other sensitive information as the identifier.
A trace is a record of the connected steps in one task. Each step should record enough information to explain what happened: its timestamp, component, status, duration, cost or usage where available, and any relationship to a retry or parent step. Keep sensitive prompt content out of general logs unless you have a clear need and appropriate controls.
OpenTelemetry provides conventions for collecting and correlating telemetry across systems. Its GenAI semantic conventions can inform how teams represent model and agent activity. Treat conventions as a starting point, not a substitute for your own task and outcome definitions.
2. Capture actual usage and external charges
Record provider-reported token usage and the model identifier for each request. Capture cache reads and writes when the provider exposes them. For tools, log the service, request outcome and any billable unit. For compute, record resource usage or a consistent task-level allocation.
Keep a reconciliation between your telemetry and invoices. Usage data may be delayed, rounded or priced differently from a simple token count. Apply the actual provider rate applicable to the usage date and model. A cost dashboard that uses yesterday's rate card indefinitely will drift.
3. Record retries as part of the original task
A retry is another attempt to complete the same underlying business task. Give it its own attempt identifier, but retain the shared task ID. That lets you see both the cost of the attempt and the accumulated cost of the task.
Distinguish a planned retry, such as one permitted retry after a transient service error, from an uncontrolled loop. Track why a retry happened and whether it improved the outcome. If you simply count the final successful run, you lose the charges for everything that preceded it.
4. Record human work, not just handoffs
A handoff is not a cost measure. Record the minutes spent reviewing, correcting or finishing the work, plus the labour rate or cost convention used in the analysis. You might capture this through workflow timestamps, a reviewer estimate or a periodic time study. State which method you use and its limits.
Separate review that would happen in the manual process from incremental review caused by the agent. Both may belong in a full comparison, but the distinction helps explain whether automation reduced or increased work.
5. Define an accepted outcome and report it consistently
The task owner should define the acceptance test with engineering, operations and risk stakeholders. Record the result as accepted, rejected, escalated or still open. Do not count a handoff as success unless the business outcome has actually been achieved.
A structured AI readiness assessment can help teams identify whether they have the data, process ownership and controls needed to measure an AI workflow before scaling it.
Which engineering choices reduce cost without hiding quality problems?
Optimise the task journey, not just the rate card. A sensible sequence is to establish a baseline, find the expensive or unreliable steps, make one change, and compare cost and acceptance quality on the same task mix.
Use prompt caching carefully
Prompt caching lets a provider reuse repeated prompt content instead of processing it as entirely new input each time, subject to that provider's rules. This can help when many tasks share a large stable instruction or reference prefix. It does not make the full task free, and the effect depends on cache eligibility, reuse and provider pricing.
The Anthropic prompt caching documentation explains its cache behaviour and pricing. Detailed evaluations of Anthropic prompt caching pricing show how cache write and read rates influence recurring agent loops. The OpenAI prompt caching guide describes that platform's approach. Check the current documentation before estimating savings because eligibility, rates and feature behaviour can change.
Keep stable instructions and tool definitions together where the platform's caching rules allow. Avoid changing the reusable portion for every task without a reason. At the same time, do not keep stale business rules in a cache to chase a lower bill. Correctness and policy currency come first.
Measure cache hit rates and actual cost per accepted task. A high hit rate is useful only if the cached material is relevant, the workflow remains correct and the total task cost falls. Compare the observed invoice and usage records, not a theoretical discount alone.
Route work to the right model
Model routing means choosing different models for different steps. A straightforward classification or formatting step may need less reasoning than resolving an ambiguous exception. You can send simpler tasks to a lower-cost model and reserve more capable models for work that benefits from them.
Start with a representative evaluation set. Compare models on acceptance rate, error severity, latency and full task cost. Include the cost of any additional calls and human review. If a lower-cost model needs frequent escalation, its apparent rate advantage may disappear.
Do not choose a model solely because its advertised input price is low. Output volume, reasoning behaviour, cache treatment and task success all affect the bill. Recheck the choice when task mix, provider rates or model versions change.
Reduce avoidable context and tool work
Context is the information supplied to a model for a request. Sending every document, conversation or system record can increase cost and make the relevant facts harder to find. Retrieve only the information needed for the task, and use structured queries or deterministic checks when those can answer a question reliably.
For engineering agents, an index or syntax-aware code tool can locate relevant parts of a repository without asking a model to read every file. For business workflows, filtering records before model processing can avoid sending irrelevant data. These choices take design effort, so validate that they improve measured cost and quality.
A tool call is an operation the agent asks another system to perform, such as searching a record, running a test or creating a draft. Give each tool a clear purpose and limited permissions. Tool descriptions and outputs should be concise and predictable. A tool that returns an entire database when the agent needs one field adds cost and risk.
Teams building these interfaces can consider MCP server development. MCP, or Model Context Protocol, is a standard way for AI applications to connect to tools and data sources. It can organise access, but it does not automatically make a workflow cheaper or safer. You still need appropriate permissions, efficient queries and useful telemetry.
Set a step limit and a spend limit
A circuit breaker is a control that stops or changes a process when a defined limit is reached. For an agent, limits can include the maximum number of steps, tool calls, retries, elapsed time or spend per task. Choose limits from observed task needs and risk, not from a generic rule.
Define what happens when a limit is reached. The agent might return a partial result, ask for a human review, or place the task in an exception queue. The important thing is that it stops spending without making the task appear complete.
Use both a soft threshold and a hard ceiling where appropriate. A soft threshold can trigger a warning or route work to a cheaper, simpler path. A hard ceiling prevents further automated action. Test limits against legitimate complex cases so that they do not block normal work without a clear explanation.
Batch work only when delay is acceptable
Some providers offer batch processing for asynchronous work, where requests can be submitted for later completion. This can suit back-office tasks that do not need an immediate response. It is a poor fit for a customer waiting in a live conversation or an operational decision that cannot wait.
The OpenAI Batch API documentation explains the service's current behaviour and terms. Confirm the applicable completion window, price and limits directly with the provider before including any saving in a business case. A lower model charge is not a saving if the delay creates extra handling or misses a service requirement.
How should finance treat human review and escalation?
Human supervision is part of the operating model, not an incidental cost. It can also be the control that makes a workflow safe enough to use. The aim is not to remove every person from every task. It is to put human effort where it adds value and measure the cost accurately.
Calculate reviewer cost using an agreed loaded rate. A loaded rate is an estimate of total employment cost per working hour, not just salary divided by hours. The organisation's finance team should set the method and assumptions. If you use an illustrative rate of $60 per hour, six minutes of review is $6. That is simply arithmetic based on the stated assumption, not a market wage benchmark.
Measure review time by task type. A sample of straightforward tasks may take little time to approve, while unusual cases require investigation. One average can hide this difference. Report review minutes for accepted tasks, escalated tasks and rework separately where practical.
Human review can improve unit economics when it prevents expensive errors, catches uncertain cases early or provides a safe route to completion. It can undermine the case when every output requires lengthy review that costs more than the work the agent replaces. Compare against the current process and include the quality of the result, not just minutes saved.
Design the review queue intentionally:
- Send high-risk or low-confidence cases to a person before an irreversible action.
- Give reviewers the source evidence and the agent's reasoning summary needed to check the result.
- Capture the reason for rejection or correction so engineering can fix recurring failure modes.
- Sample-check low-risk work if the process and risk owner agree that sampling is sufficient.
- Keep the human decision and the agent's proposal distinct in the audit record.
For regulated workflows, review the relevant obligations and internal controls before deployment. An agent's low cost does not replace accountability for a decision. In financial services, PADISO's work on AI for financial services in Sydney focuses on putting AI into operating contexts where controls and evidence matter.
How can CFOs and engineering leaders set a useful operating review?
Create a monthly or fortnightly review around a small set of measures. The right cadence depends on task volume and risk. A new workflow with volatile costs may need more frequent monitoring than a stable background process.
| Measure | Question it answers | Owner to involve |
|---|---|---|
| Cost per accepted task | What does one valid outcome cost? | Finance and workflow owner |
| Acceptance rate | How often does the agent meet the standard? | Operations and product |
| Human minutes per task | How much work remains with staff? | Operations |
| P95 task cost | What does the expensive tail look like? | Engineering and finance |
| Retry and escalation rate | Where does the workflow fail or ask for help? | Engineering and operations |
| Quality and control exceptions | Is the process safe and accurate enough? | Risk and process owner |
Set a baseline before optimisation. Record task mix, volume, model and workflow versions, acceptance rules and the labour assumptions. When you change a prompt, model or tool, identify the release and compare like-for-like tasks. Otherwise, a change in complexity can look like a performance improvement or cost regression.
For material workflows, set an owner for the unit economics. Finance can validate cost assumptions and reporting. Engineering can instrument and improve the workflow. Operations can define what constitutes accepted work. Risk or compliance can specify control requirements. No single team has the full answer.
Do not set a target only for lower cost. Pair a cost target with a quality floor and a service or risk measure. For example, a cost reduction that increases wrong outcomes or pushes more work into an untracked manual queue is not a real improvement.
Where PADISO fits
PADISO helps teams move from a promising agent demo to a workflow with clear outcomes, cost visibility and operating controls. Our AI agents and automation service works across agent design, integration, evaluation and production operations. A sensible first step is to map one task from intake to acceptance, identify the costs and failure paths, then establish a baseline before changing the system.
The next step
Choose one agent workflow and calculate its current cost per accepted outcome, including retries and human follow-up. If you need to check whether the organisation is ready to measure and scale that work, take PADISO's AI readiness test.