AI agents
How much does it cost to build an AI agent? A breakdown from real builds
By Waleed Siddiqui, founder & lead engineer
Ask ten agencies what an AI agent costs and you will get ten numbers, most of them meaningless without the scope behind them. "An agent" can mean a tool that drafts replies for a person to send, or a system that issues invoices and moves records between three products without anyone watching.
So instead of a price list, this article explains what actually drives the two bills every agent has — the cost to build it and the cost to run it — with worked running-cost arithmetic at current API list prices. It is based on the agent and AI-integration work we do for clients and the production agent systems our founder builds, and it deliberately avoids quoting numbers we cannot back up.
Two bills: building the agent and running it
Build cost is engineering time: scoping, connecting the agent to your systems, making it safe, testing it, and rolling it out. It is mostly a one-off, front-loaded cost.
Running cost is model usage (tokens), plus the infrastructure, monitoring and upkeep that keep the agent accurate as your data, workflows and models change. It scales with usage and never quite goes to zero.
Teams routinely over-focus on token prices, which for most business agents are the smaller of the two. Model calls for an internal workflow agent often cost less per month than a single day of engineering. The expensive part is making the agent trustworthy enough to leave running.
What drives the build cost
| Driver | Cheaper end | Expensive end | Why it matters |
|---|---|---|---|
| Systems the agent touches | One system with a clean API | Several systems, some without APIs | Every integration needs tools, auth, error handling and tests; missing APIs must be built first |
| Reversibility of actions | Read-only or drafts for a person | Sends, pays, deletes, files externally | Irreversible actions need approval steps, idempotency and audit trails |
| Data quality | Structured records, consistent formats | Scanned PDFs, free text, conflicting sources | Messy inputs need extraction, validation and fallbacks before the agent can reason over them |
| Accuracy bar | "Good enough to draft" | "Right every time it acts alone" | A higher bar needs a bigger evaluation set and more iterations to meet it |
| Volume and latency | Batch jobs, minutes are fine | User-facing, seconds matter | Low latency pushes you to smaller models, caching, streaming and parallel tool calls |
| Security and compliance | Internal data, no regulation | Personal, financial or health data | Data handling, retention, provider agreements and access controls take real design time |
When we scope an agent, these six questions decide most of the estimate. A read-only internal assistant over one well-structured system sits at one end; an autonomous agent that takes irreversible actions across several systems with regulated data sits at the other. Both are "AI agents".
Where the build effort goes, phase by phase
These phases hold for almost every agent we have built or reviewed. Durations depend heavily on the drivers above, so treat the ranges as orders of magnitude, not quotes.
- Scoping and the evaluation set (typically about a week or two). Pick one workflow, write down what "done correctly" means, and collect real examples — often 30 to 100. This is the cheapest phase and the one that most often saves money, because it can show the idea will not work before anything is built.
- Prototype against real data (often a few weeks). A thin agent on your actual systems in a sandbox, scored against the evaluation set. You learn whether the model, the data or the tools are the bottleneck.
- Production hardening (frequently the largest phase). Permissions inherited from real users, approval steps, retries, idempotent actions, durable state for long-running work, tracing, cost tracking and an interface people actually use.
- Gradual rollout (weeks, overlapping with operation). Shadow mode first (the agent proposes, a person acts), then supervised autonomy, then autonomy only on the cases the evaluation shows it handles reliably.
Running cost: worked token arithmetic at current prices
Model usage is billed per token, separately for input (what you send: instructions, tool definitions, retrieved context, conversation so far) and output (what the model writes). Agents are input-heavy, because every step re-sends the growing context.
Take a modest workflow agent: 8 steps per run, adding up to 40,000 input tokens and 3,000 output tokens per run in total. Here is the cost per run and per 1,000 runs at list prices published on the providers' pricing pages on 20 October 2026 (standard tier, short prompts, before any caching or batch discounts):
| Model (list price per 1M tokens, in / out) | Input cost per run | Output cost per run | Per run | Per 1,000 runs |
|---|---|---|---|---|
| Claude Sonnet 5.5 ($2 / $10) | 40,000 × $2 ÷ 1M = $0.080 | 3,000 × $10 ÷ 1M = $0.030 | $0.110 | $110 |
| OpenAI gpt-6.1-sol ($2 / $10) | $0.080 | $0.030 | $0.110 | $110 |
| Gemini 3.6 Flash ($0.75 / $3.75, through 31 Dec 2026) | 40,000 × $0.75 ÷ 1M = $0.030 | 3,000 × $3.75 ÷ 1M = $0.011 | $0.041 | $41.25 |
| Claude Haiku 5.5 ($0.10 / $0.50, prompts ≤ 100K) | 40,000 × $0.10 ÷ 1M = $0.004 | 3,000 × $0.50 ÷ 1M = $0.0015 | $0.0055 | $5.50 |
At 1,000 runs a month, the token bill ranges from a few dollars to a little over a hundred depending on the model. Two things move it far more than the per-token price:
- Prompt caching. Much of an agent's input — system instructions and tool definitions — repeats on every step. Providers bill cached input at a fraction of the normal rate (for example $0.10 instead of $2 per million on Claude Sonnet 5.5 and gpt-6.1-sol). If 30,000 of the 40,000 input tokens were cache reads, the Sonnet run above would fall from about $0.11 to about $0.053 — roughly half. Cache writes can be billed differently; check the current pricing page for your provider.
- Choosing the smallest model that passes your evaluation set. Routing easy steps (classification, extraction) to a small model and reserving a larger one for genuine reasoning often cuts cost by an order of magnitude without hurting accuracy. The evaluation set is what makes that decision safe rather than a guess.
Prices change often and differ by region, tier and context length. Re-run this arithmetic with current prices and your own token counts from a prototype — we measure tokens per run during the prototype phase so the operating cost is known before rollout.
When you should not build a custom agent
Custom agents are worth it when the workflow is specific to your business, touches systems you control, and runs often enough to matter. They are poor value when:
- An off-the-shelf product already does the job inside a tool you use (many help desks, CRMs and document tools now ship decent built-in assistants).
- The process runs a few times a month — a checklist and a person will be cheaper for years.
- Nobody can define what a correct result looks like. If you cannot build an evaluation set, you cannot know whether the agent works.
- The real problem is missing data or a missing API. Fix that first; it pays off with or without AI.
We say this in scoping calls too: sometimes the right recommendation is a small integration or a better form, not an agent.
How to get an estimate you can trust
Any agency that quotes a firm price for "an AI agent" before seeing your workflow, systems and data is guessing. A useful estimate comes from a short scoping exercise that produces:
- A written description of one workflow and what "correct" means for it.
- An evaluation set of real cases, even a small one.
- A list of systems the agent must read from and write to, with the state of their APIs.
- A decision on which actions need human approval.
- Measured tokens per run from a thin prototype, turned into a monthly running-cost figure.
That is exactly how we start AI agent development projects. If you already have an agent prototype and want it production-ready, see AI integration services — or hire AI developers to work inside your own team.
