AI Agent Cost: What It Takes to Build One and What It Costs to Run
Every guide to AI agent cost quotes a build range between $10,000 and $500,000 and cites nothing. The number that actually matters is what one run costs and how that scales. Here is the arithmetic, from published rate cards.

How much does an AI agent cost?
An AI agent has two costs. The build is a one-off: integrations, guardrails, evaluation. The run is recurring and token-driven: cost per run multiplied by runs per month. The run cost is the one that grows with adoption, and on a six-step agent at published rates it comes to about 15 cents per run, or roughly $1,450 a month at 10,000 runs. Major attacks the run side directly. When an agent on Major works out a repeatable step, it builds a deterministic app for that step and runs the app instead of reasoning through it again, so the model bill front-loads and then flattens. Reason once. Run forever.
This piece is for CTOs, heads of platform and finance leads who have been quoted a build price and need to forecast the bill that follows.
What it costs to build an AI agent
Agency pages publish ranges of roughly $10,000 to $30,000 for a single-purpose agent, $30,000 to $100,000 for a multi-system workflow, and $100,000 to $500,000 for regulated, heavily integrated builds. Codessavvy and Branchnode are two of the sources. Treat every one of those numbers as asserted. None of the pages we read states a methodology, a sample or a rate survey, so you cannot check a quote against them.
What drives the build number is not the model call. It is the work around it:
- Integrations. Every system of record needs auth, error handling, rate-limit behavior and a plan for a write that half-succeeds.
- Guardrails and permissions. Which credentials the agent uses, what it may do, and where it must stop and ask a person.
- Evaluation. A test set and a defensible answer to "how do you know it works."
- The loop. Step count drives both reliability and cost, so loop design is most of the design work.
Where the tokens go
An agent is a loop, and the loop is what makes it expensive. Four mechanisms account for most of the bill.
- Re-sent context. Each step sends the whole conversation so far back to the model: system prompt, tool definitions, every prior response, every tool result.
- Reasoning tokens. Billed at the output rate, which is five times the input rate on Claude Sonnet 5 and six times on Gemini 3.1 Pro. Google states that output pricing includes thinking tokens.
- Tool results. Anthropic's own figures put a 10 kB web page at about 2,500 tokens and a 100 kB documentation page at about 25,000. Each lands in context and stays for the rest of the run.
- Retries. A run that fails at step five still bills for steps one through five.
Worked example: cost per run
Take a collections agent handling one overdue invoice. It pulls the invoice, checks the contract terms, reconciles against payments, drafts a note and writes the result back. Six model steps. The assumptions, stated so you can replace them:
- System prompt plus tool definitions: 2,000 tokens, re-sent on every step.
- Task input: 500 tokens. Tool results: 400 to 1,500 tokens per step.
- Output including reasoning: 5,200 tokens across the run.
- Model: Claude Sonnet 5 at $2 per million input tokens and $10 per million output tokens, per the published rate card.
Input accumulates as the loop runs: 2,500, 4,000, 5,800, 7,100, 8,200 and 9,200 tokens across the six steps, for 36,800 billed input tokens. The context never exceeds 9,200 tokens, but the run pays for roughly four times that because it re-sends what it already sent.
- Input: 36,800 tokens at $2 per million is $0.0736.
- Output: 5,200 tokens at $10 per million is $0.052.
- One successful run: $0.126. With a 15 percent retry rate billed in full: $0.145.
Swap the model and the number moves. The same profile on Claude Haiku 4.5 at $1 and $5 per million is about $0.072. On Claude Opus 5 at $5 and $25 it is about $0.361. Token usage varies run to run, so fifteen cents is a central estimate. Measure your own distribution before you commit to a forecast.
What happens at 10x volume
Token cost is linear in volume, and that is the trap. At $0.145 per run:
- 500 runs a month: about $73. A pilot that proves nothing about viability.
- 10,000 runs a month: about $1,450.
- 50,000 runs a month: about $7,250.
- 200,000 runs a month: about $29,000, in tokens alone.
Tokens are also only the floor. InfoWorld's David Linthicum puts all-in operating cost at two to five times raw token spend once orchestration, vector stores, observability, evaluation and security controls are counted, and higher under regulation. Apply that to a $30,000 build running 10,000 times a month and the first-year total lands between about $65,000 and $117,000. The quote you negotiated is the smaller half of year one.
Why agent cost climbs, and what changes it
Most agents are billed for thinking, and most of that thinking is repetition. The same collections workflow gets reasoned through on Monday and again on Tuesday, at full price both times. The better the agent works, the more it runs, and the more it costs. Shopping for a cheaper model moves the slope a little. It does not change the shape.
Routing each step to a cheaper model and caching prompts (a cache read is priced at 0.1x base input) are worth doing first. The structural fix is to stop paying the model for decisions that were already made.
Build the cost-flattening collections agent on Major
Here is how the example above runs on Major, so the repeatable steps stop passing through the model.
- Connectors: NetSuite (invoices, payments, contract terms), Gmail (outbound collections notes) and Slack (escalations to the account owner). Credentials are scoped per connector, for example read on invoices and write on collection notes only.
- The app: a Collections app with managed-database tables for invoices, match status and notes sent. It holds the history the model would otherwise carry in context, so a run resumes instead of rebuilding.
- The agent's judgment: the first time through, the agent works out the reconciliation and contract-check logic and builds it into the app. After that it reasons only on the exceptions: a disputed amount, a partial payment, a tone call on a sensitive account.
- The trigger: a scheduled workflow that runs the app daily over overdue invoices and calls the agent only for rows the app flags.
- Governance: RBAC on who can see the queue, an approval step in Slack before anything above a threshold goes out, and an audit log of every action with the credential it used.
Spend front-loads into the first runs, where the agent is still solving the problem, then flattens as the work moves into the app. We are not promising a percentage. The judgment steps still cost tokens and still vary. Start building this free.
How to estimate your own number
- Count model calls per task, not tasks. Step count is the main driver.
- Measure context growth per step, including the largest realistic tool output.
- Price output and reasoning tokens at the output rate, never the input rate.
- Compute cost per run from a provider's published rate card, step by step, and add your observed retry rate.
- Multiply by volume at launch and at ten times launch. Only the second figure tells you anything.
- Apply a 2x to 5x multiplier for everything around the model, then check which use cases still pay back.
If your workflow is simple enough to live in one prompt, a cheaper model and a cache may be all you need. If it is long, branches, touches four systems of record and someone will eventually ask what it did in March, the decisive question is how many runs need reasoning at all. That is the number a deterministic app layer cuts, and the one an agent that re-reasons every run cannot.
Start building on Major
Price your own agent with the arithmetic above, then build the repeatable steps as governed apps on Major so the run cost flattens instead of climbing with volume.
Related articles
Frequently asked questions
- How much does it cost to build an AI agent?
- Published ranges run from about $10,000 for a single-purpose agent to $500,000 for a regulated, heavily integrated build. Treat those figures as asserted rather than measured: the vendor pages publishing them state no methodology, no sample, and no rate survey. The variable that decides viability is cost per run at your expected volume, which the build quote does not tell you.
- What are the ongoing costs of running an AI agent?
- Token spend on every step of the loop, including re-sent context and reasoning tokens billed at the output rate. Then tool and infrastructure costs, evaluation runs that bill at production rates, human review of outputs, and the observability needed to attribute spend. InfoWorld puts all-in operating cost at two to five times raw token spend, higher under regulation.
- Why is an AI agent more expensive than just calling an API?
- A single API call sends context once. An agent runs a loop, and each step re-sends the whole conversation so far, so context is billed repeatedly. Reasoning tokens are charged at the output rate, tool results accumulate in context, and a run that fails at step five still bills for the first five steps.
- How much does an AI agent cost per run?
- A six-step collections agent on Claude Sonnet 5, sending 36,800 accumulated input tokens and producing 5,200 output tokens including reasoning, costs $0.126 per successful run at the published rates of $2 and $10 per million tokens. With a 15 percent retry rate it is about $0.145. Token usage varies run to run, so treat that as a central estimate.
- When should you not build an AI agent?
- When the task is deterministic enough that code is cheaper and more reliable. If the steps are fixed and the decisions are rule-based, a script runs the same way every time at no token cost. Agents earn their cost where genuine judgment is required at some point in a long workflow crossing several systems.