AgentCrafts

The expensive part of an agent is rarely the tokens

I've reviewed enough agent invoices to know where the money actually goes. It isn't the model calls, and it isn't the vector database.

The expensive part of an agent is rarely the tokens

When I quote a running cost for an agent project, people expect me to talk about token prices. That's the number everyone watches, and it's usually the smallest line on the bill.

Here's the shape of the last three systems I costed out.

The model calls are predictable

A typical agent run in the systems I build makes somewhere between six and twenty model calls. With a mid-tier model, sensible context management and a prompt cache, that lands in the low single-digit cents per run. Even at a few thousand runs a month, you're talking about a line item that doesn't threaten anyone's budget.

The exception is when something goes wrong in a loop. Which brings me to the actual problem.

Retries are where the money goes

One system I reviewed was spending four figures a month on a workflow that should have cost about eighty dollars. The agent was calling a flaky internal endpoint. When it failed, the tool returned generic error text, and the agent decided a sensible next step was to try again. Sometimes it tried again in a slightly different way. Occasionally it tried eleven times.

Watch out for:

  • Retry storms. No cap on attempts, no backoff, no budget check.
  • Loop drift. The agent re-plans because it can't tell whether the last step succeeded, so it redoes work it already paid for.
  • Re-read everything. Passing the full conversation and all retrieved documents on every call, so the same 40,000 tokens get billed twenty times.

That last one is the most common. Trimming context to what the current step actually needs is normally a 50 to 70% cost reduction with no quality loss, and it's a few hours of work.

The real cost is the human time

Then there's what never appears on the invoice: the person who checks the output.

If your agent produces work that someone has to read carefully before trusting, you haven't removed the task, you've moved it. And reading someone else's work critically is often slower than doing it yourself. I've watched teams celebrate a 70% time saving that didn't exist.

The honest question is not "how much does the agent cost to run?" It's "how much of a human's attention does it still require?" If the answer is "the same as before, but now with a review queue", the project hasn't landed yet.

Ways I've seen that fixed:

  • Move the approval gate so it only catches the risky 10%, not every run.
  • Make the output verifiable in seconds: cite the exact source line, show a diff, put the numbers in a table instead of prose.
  • Route simple cases straight through and hold only the ambiguous ones.

What I do now

Every agent I ship has three ceilings and one report:

  1. A max steps limit per run, after which it stops and asks.
  2. A spend cap per run and per day, enforced in code rather than trusted to the prompt.
  3. A context budget for each step, with retrieval scoped to that step.
  4. A weekly line in the logs: runs, failures, average steps, average cost, and how many needed a human to intervene.

Those four numbers tell you whether the system is healthy far better than watching the model bill. The token cost is a symptom. Steps, retries and human intervention are the disease.

Provider pricing pages change often, so it is worth checking the current numbers on the OpenAI pricing page rather than trusting a figure in an article.

If you want the commercial side of it, the AI agents service covers how I build and hand them over.

The AI agents service covers how I build this, and the pricing page explains what decides the cost.

The commercial side of it is on the hire page.

For the commercial side of it, the AI agents service covers how I build and hand over this, and the pricing page explains what decides the cost.


Reliability and cost

All blogs

Common questions

Questions about what an agent actually costs to run

How much does it cost to run an AI agent each month?

For the systems I build, the model calls are usually the smallest line: cents per run at a few thousand runs a month. The bill that hurts comes from retries, loops and sending the whole conversation on every call. Fix those and the monthly cost often falls by half or more. I put a spend cap in code so one bad night cannot turn into a surprise invoice.

Why is my AI agent so expensive to run?

Usually one of three things: no cap on retries, a loop that cannot tell whether the last step worked, or the full history and every document passed on each call. All three are fixable without changing the model.

Can you lower the running cost of an agent we already have?

Often, yes. An audit normally finds context that can be trimmed and retries that can be capped. I tell you what I expect to save before you pay for the work, and I tell you when the honest answer is that it is already cheap.

How do you stop an agent spending money overnight?

With a spend ceiling in code rather than a warning in the documentation. The run checks the cap before each paid call, and the cap belongs in the same place as the retry logic, where the loop can actually see it.

Does using a cheaper model fix the running cost?

Sometimes, and it is worth testing, but it is rarely the main answer. The model call is usually the smallest line. The cost is in the number of calls, which is a design problem about retries and context, not a pricing problem.

Is a vector database an expensive part of running an agent?

Rarely. Storage for documents and embeddings is cheap next to model calls. The exception is a system that re-embeds the whole corpus on every run, which is an architecture mistake rather than a hosting cost, and it is fixable by caching.

How do you know what an agent will cost before we build it?

From the volume, the number of steps in the workflow and the size of the context each step carries. Those three give a range with a real basis, and I put a cap in the code so the number cannot surprise you later.

Where this fits

An agent that takes a goal, works out the steps, calls your tools and keeps going until the job is done or a person needs to step in.

AI agents

Keep reading

Let's build

Let's discuss your workflow

Tell me what your team does by hand every week. I'll tell you honestly whether an agent or automation is the right answer, what it would take, and what it needs to keep running.