Your AI agent’s monthly model bill is $480. It attempted 10,000 tasks. Does each task cost $0.048?
That is the model-only cost per attempt. Tools, infrastructure and the number of successful outcomes change the full delivery-cost calculation.
At Revinci, our cost-to-serve approach connects consumption with the customer, agent and workflow behind it. Here’s a reproducible AI agent cost calculation using one monthly example.
TL;DR
- Define the deployment, period and task before calculating.
- Combine direct delivery costs with an explained shared-cost allocation.
- Count recorded retries and failed work once.
- Separate cost per attempt from cost per accepted outcome.
- Validate the result before using it for pricing or margin decisions.
How Do You Calculate Cost-to-Serve Per AI Agent?
Add the agent’s attributable model, tool, infrastructure and other delivery costs for a defined period, including an appropriate share of shared costs. Divide the total by task attempts or accepted outcomes to calculate the corresponding unit cost.
Monthly agent cost-to-serve = Direct delivery costs + Allocated shared delivery costs
All amounts and rates below are illustrative assumptions, not current provider prices, benchmarks or Revinci customer data.
Step 1: Define the Agent, Period and Task
“Per agent” might mean an agent product, deployed instance or execution. Our example measures one support-agent deployment serving one customer for one month.
| Measurement | Definition |
|---|---|
| Task attempt | One separate support task, including internal calls and retries |
| Accepted outcome | A task that resolves the issue and passes an automated quality check |
| Monthly volume | 10,000 attempts; 8,500 accepted outcomes |
Every task has a final status by period-end. No accepted task is counted twice. In practice, identify unfinished work separately.
Step 2: Set the Delivery-Cost Boundary
Include attributable model usage, tools, APIs, serving infrastructure and shared production resources. Include required human review or exception handling where incurred.
Keep initial development, sales, marketing and unrelated overhead separate from this operating-cost example.
Our automated acceptance check’s model calls are included in model usage; its other operating costs sit within infrastructure. No separate human-review charge is assumed.
For attribution principles, read AI Cost Observability: From LLM Spend to Customer Cost-to-Serve.
Step 3: Calculate Model and Tool Costs
Usage-category cost = Chargeable units ÷ Pricing unit size × Applicable rate
For example, divide tokens by one million when the rate is quoted per million tokens.
| Illustrative monthly usage | Assumed rate | Cost |
|---|---|---|
| 120 million uncached input tokens | $2 per million | $240 |
| 24 million output tokens | $10 per million | $240 |
| Total model cost | $480 |
This simplified deployment has no separately billed cached usage. Actual calculations should follow provider-specific categories, discounts and rates applicable when consumption occurred.
The volumes include retry, validation and unsuccessful-task calls. Do not add another retry percentage to costs that already include those calls.
Add $120 for external tools/APIs and $100 for dedicated infrastructure:
Direct delivery cost = $480 + $120 + $100 = $700
For collection requirements, see LLM Cost Tracking Across Providers.
Step 4: Allocate Shared Infrastructure
Suppose an eligible shared infrastructure pool costs $600 monthly. The deployment accounts for 25% of measured resource consumption:
Allocated shared cost = $600 × 25% = $150
Use a driver suited to the resource, such as compute time or storage consumption. Task count is appropriate only when it reasonably represents resource use.
Document the allocation rule. Exclude infrastructure already charged directly.
Step 5: Calculate Monthly and Per-Task Costs
| Component | Monthly cost |
|---|---|
| Model usage, including recorded retries | $480 |
| Tools and APIs | $120 |
| Dedicated infrastructure | $100 |
| Allocated shared infrastructure | $150 |
| Monthly agent cost-to-serve | $850 |
The denominator determines which question the result answers:
| Measurement | Calculation | Result |
|---|---|---|
| Model-only cost per attempt | $480 ÷ 10,000 | $0.048 |
| Full delivery cost per attempt | $850 ÷ 10,000 | $0.085 |
| Full delivery cost per accepted outcome | $850 ÷ 8,500 | $0.10 |
Adding tools and infrastructure raises cost per attempt from $0.048 to $0.085.
The acceptance rate is 8,500 ÷ 10,000 = 85%. Dividing $0.085 by 85% gives $0.10 per accepted outcome, including the cost of unsuccessful work.
These are monthly averages including allocated infrastructure, not necessarily the incremental cost of one additional task.
For pricing AI agents, this establishes the delivery-cost baseline. AI agent unit economics also requires the relevant revenue.
Step 6: Validate the Result
Before using the calculation, confirm:
- Costs and task counts cover the same deployment and period.
- Duplicate records are removed.
- Failed work and shared costs appear once.
- Missing attribution and provisional amounts are visible.
- Differences from provider-reported totals are explainable.
Label incomplete figures as estimates. For subsequent AI cost management decisions, read AI Agent Cost Management.
Connect Cost-to-Serve With Revinci
Our SmartCost capability provides customer-, agent- and workflow-level visibility across tokens, compute, storage and APIs, with reusable cost profiles by agent class.
Bring an anonymised deployment scenario to a Revinci SmartCost walkthrough to assess how your records support repeatable cost-to-serve reporting.
Frequently Asked Questions
How much does an AI agent cost per task?
There is no universal amount. Divide attributable delivery costs by a defined task count. Our illustrative example costs $0.085 per attempt or $0.10 per accepted outcome; neither is an industry benchmark.
How does cost-to-serve support an AI agent gross margin calculation?
Gross margin percentage is (Revenue − Cost of Revenue) ÷ Revenue × 100. Use comparable periods and a complete applicable cost-of-revenue boundary. This example’s defined delivery costs do not automatically represent every cost required for gross-margin reporting.
How does this relate to outcome-based pricing for AI?
Accepted outcomes measure delivery quality. Billable outcomes must meet the customer’s contractual definition. Confirm that distinction before comparing cost per accepted outcome with outcome-based revenue.