
How much does it cost to build an AI agent? A simple agent on a workflow tool costs a few days and under $2,000. A custom agent with real integrations runs roughly $10,000 to $40,000 to build. A production agent across several systems, with evals and monitoring, often lands at $50,000 to $150,000 or more. Then you pay to run it every month, and that bill depends on one formula: runs times calls times tokens.
Most quotes you'll see only cover the build. The build is the easy part to estimate. The number that surprises people is the monthly run cost plus the staff time spent checking the agent's work.
This guide gives you the three cost buckets, the formula for each, and a worked example you can redo with your own numbers.
01TL;DR
- Three buckets: build, run, maintain. Budget all three before you start, or the project gets killed at the first monthly invoice.
- Build cost tracks integrations, not intelligence. Each system the agent touches (CRM, inbox, database, billing) adds days of auth, error handling, and testing.
- Run cost = runs × model calls per run × tokens per call × price. Agents call the model many times per task, so per-run cost is 5 to 20 times a single chat reply.
- Human review is usually the biggest line. Two minutes of checking per run beats the token bill fast.
- Plan about 20% of the build cost per year for upkeep. Model upgrades, prompt fixes, broken integrations, and growing eval sets don't stop after launch.
02The three cost buckets
An AI agent is a model in a loop that calls tools until a goal is met. If you want the full mechanics first, the free AI Agents 101 resource covers them. For budgeting, the loop matters for one reason: every turn of it costs money.
Split the cost into three buckets that behave differently.
Build is a one-time number you can quote. Run scales with usage and shows up every month. Maintain is the slow leak nobody budgets for.
03Build cost: what you're actually paying for
The model itself is cheap to call. The build cost goes into everything around it. Here are the ranges I use for scoping, at typical contractor rates:
| Agent type | Example | Time | Rough build cost |
|---|---|---|---|
| Workflow agent on a no-code tool | Summarize new leads into a Slack channel | 1 to 3 days | Under $2,000 |
| Custom single-purpose agent | Triage support tickets, draft replies, tag the CRM | 2 to 6 weeks | $10,000 to $40,000 |
| Production multi-system agent | Read inbox, query billing, update CRM, escalate to humans | 2 to 4 months | $50,000 to $150,000+ |
What moves a project up the table:
- Number of integrations. Each system needs auth, rate-limit handling, error recovery, and a test account. Budget 2 to 5 days per integration, more if the API is old or poorly documented.
- Write access. An agent that only reads is far cheaper than one that sends email, issues refunds, or edits records. Write access needs permission scoping, approval gates, and an audit log.
- Accuracy bar. "Useful draft a human edits" is a short project. "Right 98% of the time with no review" needs a real eval set (100+ graded examples) and many rounds of tuning.
- Data cleanup. If the agent depends on your docs or database, the hours spent fixing messy source data often match the agent work itself.
The cheapest build is the narrowest one. One job, one or two tools, read-only to start.
04Run cost: the formula
Agents don't make one model call per task. They plan, call a tool, read the result, call another tool, and write a final answer. Six to fifteen model calls per run is normal, and each call resends the growing conversation history.
The formula:
Monthly token cost = runs per month × calls per run × (input tokens × input price + output tokens × output price)
Worked example, a support triage agent:
- 3,000 tickets a month
- 6 model calls per ticket
- About 8,000 input tokens and 600 output tokens per call (system prompt, tool definitions, ticket, history)
- Example mid-tier pricing of $3 per million input tokens and $15 per million output tokens
Per ticket: 48,000 input tokens costs $0.144, and 3,600 output tokens costs $0.054. That's about $0.20 per ticket, or $600 a month.
Now turn on prompt caching. The system prompt and tool definitions repeat on every call, so most of the input can come from cache at a fraction of the normal price. If 80% of input tokens are cached at 10% of the input price, input cost per ticket drops to about $0.04. Total falls to roughly $0.09 per ticket, about $285 a month. Same agent, half the bill, one config change.
Swap in your own runs, call counts, and your provider's current prices. Check the pricing page the day you budget, since rates change several times a year.
Then add the non-token lines:
- Hosting and queues: $20 to $200 a month for a small agent on a serverless platform or a single container.
- Vector database or search: $0 to $100 a month at small scale if the agent uses retrieval.
- Tool and API fees: Paid data APIs, email sending, browser automation services. Often per call, so they scale like tokens.
- Tracing and monitoring: $0 to $300 a month. Don't skip it. You can't debug what you didn't log.
05Human review: the line that beats the token bill
Back to the 3,000 tickets. Say a support lead checks each draft before it goes out and spends two minutes per ticket. That's 6,000 minutes, or 100 hours a month. At $40 an hour loaded cost, that's $4,000 a month, roughly 14 times the cached token bill.
This is why "the AI is cheap" and "the project costs too much" are both true at once. The way out is accuracy, measured, not hoped for:
- Start with full review and log every edit the reviewer makes.
- Grade the agent weekly against a fixed eval set built from those real edits.
- Move categories to sampled review once they clear your bar (for example, password resets at 98% correct move to checking 1 in 10).
- Keep full review on the risky categories: refunds, legal, anything that leaves the building with money attached.
Cutting review from 100% to 20% on the safe categories is usually worth more than every token optimization combined.
06Maintenance: the cost after launch
Agents don't stay finished. Plan for roughly 20% of the build cost per year, spread across:
- Model upgrades. Providers retire old models. A new model can change tone, tool-calling habits, and output format. Each swap means rerunning your evals and fixing prompts. Budget a few days per migration.
- Integration drift. APIs change versions, auth tokens expire, fields get renamed. Your agent breaks quietly unless you alert on tool errors.
- New edge cases. Real users find inputs your eval set never covered. Each one becomes a new test case and often a prompt fix.
- Growing scope. Once the agent works, someone will ask it to do "one more thing." Price that as a new build, not maintenance.
A $30,000 agent should carry about $6,000 a year in upkeep. If nobody owns that budget, the agent degrades until people stop trusting it.
07Build or buy: compare three-year totals
Before you build, price the off-the-shelf option. Plenty of common jobs (ticket triage, meeting notes, inbox sorting, lead enrichment) already have products charging per seat or per resolution.
Run both on a three-year total:
- Build: build cost + 36 months of run cost + 3 years of maintenance + review time
- Buy: 36 months of subscription or per-resolution fees + setup + review time
Review time shows up on both sides, so the comparison usually comes down to build plus upkeep against the vendor fee. Buy when the job is common and the vendor price is predictable. Build when the agent needs your internal systems, your data rules, or a workflow no product covers.
08A budgeting checklist before you start
Write these down before anyone opens an editor:
- The one job. One sentence. If it needs "and," split it.
- Expected runs per month, at launch and in 12 months.
- Calls per run and tokens per call. Estimate from a prototype run, not a guess. Ten real runs give you a usable average.
- Review plan. Who checks the output, for how long, and what accuracy unlocks sampling.
- Integration list, with read or write marked on each.
- Maintenance owner and a yearly budget line.
If you can't fill in item 3, build a throwaway prototype first. A day of prototyping replaces a week of arguing over estimates.
I share build notes and real cost breakdowns like this one in the OpusJake newsletter.
09The bottom line
The honest answer to "how much does it cost to build an AI agent" is three numbers, not one. Build costs a few thousand dollars for a narrow workflow agent and can pass $150,000 for a production agent wired into several systems. Running it costs runs × calls × tokens × price, which prompt caching can roughly halve. Keeping it alive costs about 20% of the build each year. And the line that usually decides whether the project pays off is review time, so put your effort into accuracy you can measure, then cut review where the numbers say you can.
Frequently asked
How much does it cost to build an AI agent?
A simple agent built on a no-code or workflow tool costs a few days of work and under $2,000. A custom single-purpose agent with real tool integrations usually takes 2 to 6 weeks of engineering, roughly $10,000 to $40,000 at contractor rates. A production agent touching several systems, with evals, permissions, and monitoring, often runs $50,000 to $150,000 or more. Running costs are separate and scale with usage.
How much does an AI agent cost to run per month?
Multiply runs per month by model calls per run by tokens per call, then apply your model's per-token prices. A support triage agent doing 3,000 runs a month with six model calls each lands around $300 to $600 a month in tokens on a mid-tier model. Add hosting, tool API fees, and monitoring, which are usually smaller than the token bill but not zero.
What is the biggest hidden cost of an AI agent?
Human review time. If someone spends two minutes checking each of 3,000 runs a month, that is 100 hours of staff time, which usually costs more than the tokens and hosting combined. The fastest way to cut total cost is to raise accuracy enough that you can sample-review instead of reviewing everything.
Is it cheaper to build an AI agent or buy one?
Buy when the job is common, like support ticket triage, meeting notes, or inbox sorting, and a vendor's per-seat or per-resolution price beats your build plus upkeep. Build when the agent needs your internal systems, your data rules, or a workflow no product covers. Compare three-year totals, not the first invoice.