What drives the running cost of an AI agent, and how to estimate it
The model is only one line on the bill
Model usage is the line most people look at, but it is rarely the whole cost. Larger, more capable models usually charge more per unit of text than smaller ones. Providers publish their current rates on their pricing pages, and those rates change, so check them when you estimate rather than trusting a figure in an article.
The running cost has several parts that interact: model usage, the tools the agent calls, hosting and storage, retries and failures, and the time people spend reviewing the work. Cutting one part often raises another, so estimate the whole chain rather than the model fee alone.
How length and steps multiply the model cost
Model providers usually charge for input, the text you send in, and for output, the text the model writes. Input and output are measured in tokens, which are pieces of words. A long email thread or a full policy document costs more than a short question. Output is often priced differently from input, so check both on the pricing page.
Steps multiply the cost. An agent that reads a record, calls a tool, reads the result and then writes a summary sends the growing context back to the model on every step. A task with many steps can cost several times more than one with a few, even when each single step looks cheap. These are the drivers to measure:
- Context size: how much history and how many documents you send on each call.
- Step count: how many model calls one task needs from start to finish.
- Retries: how often a failed call is repeated, and whether the retry changes anything.
- Output length: how long the drafts and summaries the agent writes are.
Hidden costs: tools, hosting and retries
Tools cost money too. Some connected services charge per call, per record or per seat, and each has its own pricing page. Hosting for the agent, its queue and its logs adds a regular cost that does not depend on how much the agent is used. Storage for logs and documents grows with time, so plan for it from the start.
Retries deserve special attention. A retry that repeats the same request with the same input can only repeat the same failure, and it spends money each time. Good designs change the request or stop and escalate. Check your provider's rate limits and error behaviour in its official documentation, because limits decide how many tasks can run at once.
Review time is part of the cost
An agent that saves model fees but leaves a person checking every output may cost more than doing the work by hand. Measure how long review takes per task at the start, then watch whether it falls as the agent improves. A cheaper model whose drafts need heavy editing is often the more expensive choice. Count staff time at its real cost in your estimate.
How to estimate from a sample of real tasks
Pick a sample of real tasks that reflects your mix of simple and difficult work, not only the easy ones. Run them through a trial setup and record, for each task, the input and output tokens, the number of steps, the tool calls, the retries and the review minutes. Calculate the average cost per task, multiply it by the volume you expect, and add a margin for the awkward cases that cost more.
Check the current prices on the provider's pricing page on the day you estimate, and redo the sum whenever prices or volumes change. Keep the calculation in a spreadsheet so anyone can change an assumption and see the effect.
Ways to lower the running cost without lowering quality
Start by cutting waste. Send only the fields a task needs, not whole records. Summarise long history instead of resending it at every step. Route simple requests to a smaller model and reserve the most capable model for steps that need judgment. Set a step limit so a looping task stops instead of running up a bill.
Test every change against your test set before you adopt it. A cheaper setup that fails on awkward cases is not a saving, because the failures come back as review work or as customer problems.
How Hundred Seas helps
Hundred Seas is a product studio in Taipei. We build AI agents and AI CRM systems on Claude and on OpenAI models, and we choose the model for each task on cost, speed, quality and where the client's data has to stay. We are a registered partner in Anthropic's Claude Partner Network and an OpenAI partner.
Work starts with a scope step of about one week at a fixed price, ending in a written plan, a clickable prototype and a firm quote. The build follows in weekly releases of working software, and a monthly run plan keeps the software running and up to date after launch.
Questions
- Is an AI agent expensive to run?
- It depends on the task. A simple agent that reads one short message and drafts a reply costs little per task. An agent that reads long documents, calls many tools and works through many steps costs far more. Estimate with real tasks rather than guessing, and watch step counts closely.
- Why did my bill jump after a small change?
- A small change to a prompt can add context to every call, or let the agent take an extra step on hard cases. Compare token counts and step counts before and after the change. Rerunning your sample tasks will show where the extra cost comes from.
- Should I always use the cheapest model?
- Not always. A cheaper model can be right for routing, data extraction and simple drafts, but it may fail on judgment-heavy steps and create review work. Compare models on your own test set, measuring quality and cost together, and pick the cheapest one that meets the standard.
- Where do I find current prices?
- Use each model provider's official pricing page, and the pricing pages of any tool or hosting service you connect. Prices change, so do not rely on figures from articles or old screenshots. Check on the day you build your estimate and note that date in the calculation.
- Who pays the model provider, me or the studio that builds the agent?
- That depends on the contract. Some setups bill model usage to your own account with the provider, and others pass the cost through a monthly plan. Agree the answer in writing before the build starts, and ask for each cost to be shown as its own line so you can compare it with your sample estimate.