Insight
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.
01Short answer
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.
02Drivers
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.
03Formula
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.
- Count the steps. How many model calls does a typical run make?
- Measure the tokens. Input and output per step, from real traces, not estimates.
- Multiply by the price of the model each step uses.
- Add tools and review time.
- Multiply by volume. Runs per month, including retries.
04Levers
What brings the bill down
| 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 |
05Budget
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.
Start here
Let’s talk.
Tell us what you are trying to get done. You get a straight answer.