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

DriverCheaper endExpensive endWhy it matters
Systems the agent touchesOne system with a clean APISeveral systems, some without APIsEvery integration needs tools, auth, error handling and tests; missing APIs must be built first
Reversibility of actionsRead-only or drafts for a personSends, pays, deletes, files externallyIrreversible actions need approval steps, idempotency and audit trails
Data qualityStructured records, consistent formatsScanned PDFs, free text, conflicting sourcesMessy 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 latencyBatch jobs, minutes are fineUser-facing, seconds matterLow latency pushes you to smaller models, caching, streaming and parallel tool calls
Security and complianceInternal data, no regulationPersonal, financial or health dataData 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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 runOutput cost per runPer runPer 1,000 runs
Claude Sonnet 5.5 ($2 / $10)40,000 × $2 ÷ 1M = $0.0803,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.0303,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.0043,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.

The running costs nobody budgets for

  • Evaluation upkeep. New failure cases get added to the test set and every prompt, tool or model change is re-scored. This is cheap per run and essential; skipping it is how agents quietly get worse.
  • Monitoring and tracing. Storing traces of every step and tool call so you can answer "why did it do that?" Tools such as Langfuse or an OpenTelemetry pipeline cost money or hosting time, and someone has to look at them.
  • Model upgrades and deprecations. Providers retire models. Each migration means re-running the evaluation set, adjusting prompts and sometimes tools. Keeping the model behind an interface makes this a routine task instead of a rewrite.
  • Integration drift. The APIs your agent calls change too. An agent is a piece of software with dependencies, not a configuration you set once.
  • Human review time. In supervised mode, people review the agent's proposals. That time is a real cost — and the main thing a good agent reduces over time.

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:

  1. A written description of one workflow and what "correct" means for it.
  2. An evaluation set of real cases, even a small one.
  3. A list of systems the agent must read from and write to, with the state of their APIs.
  4. A decision on which actions need human approval.
  5. 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.

Sources

  1. Claude pricing (Anthropic) — accessed 2026-10-20
  2. OpenAI API pricing — accessed 2026-10-20
  3. Gemini API pricing (Google) — accessed 2026-10-20

Questions we get about this

More from the blog

Tell us which workflow you want an agent to own

Tell us what you are building or what needs fixing. You will hear back from an engineer — not a sales rep — within one business day, usually with questions or a rough approach.

No newsletter, no sales sequence. We use your details only to reply.

DablewDevs

Your enquiry goes straight to our engineering team — the people who will scope and build your project, not a sales desk.

© 2026 DablewDevs. All rights reserved.