How Much Does It Cost to Run an AI Agent in Production?
Published ranges for AI agent costs disagree by 10x. Here is the actual formula, modeled against real 2026 API rates, so you can price your own workload.
By Capital & Compute
Search “how much does it cost to run an AI agent in production” and you’ll get answers that disagree by an order of magnitude. One guide says $400 to $7,500 a month. Another says $3,200 to $13,000. A third, $15 to $15,000. None of them show their work.
That’s not because the question is unanswerable. It’s because nobody states the three numbers that actually decide the bill: how many tasks the agent runs, how many tokens each task burns, and which model is doing the burning. Fix those three and the rest is arithmetic.
The short answer
A production AI agent running roughly 100 moderately complex tasks a day, on a mid-tier model like Claude Sonnet 5, lands around $2,700 to $3,000 a month in token spend, plus $100 to $300 for hosting, a vector database, and monitoring. Swap in a budget model like DeepSeek V4 for the same volume and token spend drops to around $300 a month. Swap in a frontier model like Claude Opus 4.8 and it climbs past $4,500. Volume and model choice move the number more than anything else, which is exactly what the vague published ranges are hiding.
The formula behind every number in this piece
Every AI agent’s token bill reduces to one equation:
(tasks per day) x (tokens per task) x (per-token rate) x (30 days) = monthly token spend
“Tokens per task” splits into input tokens (the context the model reads: code, documents, prior messages) and output tokens (what it writes back). Most agent tasks are input-heavy: an agent re-reads a chunk of codebase or a document on every call before it writes a few hundred words back. This site’s cost-per-task modeling, used consistently across the pricing cluster, treats one moderately complex agent task as 200,000 input tokens and 20,000 output tokens (a multi-file context in, a diff or a short report out). That’s a modeled assumption, not a measurement of your workload, and it’s on the heavier side for a single-file chat query and lighter than a task that chains eight tool calls. Plug your own token counts into the AI coding cost calculator once you have real logs.
“Per-token rate” is the one number every competing article gets vague on, or worse, cites a rate for a model that’s no longer current. Here’s what it actually costs, per million tokens, from the site’s model registry, verified July 1, 2026:
| Model | Input ($/Mtok) | Output ($/Mtok) | Modeled cost, one task |
|---|---|---|---|
| DeepSeek V4 | $0.435 | $0.87 | ~$0.10 |
| Gemini 3 Flash | $0.50 | $3.00 | ~$0.16 |
| Claude Haiku 4.5 | $1.00 | $5.00 | ~$0.30 |
| Gemini 3.5 Flash | $1.50 | $9.00 | ~$0.48 |
| Claude Sonnet 5 | $3.00 | $15.00 | ~$0.90 |
| Claude Opus 4.8 | $5.00 | $25.00 | ~$1.50 |
| GPT-5.5 | $5.00 | $30.00 | ~$1.60 |
| Claude Fable 5 | $10.00 | $50.00 | ~$3.00 |
| Item | Value |
|---|---|
| DeepSeek V4 | $0.10 |
| Gemini 3 Flash | $0.16 |
| Claude Haiku 4.5 | $0.30 |
| Gemini 3.5 Flash | $0.48 |
| Claude Sonnet 5 | $0.90 |
| Claude Opus 4.8 | $1.50 |
| GPT-5.5 | $1.60 |
| Claude Fable 5 | $3.00 |
That’s a 30x spread for running the exact same task through different models. Nobody publishing a single “AI agents cost $X a month” number is telling you which end of that spread they’re standing on.
How much does it cost to run an AI agent per month?
Multiply the per-task number by volume, and the picture most guides paint as one blurry range splits into three very different bills.
| Usage tier | Tasks/day | DeepSeek V4 | Claude Sonnet 5 | Claude Opus 4.8 |
|---|---|---|---|---|
| Light (a solo dev’s assistant) | 10 | ~$30/mo | ~$270/mo | ~$450/mo |
| Medium (a small team’s production agent) | 100 | ~$300/mo | ~$2,700/mo | ~$4,500/mo |
| Heavy (an always-on customer-facing agent) | 1,000 | ~$3,000/mo | ~$27,000/mo | ~$45,000/mo |
That’s why the published ranges contradict each other so badly. A $400/month figure and a $13,000/month figure aren’t wrong, they’re describing different rows of this table and not saying so.
The non-token costs everyone glosses over
Token spend is usually the largest line item, but it isn’t the only one, and the “$400 to $7,500” style ranges tend to bundle these in without breaking them out:
- Hosting. A small VPS running the agent loop and its orchestration code runs $25 to $100 a month. Undersizing this is a real failure mode: a 1 vCPU / 1GB box will choke and drop tasks under concurrent load, and you’ll pay for the debugging time before you pay for the upgrade.
- Vector database, if the agent does retrieval. A managed tier runs $25 to $100 a month for small corpora; self-hosting on the same VPS is close to free but adds maintenance.
- Monitoring and logging. $15 to $50 a month for basic observability. Skipping this is how a runaway loop turns into a four-figure surprise before anyone notices.
- Idle and retry overhead. An agent that polls for work or retries failed calls burns tokens and compute even when it produces nothing. This is the least-modeled cost in every competing article, and it’s real: a stuck retry loop can add $10 to $50 in a single afternoon on nothing but repeated failed calls.
Stack those on a medium-volume Sonnet 5 agent and the all-in bill for a $2,700/month token spend lands closer to $2,850 to $3,050 once hosting, storage, and monitoring are added.
| Step | Change | Running total |
|---|---|---|
| Token spend | 2,700 | 2,700 |
| Hosting (VPS) | +60 | 2,760 |
| Vector database | +60 | 2,820 |
| Monitoring | +30 | 2,850 |
| All-in monthly bill | 2,850 | 2,850 |
What model tiering actually saves
The “cascade” pattern, using a cheap model to triage and a stronger model only when the task needs it, gets cited constantly as a 40 to 60 percent savings lever. Rarely with a worked example. Here’s one.
Take a medium-volume agent (100 tasks/day) running everything through Claude Sonnet 5: ~$2,700/month in tokens. Now split the workload: assume 70 percent of incoming tasks are simple enough for Claude Haiku 4.5 to handle end to end, and the remaining 30 percent need Sonnet 5. That’s 70 tasks/day at ~$0.30 and 30 tasks/day at ~$0.90:
(70 x $0.30 + 30 x $0.90) x 30 days = ($21 + $27) x 30 = $1,440/month
That’s a 47 percent reduction, in the middle of the commonly cited range, but it only holds if your triage step correctly routes the easy 70 percent without silently sending hard tasks to a model that can’t finish them. A cascade that misroutes and forces retries can erase the savings entirely, since a failed Haiku attempt followed by a Sonnet retry costs more than sending the task to Sonnet in the first place.
How to estimate your own agent’s cost
- Count your actual tasks per day, or estimate from expected usage. Don’t use someone else’s assumption.
- Log or estimate tokens per task from a handful of real runs. If you can’t measure yet, use 200,000 input / 20,000 output as a rough multi-file starting point and adjust once you have data.
- Pick your model and look up its rate in a current registry, not last year’s blog post.
- Multiply: tasks/day x tokens/task x rate x 30, using the formula above.
- Add $100 to $300 for hosting, storage, and monitoring depending on scale.
- Re-check monthly. Rates change (see the price reversal piece on why a cheaper sticker price doesn’t always mean a cheaper bill), and so does your task volume.
Frequently asked questions
Frequently asked questions
- Is it cheaper to run an AI agent 24/7 or only on demand?
- On demand is almost always cheaper unless the agent is genuinely busy most of the day. Token costs scale with tasks completed, not wall-clock uptime, so an agent sitting idle 24/7 mostly adds hosting and polling overhead without adding token spend. The exception is if "24/7" means constant background polling or scheduled checks, each of which is itself a task that burns tokens even when it finds nothing to do.
- How much does it cost to run an AI agent per task versus per month?
- Per-task cost for a moderately complex agent task ranges from about $0.10 (DeepSeek V4) to $3.00 (Claude Fable 5) at list API rates, for the same 200k-input/20k-output workload. Monthly cost is that per-task number multiplied by your task volume: a light workload (10 tasks/day) and a heavy one (1,000 tasks/day) can differ by 100x on the same model.
- Why is my AI agent bill higher than expected?
- The most common causes are retry loops (a failing task retried repeatedly multiplies token spend without producing output), an oversized context window re-sent on every call instead of cached, and routing simple tasks to an expensive frontier model by default instead of tiering by difficulty.
Bottom line
There’s no single honest answer to “how much does an AI agent cost,” because the question is missing two variables: how much you’ll run it, and which model does the work. Run the formula with your own numbers instead of borrowing someone else’s range: tasks per day, tokens per task, per-token rate, times 30, plus $100 to $300 for the infrastructure around it. On a mid-tier model at moderate volume, expect somewhere in the low thousands per month. On a budget model, a tenth of that. On a frontier model, several times more, for the same work.
See our editorial standards for how the numbers in this piece are sourced and verified.