Ask how much AI agent development costs and you will find answers that differ by a factor of a hundred. Most of them are not wrong; they describe different agents. An agent that sorts incoming emails into three queues and an agent that reads contracts, checks them against a policy and updates records in two business systems are both “AI agents”, and they are not the same project. This post breaks the cost into the parts you can reason about: what it takes to build an agent, what it takes to run one, what drives each, and how to estimate the running cost with your own numbers.
Two bills: building and running
An AI agent has a build cost, paid once and then in smaller amounts as it changes, and a running cost, paid every month it is in use. They behave differently:
- Build cost is mostly engineering time: understanding the workflow, connecting the agent to your systems, writing its instructions and tools, testing it on real cases, and putting it into production safely.
- Running cost is model usage, infrastructure, monitoring, the time people spend reviewing what the agent hands them, and ongoing maintenance.
Quotes that only cover the build tend to surprise people later. A useful estimate covers both.
What drives the build cost
The model itself is rarely the expensive part of the build. The cost follows the shape of the work the agent has to do and the systems around it.
| Driver | Cheaper end | Expensive end |
|---|---|---|
| Steps and decisions | One decision, such as classifying a request | Many steps, each with its own tools and checks |
| Systems it connects to | One system with a clean, documented API | Several systems, old APIs, or none at all |
| Input it has to read | Structured forms or short emails | Scanned PDFs, tables, handwriting, mixed languages |
| Cost of a wrong action | A suggestion a person checks anyway | An action that changes records or reaches customers |
| Data access and compliance | Internal, non-sensitive data | Personal, financial or health data with audit needs |
| Where people interact with it | A message in a tool the team already uses | A custom review screen or dashboard |
| Where it runs | A managed cloud service | Your own cloud account or on-premises, with approvals |
The row that most often changes a project’s size is the cost of a wrong action. An agent that drafts a reply for a person to send needs good testing. An agent that updates a payment record on its own needs approval steps, permissions limited to exactly what it should touch, logging of every action, and a much larger evaluation set. That safety work is a large share of a serious agent build, and it is not optional.
Where the build effort goes
For a typical business agent, the effort spreads across these parts, roughly in this order:
- Mapping the workflow. Who does the work today, what arrives, what gets decided, and where a person must approve. Skipping this is the most expensive saving you can make.
- Integrations and tools. Giving the agent the ability to read and write in your systems. This is often the largest single piece, because it depends on APIs you do not control.
- Agent logic and instructions. Prompts, tool definitions, the order of steps and what happens when something fails.
- Evaluation. A set of real cases with known good outcomes, automated checks, and a way to rerun them with every change.
- Guardrails, approvals and logging. Checks on inputs and outputs, human checkpoints, and a record of what the agent saw and did.
- Deployment and monitoring. Running it in production with alerts, dashboards and a way to roll back.
What it costs to run
Once the agent is live, the monthly bill has five parts:
- Model usage. Charged per token by most providers, for both the text sent to the model and the text it returns. This scales with volume and is the part people most want to estimate.
- Infrastructure. Hosting, queues, a database or vector index if the agent searches documents, and storage for logs.
- Observability. Logging, tracing and evaluation runs. Evaluation uses model calls too, so it has a token cost of its own.
- Human review. The time people spend on the cases the agent sends them. A good agent reduces this, but rarely to zero, and the review queue needs someone assigned to it.
- Maintenance. Model versions change, connected systems change their APIs, and the workflow itself changes. Budget for regular updates, not just fixes.
How to estimate the model cost
Model cost is easy to estimate once you know four numbers: how many times the agent runs, how many model calls each run makes, and how many tokens go in and come out per call. The formula is:
Monthly model cost = runs per month × calls per run × (input tokens × input price + output tokens × output price)
A worked example, with made-up prices so the arithmetic is clear. Check your provider’s current price list for real figures; they change often and vary widely between models.
- The agent processes 5,000 supplier invoices a month.
- Each invoice takes 4 model calls: read the document, extract the fields, check them against the purchase order, draft a note for the reviewer.
- Each call sends about 3,000 tokens and gets about 500 back.
- Illustrative prices: $3 per million input tokens and $15 per million output tokens.
That is 5,000 × 4 × 3,000 = 60 million input tokens ($180) and 5,000 × 4 × 500 = 10 million output tokens ($150): about $330 a month in model usage at those prices. The same agent on a model ten times cheaper costs about $33; on one five times more expensive, about $1,650. Model choice per step matters more than almost anything else in the running cost.
Two things make real numbers higher than the estimate. Retries and failed calls add volume, and agents that decide their own next step can loop, making far more calls than planned. Measure tokens per completed task from the first week in production and compare it with the estimate.
The costs that surprise people
- Unbounded loops. An agent that keeps calling tools until it is satisfied can run up a large bill on one hard case. Cap the number of steps and tokens per run.
- Growing context. Each step that passes the full history to the next one makes later calls longer and more expensive. Pass only what the next step needs.
- Integration work nobody priced. A system with no API, a rate limit, or an approval process for access can take longer than the agent itself.
- Evaluation upkeep. The test set has to grow as new failure cases appear in production, and someone has to own it.
- Model changes. When a provider retires or updates a model, the agent needs re-testing, and sometimes new instructions.
- The review queue. If the agent sends 15% of cases to a person, someone has to handle that 15% every day.
How to keep the cost down
- Start with one workflow. A small first build gives you real numbers for accuracy, volume and running cost before you commit to more. Our guide to AI workflow automation covers how to pick it.
- Use plain automation where the rules are clear. If a step can be written as “when this, do that”, it does not need a model call.
- Match the model to the step. A small, cheap model can classify or extract; keep the larger models for the steps that need judgment.
- Cap steps and tokens. Set limits per run and alert when a run hits them.
- Cache what repeats. Many providers discount repeated prompt prefixes, and identical lookups can be cached in your own code.
- Track cost per completed task. Not just the monthly total. It is the number that tells you whether a change made the agent cheaper or more expensive.
Build, buy or adapt
A custom agent is not the only option. Off-the-shelf agent products are faster to start with and charge per seat or per use, but they fit your systems only as far as their integrations go. A custom agent costs more up front and fits the workflow exactly. In between is adapting an existing solution: starting from software that already does most of the job and changing the parts that are specific to you. For many teams, adapting is the cheapest route to something that works in production, and it is worth asking any vendor whether it is possible before paying for a build from scratch.
Questions to answer before you ask for a quote
You will get a more accurate estimate, from us or anyone else, if you can answer these first:
- Which workflow, exactly, and how many cases a month?
- What does the input look like? Have a handful of real examples ready.
- Which systems does the agent need to read from or write to, and do they have APIs?
- Which actions can it take on its own, and which need a person to approve?
- What does a wrong answer cost, and how will you know when one happens?
- Does the data have to stay in a particular cloud account or region?
- Who on your side will own the review queue and the evaluation set?
Conclusion
The cost of an AI agent follows the work it does: how many steps, how many systems, how messy the input and how costly a mistake. Estimate the build and the running cost separately, calculate model spend from your own volumes, and put limits on loops and context before they show up on an invoice. Starting with one workflow is the most reliable way to turn a wide range of guesses into a number you can plan around.
We build custom agents this way: one workflow first, tested on real cases, with approvals where they matter. See AI agent development for how a build runs, or MVP development if you want to test an idea with real users before a full build. Our guide to evaluating LLM applications in production covers the testing side in more detail.