# What an AI agent costs to run.

> The build is a one-off. The run is a bill that arrives every month. It is predictable once you know what drives it.

Published 2026-11-20

## The short answer

An AI agent’s running cost is its cost per run multiplied by how many runs you do. Cost per run is mostly model usage: how much text the agent reads and writes, and on which model. Add the tools it calls, the infrastructure it runs on and the minutes a person spends approving its work. Measure all four during the pilot and the monthly bill stops being a surprise.

## Four things you pay for

- **Model usage**: Charged per token, the unit of text a model reads and writes. Output usually costs several times more than input. This is normally the largest line.
- **Tools**: Search, document parsing, third-party APIs. Some are free, some charge per call.
- **Infrastructure**: Where the agent runs, its queue, its database and its logs. Usually small next to model usage.
- **People**: Review and approval time. Often the biggest real cost, and the one nobody puts in the spreadsheet.

## Cost per run

`cost per run = (input tokens × input price) + (output tokens × output price) + tool calls + review minutes × hourly rate`

An agent is a loop, so the input is not counted once. Every step sends the conversation so far back to the model. A ten-step run reads its own history ten times. That is why long runs cost more than their length suggests, and why trimming context is the first lever to pull.

1. **Count the steps.** How many model calls does a typical run make?
2. **Measure the tokens.** Input and output per step, from real traces, not estimates.
3. **Multiply by the price** of the model each step uses.
4. **Add tools and review time.**
5. **Multiply by volume.** Runs per month, including retries.

## What brings the bill down

In rough order of effect. All of them need evals, so you can tell that quality held.

| Lever | What it does | Watch out for |
| --- | --- | --- |
| Model routing | A small, fast model for routine steps; a strong one only for the hard ones | Needs evals per step to know which is which |
| Prompt caching | Repeated instructions and documents are billed at a fraction of the price | Only helps when the start of the prompt stays identical |
| Context trimming | Send the model what the step needs, not the whole history | Trim too much and the agent forgets |
| Batch processing | Work that can wait is run later at a discount | Not for anything a person is waiting on |
| Fewer steps | Better tools mean fewer attempts | Costs engineering time up front |
| Narrower review | People approve only what is risky | Widen autonomy on evidence, not on hope |

## Setting a budget that holds

- **Measure during the pilot.** Cost per run from real traces is the only number worth planning on.
- **Set a cap per run.** A runaway loop should stop itself, not run all night.
- **Alert on drift.** A prompt change or a model upgrade can double usage quietly.
- **Report cost per outcome.** Cost per invoice reconciled, per ticket closed. That is the number the business can judge.
- **Re-price twice a year.** Model prices move. Routing decided six months ago may be wrong today.

> **Where we come in**
>
> Cost per run is one of the numbers a [pilot](https://ligergroup.com/services/ai-agent-development/) has to produce, next to accuracy. If you have an agent whose bill surprised you, an [AI readiness audit](https://ligergroup.com/services/ai-readiness-audit/) finds where the tokens go.

---

Liger Group · Software engineering and agentic AI consulting · info@ligergroup.com · Source page: https://ligergroup.com/insights/what-does-an-ai-agent-cost/
