Cost: What an agent actually costs
Two minutes of review can cost more than the tokens. Split human time, model, tools and execution.
The provider bill often shows you only the tokens. Tools, execution and human review sit on other bills. In the fictional example below, two minutes of review account for €1.20 of €1.364 per started task; the tokens come to €0.084. The figures are illustrative assumptions, not vendor prices. The full argument is in the Insight What an AI agent actually costs.
The unit-cost model
What matters is the cost per accepted result: all attributable costs / accepted results. Accepted means it meets the brief and someone then uses it. If no result is accepted, there is no useful cost per result. Report the money spent and the number of failed tasks.
| Category | Include | Common omission |
|---|---|---|
| Model | Input, output, caching and any other billed usage | Counting only the final call |
| Tools | Search, OCR, data access, external APIs | Charges appear on another invoice |
| Execution | Compute, sandboxes, storage, queues | Long runtimes and orphaned processes |
| People | Review, exceptions, corrections | Unrecorded “just two minutes” |
| Operations | Monitoring, debugging, maintenance and allocated implementation | Treating a working prototype as finished |
For a simple token tariff, each call costs input tokens / 1,000,000 × input price + output tokens / 1,000,000 × output price. Add every call and every service billed separately. Cache and specialist tariffs may not fit this short formula. Check with the provider which usage types are actually billed.
Why review dominates
Two minutes at €36 an hour is €1.20. Three model calls on the same task cost €0.060 of input and €0.024 of output under these assumptions, €0.084 together. Leave out review, tools and execution, and of the €1.364 only the two token lines remain.
“Just two minutes” per task is easy to leave off a timesheet, and in this example it is the largest line. Any rework beyond those two minutes is added on top. Rejected tasks incurred the costs too. Divide only by started runs, and the unit price sits below the price of the results you keep.
Worked example
Fictional calculation, not provider prices. One task requires three calls totaling 30,000 input and 3,000 output tokens. Assume €2 per million input tokens and €8 per million output tokens. The €36 hourly rate belongs only to this calculation; the ROI chapter uses its own €40. The rates are not aligned.
| Item | Cost per started task |
|---|---|
| Input: 30,000 / 1,000,000 × €2 | €0.060 |
| Output: 3,000 / 1,000,000 × €8 | €0.024 |
| External tools | €0.060 |
| Execution | €0.020 |
| Two minutes of review at €36 per hour | €1.200 |
| Total | €1.364 |
€1.364 is the price of one started task. Starting 1,000 tasks costs €1,364. If 900 are accepted, that is 1,364 / 900 ≈ €1.52 per accepted result.
Common miscounts
- An average with no outliers. For each task, write down total cost, call count, duration and outcome. Next to the mean, keep the 95th percentile, the threshold below which about 95% of observed costs fall. It is not a guaranteed ceiling, and it is unstable on a small sample.
- A retry with no reason. A temporary connection failure can justify another attempt. Requesting the same incorrect answer again, with no new information, usually just adds another line. Before you repeat a tool call that writes, check whether the first action already went through. Why repeats undermine reliability is in chapter 1, under
pass^k. - The budget left in the prompt. Several tasks run at once, and each of them sees the same balance left. Reserve it before the call. You set the limits outside the model: maximum call count, runtime, spend per task and total budget for the period. After the call, reconcile actual usage. When the provider reports usage late, the limit can be crossed if you did not reserve up front. Decide the exit as well: stop, hand the task to a person, or continue with a cheaper method.
- Cheaper on different tasks. A cheaper run that needs more repair by hand has not saved anything. Compare each change on the same tasks, in this order: remove unnecessary steps, select the relevant context, cache reusable data, handle simple tasks more cheaply, and escalate the remaining exceptions. AI Agents That Matter (Kapoor, Stroebl, Siegel, Nadgir, Narasimhan, 2024) weighs cost and performance together.
Sources
- AI Agents That Matter (arXiv:2407.01502, 2024) — evaluate cost and accuracy together.
- Building effective agents — extra autonomy has a price; a provider perspective.
Every euro amount, including €1.364 per task, €1.52 per accepted result and €36 an hour, is an original illustrative assumption, not a current price.
Deep dive: What an AI agent actually costs · Next chapter: Chapter 3: ROI — When an agent pays off
Cheat sheet: formulas and go-live checklist.