What an AI agent really costs: the build, the run, and the bill nobody budgets for

By Muhammad Sohaib Khan, Certified Senior AI & Software Architect6 min read

The short answer

An AI agent has three costs. The build, driven mostly by how many systems it must connect to and how safe it must be. The run, which is model usage plus hosting and scales with traffic. And the upkeep, because prompts drift, APIs change and models get retired. Integrations and safety dominate the build. Volume dominates the run.

Why I won't give you one number on this page

Two clients can ask for 'an AI agent for customer support' and need builds that differ by a factor of ten. One has a single help centre and wants answers. The other has three legacy systems, refunds, a regulator and a call centre in two languages. Pretending those are the same price helps nobody. So this article is about what moves the number. Every engagement I take is scoped to the project after a short discovery conversation, and this is the list I walk through in it.

The build: what actually drives it

  • Integrations. Each system the agent must read from or write to is a chunk of work: authentication, data mapping, error handling, testing. A CRM with a clean API is a day or two. A legacy system with no API is a project.
  • Safety and permissions. Read-only agents are cheap. Agents that can book, refund, send or delete need confirmation flows, audit logs and role checks. That is where the serious engineering lives.
  • Knowledge preparation. Your documents are never ready. Cleaning, chunking, deduplicating and testing retrieval is often a third of the build on RAG-heavy agents.
  • Evaluation. A test set of real questions with expected answers, run on every change. Skipping it is the most expensive saving you can make.
  • Channels. Web chat is the baseline. WhatsApp, email, voice and in-app each add their own integration and their own edge cases.
Five stacks of coins rising in height from left to right

The run: what you pay every month

  • Model usage, billed per token by the vendor. It scales with conversations and with how much context each one carries. Long documents in every prompt is the classic way to triple this bill.
  • Hosting for your own services: the API layer, the vector database, the logs. Usually modest on managed infrastructure.
  • Telephony for voice agents, billed per minute by the carrier on top of the model.
  • Third-party tools: reranking, speech, transcription, monitoring.

The bill nobody budgets for

Maintenance. Models get deprecated and your prompts behave differently on the replacement. A vendor changes an API. Your own product adds a feature the agent does not know about. A client once asked me why their agent had started giving stale pricing; the answer was that nobody told it pricing changed. Budget a few hours a month of attention, more in the first quarter, or budget for the embarrassment instead.

Side by side

DriverKeeps cost downPushes cost up
ScopeOne job, one channelGeneral assistant, many channels
IntegrationsOne system with an APISeveral systems, one without an API
ActionsRead onlyWrite, refund, send, delete
KnowledgeClean docs, one sourceScattered, duplicated, outdated
Model mixSmall model for routine, frontier for hardFrontier model for everything
Context per requestOnly the passages neededWhole documents every time

How to keep it reasonable

  • Start with the one task that has the clearest payoff and the cleanest system behind it. Expand from there.
  • Insist on a model router. Routine traffic on a cheap model is the single biggest lever on the monthly bill.
  • Ask for a usage dashboard on day one: runs, tokens, latency, fallbacks. You cannot manage a cost you cannot see. The telemetry on this site's assistant is a small example of exactly that.
  • Put maintenance in the contract, not in the hope.

Related reading

Sources

  1. OpenAI API pricing
  2. Anthropic API pricing
  3. Twilio Voice pricing (telephony for voice agents)

Related service

AI Development Services

Sohaib architects and ships AI systems end to end: agents that plan and call tools, RAG over your own documents, voice agents and workflow automation. Built for production against real users, with one accountable owner from the first diagram to deployment.