Skip to main content
AgentsUse

Guide

How Much Does It Cost to Run an AI Agent? The Full Picture

Published 2026-09-26 · 12 min read

Where agent spend actually goes: tokens, tool calls, model choice, retries, and review time. Includes a worked cost worksheet and the controls that keep per-task cost under control.

Published
2026-09-26
Reading time
12 min read
Sections
7
FAQs
3

Asking an AI agent a question can cost many times more than asking a chatbot the same question - not because the answer is better, but because the agent takes many steps to get there. Each step consumes tokens, each tool call adds up, and a stuck agent can burn through budget while accomplishing nothing. Understanding where the money goes is the first step to keeping agent costs under control. Here is the full picture, in plain English - plus a worked hypothetical cost worksheet that shows how a single task's bill adds up step by step, and the budgeting rule that tells you whether any agent task is worth its price.

Where the money goes

Agent costs come from three places. First, tokens: every word the agent reads and writes costs a fraction of a cent, and agents read and write a lot - instructions, tool results, web pages, and their own reasoning, repeated every step. Think of each step as re-reading the entire conversation so far plus writing a new chunk; the twentieth step of a run costs noticeably more than the first, because there is more history to re-read. Second, tool use: web searches, API calls, and code execution often carry their own per-call charges on top of tokens, and agents are enthusiastic tool users - a research task might fire off dozens of searches without you ever seeing them. Third, the model itself: more capable models cost several times more per token than smaller ones, and agents usually need the capable ones to stay on track through multi-step work. A single agent run combines all three, which is why costs surprise people - each factor alone looks small, and they multiply.

The multiplication is the key insight. A chatbot answering one question pays the token cost once. An agent researching the same question might take fifteen steps, each step re-reading the growing history, each step possibly calling a tool, all on a premium model because the task needs judgment. Fifteen steps times growing context times tool charges times a higher per-token rate - that is how a question that costs a chatbot pennies costs an agent dollars. None of the individual charges is unreasonable; the total is the product of the architecture.

The main cost drivers

Six factors determine what you actually pay. They are worth understanding individually, because each one has its own lever for bringing costs down:

  • Number of steps: a ten-step task costs roughly ten times a one-step task, before accounting for growing context. Long, wandering runs are the biggest bills - and wandering is common, because agents explore. Every unnecessary step is pure cost, which is why narrow task scope is the single highest-leverage cost control.
  • Context size: agents re-read the full conversation history each step, so costs grow as the run gets longer - the twentieth step costs more than the first. Verbose tool outputs are the worst offender: one unfiltered web page or API dump can cost more in re-read tokens over a long run than the rest of the task combined.
  • Model choice: the most capable models can cost five to ten times more per token than mid-tier ones. Use them where judgment matters, not everywhere. Many agent frameworks let you route simple subtasks - formatting, classification, extraction - to cheaper models while reserving the strong model for planning and judgment calls.
  • Tool calls: each search, browse, or API call adds its own charge plus the tokens to process the result. Agents do not economize on tool use unless instructed to - an agent told to research thoroughly will keep searching long past the point of diminishing returns. Caps and explicit stop conditions on tool use pay for themselves quickly.
  • Retries and loops: a stuck agent retrying a failing step burns money for zero progress. This is pure waste and entirely preventable - a stuck rule (stop after two failures and report) converts an unbounded loop into a fixed, small cost. If your bills spike mysteriously, a loop is the first suspect.
  • Output length: long reports, rewritten documents, and generated code all cost tokens on the way out, not just the way in. Agents default to thoroughness - ask for exactly the output length you need. A ten-bullet summary costs a fraction of a full rewritten report containing the same information.

Why agents cost more than chatbots

A chatbot answers once: one pass through the model, one response. An agent answering the same underlying question might search the web three times, read five pages, run two calculations, draft a result, check it, and revise - each cycle a full model call with growing context. That is the trade you are making: the agent does genuinely more work, but you pay for every step of it. For tasks where a single good answer suffices, a chatbot is the economical choice. Agents earn their premium only on multi-step work you could not have specified in one prompt.

This is also why the most common cost complaint - I asked a simple question and got a big bill - happens. The question was simple; the agent's approach was not. An agent does not know that a one-paragraph answer would have satisfied you; it pursues the goal with the full machinery of search, read, reason, and revise. If you find yourself using an agent for questions a chatbot could answer, you are paying the multi-step premium for single-step value. Match the tool to the task's actual complexity, not to the tool you happen to have open.

A worked hypothetical cost worksheet

To make the arithmetic concrete, here is a worked hypothetical example - an invented scenario with illustrative numbers, not real prices from any provider. The figures below are made up purely to show how the components combine; your actual costs depend on your provider, model, and tools. Imagine a hypothetical agent task: research three suppliers for a part, compare their quotes, and write up a one-page recommendation. The agent takes twelve steps.

  • Steps 1-2: planning and initial searches. The agent reads your instructions, plans its approach, and runs two web searches. Small context so far - the history is short. Illustrative cost: a few cents of tokens plus two search charges.
  • Steps 3-6: reading supplier pages. The agent opens four supplier websites and extracts pricing. Each page read adds tokens, and now every subsequent step re-reads everything accumulated so far. The context is growing, and so is the per-step price. Illustrative cost: the largest token chunk of the run.
  • Steps 7-8: a retry loop. One supplier's site fails to load, and the agent retries three times with slight variations before moving on. Zero progress, but each retry re-reads the full history. Illustrative cost: meaningful money for nothing - the waste a stuck rule would have prevented.
  • Steps 9-10: comparison and calculation. The agent normalizes the quotes into a table and computes totals. Moderate new tokens; the history is now long, so even these reasoning steps cost more than the early ones.
  • Steps 11-12: drafting and revising the recommendation. The agent writes a full page, re-reads it, and revises. Output tokens are the most expensive part of these steps - a long draft costs real money on the way out.

Add it up in illustrative terms: suppose the whole run consumed the equivalent of a small booklet's worth of tokens across twelve steps, plus eight tool calls, with one wasted retry loop. The loop alone might account for a fifth of the total - money spent achieving nothing. Now imagine the same task done three ways: a chatbot answering from its own knowledge (pennies, but possibly outdated prices), a script hitting a supplier API on a schedule (fractions of a penny per run, but only works if the data is structured), and the agent (the most expensive, but the only one that handles the messy reality of three different website layouts). The worksheet does not tell you which to pick - it tells you what each choice costs, so the decision is informed rather than surprising.

The pattern to take away: cost concentrates in three places - long histories re-read every step, tool calls that multiply silently, and loops that burn budget for zero progress. Attack those three and you capture most of the savings available. Everything else is rounding.

Keeping costs down

Most agent spending is reducible without hurting results. The pattern is simple: constrain the run, shrink the context, and match the model to the difficulty of each step.

  • Set hard limits before every run: maximum steps, maximum cost, and a time box. A runaway agent is the most expensive kind, and limits convert unbounded waste into a stopped run with a report.
  • Add a stuck rule so failing steps stop after two tries instead of looping. As the worksheet showed, one loop can cost a fifth of a run - this single rule is the highest-ROI cost control there is.
  • Keep tasks narrow. Summarize these three reports costs far less than research the industry - not just because it is shorter, but because narrow scope means fewer steps, smaller context, and fewer tool calls. Scope is cost.
  • Use smaller, cheaper models for simple subtasks like formatting and classification; reserve the strong model for judgment calls. If your framework supports per-step model routing, this is usually the second-biggest lever after scope.
  • Trim what the agent reads: point it at specific pages or files instead of letting it browse broadly. Every unfiltered page the agent reads gets re-read at every subsequent step - the cost compounds.
  • Cap output length explicitly. Ask for the ten-bullet summary, not the comprehensive report, unless you will actually read the report. Output tokens cost the same as input tokens; verbosity is billed.
  • Cache repeated work. If the agent looks up the same reference data daily, fetch it once and hand it over as part of the instructions. Paying for the same lookup every day is a subscription you did not mean to buy.
  • Review cost per task weekly. When one task's cost creeps up, its instructions or scope usually need tightening. Cost creep is almost always scope creep wearing a costume - the task got broader, the agent got chattier, or a new edge case started triggering retries.

A simple budgeting rule

Before automating a task with an agent, estimate what the task is worth to you in time or money, then make sure the agent does it for a small fraction of that. A useful rule of thumb: if the agent costs more than a tenth of the value it creates, the setup needs work - narrower scope, cheaper model, or fewer steps. A task that saves you an hour of tedious work is worth automating even at a noticeable per-run cost; a task that saves you five minutes is worth automating only if the per-run cost is trivial.

Track cost per completed task, not cost per month. A monthly total hides which tasks are wasteful - one looping task can dwarf ten efficient ones, and you will never find it in an aggregate number. Break the bill down by task, rank them by cost per completion, and investigate the top of the list. Many people find that two or three well-scoped agent tasks deliver most of the value, and everything beyond that is optional - which is fine, as long as the optional ones are cheap. The budgeting rule also tells you when to demote: if an agent task has become stable and routine, a script will do it for nearly nothing. Promote to agents when tasks need judgment; demote to scripts when they stop needing it.

Questions people actually ask

Why did my bill spike this month? In almost every case, the answer is one of three things: a loop (an agent retrying a failing step for dozens of iterations), scope growth (a task that quietly got broader - more sources, longer outputs, more retries), or a new task added without limits. Check per-task costs first; the spike is usually one task, not a general increase. Then check that task's recent runs for repeated tool calls - the signature of a loop is unmistakable once you look at the log.

Is a cheaper model enough for my agent? It depends on which parts need judgment. Try this: run the task with the cheaper model on a trial and watch where it fails. If it fails at planning, ambiguous interpretation, or recovering from errors, it needs the stronger model for those steps - but it might still handle extraction, formatting, and summarization cheaply. Mixed-model setups, where the strong model plans and the cheap model executes routine steps, often cut costs substantially without hurting quality. The expensive mistake is defaulting everything to the premium model out of caution.

Should I worry about cost when I'm just experimenting? Not much - experimentation is cheap in absolute terms, and learning what works is worth the spend. Worry about cost at the moment an experiment becomes a routine: the daily task, the scheduled run, the thing that now executes fifty times a week. That transition - from experiment to production - is when you set the limits, tighten the scope, add the stuck rule, and check the per-task cost. Experiments teach; production bills.

Are there really tasks where the agent is the cheap option? Yes - when the alternative is human hours on work the agent does well. An hour of tedious data cleanup has a real cost in wages or in your evening; an agent doing it for a small fraction of that is a bargain even if it feels expensive compared to a chatbot. The comparison that matters is never agent versus chatbot - it is agent versus the actual alternative, which is usually a person doing it manually or the task not getting done at all.

Frequently asked questions

Why did my bill spike this month?

In almost every case it is a loop retrying a failing step, scope growth that made a task broader, or a new task added without limits. Check per-task costs first, then look for repeated tool calls in that task's recent runs.

Is a cheaper model enough for my agent?

It depends on which parts need judgment. Run the task with the cheaper model and watch where it fails. Steps that fail at planning or error recovery need the stronger model, while extraction, formatting, and summarization can often run cheaply.

Should I worry about cost when I am just experimenting?

Not much, because experimentation is cheap in absolute terms. Worry when an experiment becomes a routine daily or scheduled run. At that point set limits, tighten scope, add the stuck rule, and check cost per task.

Keep reading

Accounts and the planned features are not open yet. See what is planned. The catalog and the browser workspace are free and need no account.