Skip to content

How much does an AI agent cost to run? Numbers from 4 builds

TL;DR

An AI agent costs three things to run: the model calls, the systems it drives, and the guardrails that stop it failing quietly. The model you pick moves the token bill most: a thousand identical agent steps cost USD 0.46 on DeepSeek V4.1 Flash, USD 0.65 on Claude Haiku 5.5 and USD 26 on Claude Opus 5.5. In four systems I built this year, model calls were also the easiest part to cap: USD 0.05 for a background check, USD 2.10 at most for a full research run. Proxy traffic for one price benchmark run cost USD 3.08, and the costly surprises were failures nobody saw, like an outage that ran for 8 days before it was noticed.

I’m Denys, a full-stack and AI engineer. Most articles on this question quote wide ranges with no project behind them. Below are the meters from four things I built and run, with the source of every number: config files, commit messages and measured runs. Where a number is a ceiling I set rather than a bill I paid, I say so.

What do you pay for when you run an AI agent?

Three meters, and the model is only one of them.

Build What the AI does Model cost per unit What else runs the bill
Personal assistant agent Chats on Telegram, works the CRM and email, runs web research USD 0.00065 to 0.026 per step, depending on the model; ceilings from USD 0.05 to 2.10 per run One server, plus retries and watchdogs
Price benchmark for a travel agent A separate AI agent starts benchmark runs through an MCP server Zero on my side: that agent pays its own tokens Proxy traffic, about USD 3.08 per run, and an 8-core server
Live broadcast audio check Detects speech and the spoken language on every channel Zero per call: two small models run on the site’s own computer CPU: a 32-channel demo used about 0.9 of a 2-core cloud server
Property certificates Reads unknown portals like a person would Tokens only for portals the scripts do not know Scripts handle the known portal with no tokens at all

The pattern held in all four: the cheapest token is one you never send, and the expensive hours go into the parts around the model.

How much do the model calls cost?

The assistant is the only one of the four where the model bill is mine. It runs on Anthropic’s Claude Agent SDK, and every agent in it has a hard ceiling in code. The SDK stops a run when it reaches the turn limit or the dollar limit.

Job Model Ceiling per run
Background check while idle Claude Haiku 4.5 USD 0.05, and USD 1.00 per day in total
Research: split the question Claude Opus 4.6 USD 0.10, 1 turn
Research: three researchers in parallel Claude Opus 4.6 USD 0.50 each, 3 turns, web search and fetch
Research: write the answer Claude Opus 4.6 USD 0.50, 1 turn
Main conversation Haiku, Sonnet or Opus, see below 200 turns or USD 50, a safety net rather than an expectation

So the most a full research run can cost is USD 0.10 + 3 × 0.50 + 0.50 = USD 2.10. That is a ceiling, not an average; what a run really costs depends on the model, which the next section prices.

Two choices cut the bill more than any price change:

  1. Route each message to the cheapest model that can handle it. Short, simple messages go to Haiku, moderate ones to Sonnet, multi-step ones to Opus. The router reads keywords and message length, so routing itself costs no model call. Early on, every agent ran on Opus.
  2. Delete calls that do not earn their place. The background check used to ask the model for a status report every cycle. It had no access to email or the CRM, so all it could do was write messages nobody needed. I removed the model call entirely. The USD 1.00 daily cap is still in the config, guarding nothing.

One honest gap: the SDK reports the cost of every call, and I never stored it. The monthly total lives in the Anthropic console, not in the app. If I built it again, I would log cost per call from day one, so you can see which job spends the money, not only how much.

How much does the choice of model change the bill?

More than anything else on the token side. Below, one agent step is priced on different models. The step is about 4,000 tokens in and 500 out, the per-call estimate written into the assistant’s own code for its background check. Prices are OpenRouter’s list on 15 October 2026. OpenRouter passes through each provider’s list price and takes its fee when you buy credits (5.5% on the standard plan), not per request.

Model Price per 1M tokens, in / out One step 1,000 steps
DeepSeek V4.1 Flash USD 0.024 / 0.72 USD 0.00046 USD 0.46
Claude Haiku 5.5, GPT-6 Luna USD 0.10 / 0.50 USD 0.00065 USD 0.65
Qwen3.8 Flash USD 0.15 / 0.47 USD 0.00083 USD 0.83
Mistral Small 4 USD 0.15 / 0.60 USD 0.00090 USD 0.90
Llama 4 Maverick USD 0.188 / 0.652 USD 0.0011 USD 1.08
Gemini 3.5 Flash Lite USD 0.30 / 2.50 USD 0.0025 USD 2.45
DeepSeek V4 Pro USD 0.955 / 1.911 USD 0.0048 USD 4.78
Gemini 3.8 Flash USD 0.75 / 3.75 USD 0.0049 USD 4.88
Grok 4.7 USD 2 / 6 USD 0.011 USD 11
Claude Sonnet 5.5, GPT-6.1 Sol, Gemini 4 Argon USD 2 / 10 USD 0.013 USD 13
Claude Opus 5.5 USD 4 / 20 USD 0.026 USD 26
Claude Fable 5.1, GPT-6 Astra USD 10 / 50 USD 0.065 USD 65
Cost of 1,000 identical agent steps. One step: 4,000 tokens in, 500 out. USD, list prices. DeepSeek V4.1 Flash: USD 0.46; Claude Haiku 5.5: USD 0.65; Gemini 3.8 Flash: USD 4.88; Claude Sonnet 5.5: USD 13; Claude Opus 5.5: USD 26; Claude Fable 5.1: USD 65.
Source: OpenRouter list prices, 15 October 2026.

The same work costs from USD 0.46 to USD 65 per thousand steps, a spread of about 140 times. Three things follow:

  • A small model handles most steps. Sorting a message, pulling fields from a document, answering from a known text: these rarely need a top model. Keep the large ones for planning and hard reasoning, which is what the routing above does.
  • Prices move fast. The assistant ran on Claude Haiku 4.5, Sonnet 4.6 and Opus 4.6. On today’s list, the step costs USD 0.0065 on Haiku 4.5 and USD 0.00065 on Haiku 5.5. Anthropic notes that its newer models count about 30% more tokens for the same text, so per step the newer one is still almost eight times cheaper. Google’s Gemini 4 Argon is due to double its price on 1 December 2026. Re-check before you plan a year ahead.
  • Compare tasks, not token prices. A cheaper model that needs two attempts, or a longer prompt to behave, can cost more per finished task. Measure a sample of real tasks on two or three models before you choose.

Your own estimate is one line: steps per task × tasks per month × the step price of your model.

Why was context the real problem, not the price per token?

Price per token is predictable. Context is not. The bugs that hurt this assistant were all about how much text went into each call:

  • Long sessions broke replies. To answer faster, the app kept a warm session open between messages. When the context overflowed, the model started returning garbled text in mixed alphabets. The fix: recycle the session after 20 messages and retry in a fresh one when a reply looks broken.
  • A saved checkpoint grew too big. One day calls failed with “Prompt is too long”. The checkpoint injected into each call is now capped at 2 KB.
  • The system prompt carried files it rarely needed. Loading skills only when a message needs them saved about 3,000 tokens per call, and dropping three reference files from the preload saved about 1,500 more. These are estimates from the commit notes, not invoice lines.
  • History was longer than useful. The chat history sent with each call went from 20 messages to 10.

Every one of these lowers cost and speeds up replies at the same time. Treat context as a budget, the same way you treat money.

What does the infrastructure an agent drives cost?

In the travel price benchmark, the AI part is a separate agent. It starts benchmark runs through an MCP server I built, and its tokens are billed to whoever runs that agent. What the benchmark itself pays for is the scraping behind it: residential proxies and a server full of browsers.

Measured numbers from that system:

  • Proxy traffic: one run over two travel sites used about 935 MB, about USD 3.08, roughly 0.23 MB per price row saved.
  • Blocking trackers: on one site, blocking tracking scripts cut traffic from 4.2 MB to 2.5 MB per search, with identical prices in all six test runs.
  • No browser where none is needed: one site’s prices could be read with a plain HTTP client that looks like a mobile browser. Collection went from 8 to 43 dates per minute on five workers, and the browser code for that site was deleted.
  • CPU, not memory, sets the server size: with 20 browsers on an 8-core server, load was about 30 while 6 to 7 GB of RAM sat free. A warm browser takes about 345 MB. Size the server by cores.

If your agent drives browsers, proxies or paid APIs, those meters will likely outgrow the model bill. Measure them per task before you choose a model.

When is on-device AI cheaper than an API?

When the input never needs to leave the building and the model is small. The broadcast project checks live audio channels during sports broadcasts: silence, glitches, a commentator switching to the wrong language. Sending every second of audio to an API would cost money on every call and add delay.

Instead, two open models run on the venue’s own computer: one detects speech, the other names the language. Together they hold about 24 MB of weights, the speech detector adds about 7 MB of RAM, and there is no fee per call. In a 32-channel demo, analysing every channel in real time used about 0.9 of a 2-core cloud server.

The trade-off is accuracy you have to prove yourself. On a public set of clean read speech, 30 three-second clips per language, the language model was right 93.3% of the time for Portuguese and at least 96.7% for Spanish, English and French. That is a ceiling, not a forecast: crowd noise and music under a commentator were never measured, because no audio from a real broadcast circuit was available.

What does it cost to make an agent safe to leave alone?

This is the cost most estimates skip, and it is where my hours went. Some real failures:

  • An 8-day silent outage. Another project on the same server updated a shared browser cache. The scraper’s pool went from 40 working browsers to 0, jobs hung without an error, and nothing alerted anyone. The fix was small: give the scraper its own browser cache. Finding the cause took 8 days, because there was no alert on pool readiness.
  • A job that “succeeded” with nothing. One run went through 359 dates in 12 minutes, saved 0 rows and reported success. Jobs now stop after 25 empty dates in a row and say why.
  • A stopped run that kept spending. A benchmark marked as stopped kept running for 4 hours, using proxy traffic the whole time.
  • A proxy limit drained the pool. When the proxy plan hit its traffic limit, the pool shrank from 40 browsers to 0 in 12 minutes and stayed there until a restart. It now refills itself every 60 seconds, backing off to 5 minutes.
  • Too many alerts on day one. The first test of the broadcast tool on a real 16-channel feed, 49 minutes long, produced 3,492 events. 92.4% were noise and voice-change alerts, and the operator pressed Clear 182 times in 27 minutes. The detectors were fine; the thresholds had never met real programme audio. The fix was a per-profile switch, not new maths.
  • Hung calls and rate limits. The assistant now has a 120-second watchdog for a call that goes quiet, a 300-second limit on the whole call, and up to 3 retries after 30 seconds, 2 minutes and 5 minutes when the API is overloaded or rate-limited. A hung tool call does not fall through to the backup models, because a slower model will not fix a stuck tool.

None of this shows up as a token price. It shows up as hours, and as trust lost when the agent says “done” and is wrong. Budget for it: a first test on real data, alerts on the things that can go silent, and checks that a “success” produced something.

Where does AI fit when scripts can do most of the work?

At the edges. The property certificate service collects papers from property managers’ online accounts and builds the certificate a seller needs. A script handles the main known portal, where 95% of documents are completed. Vision AI reads only the portals the scripts do not know, and that path sits behind a switch that turns it off at once.

For the people who order them, a certificate now takes 2 to 3 minutes instead of 2 to 3 weeks, and costs EUR 99 instead of EUR 200 to 300. The AI is the smaller part of that pipeline on purpose: scripts are cheap and predictable where they work, and the model is used where only reading like a person will do.

How do you estimate the running cost of your own agent?

Before you ask for a quote, write down five numbers:

  1. Tasks per month. Messages, documents, runs.
  2. Model calls per task, and which model each needs. Most tasks do not need the top model.
  3. Tokens per call. System prompt, history, documents. This is where costs grow quietly.
  4. The other meters. Proxies per MB, paid APIs per call, servers per core.
  5. A ceiling for each job. A per-run dollar cap in code, not only a monthly limit on the account.

Then add the cost nobody quotes: a test on real data in week one, alerts for silent failures, and someone to read them.

What these numbers do not tell you

The ceilings above are limits I set, not what was spent, and the model table is list prices, not my invoices. Every project number comes from one system and one period. Model prices change often, so check the vendors’ current pricing pages before you plan. And none of this says how long the builds took or what they cost to build; that depends on the integrations far more than on the AI.

If you are planning an agent and want to compare notes on what it will cost to run, I am happy to look at your numbers. My AI agent development page shows how I work, and the property certificate case, broadcast audio case and travel price case show three of these builds in more detail. For a bot on WhatsApp, the channel fees often outweigh the model; I worked them out per country in what a WhatsApp AI chatbot costs.

Sources