Services AI automation & agentsWebsite developmentMobile applicationsCustom softwareBots & integrations Work Pricing About Insights Contact Start a project
2026-10-18 · AI engineering · 6 min read

What an AI agent actually costs to run

Build cost is the easy part. The arithmetic behind per-task inference cost, and why context length decides whether your agent is viable.

By Prosenjit Kar

Every AI agent quote has two numbers. The first is what it costs to build. The second is what it costs to keep answering questions, and that second number kills more projects than the first.

The three lines that matter

Per-task cost is roughly: input tokens × input price + output tokens × output price + tool calls × tool cost. Input tokens dominate, because every turn re-sends the conversation and any retrieved context.

A support agent that retrieves six documents of 700 tokens each is sending about 4,200 tokens of context before the user's question is even counted. Add a 600-token system prompt, a short history and the question, and a single "simple" turn is 5,000–6,000 input tokens. At current mid-tier pricing that is small in dollars and meaningful in rupees once you multiply by 20,000 conversations a month.

Where projects actually go wrong

  • Retrieval without ranking. Sending every matching chunk instead of the best four is the most common 2–3× cost error.
  • Unbounded history. Passing the whole thread on every turn makes cost grow quadratically with conversation length.
  • No cache. Static system prompts and policy text are identical every call; provider-side prompt caching cuts their effective price sharply.
  • Agent loops. An agent that can call five tools and retry can also call five tools four times. Without a step ceiling, a bad retrieval turns into a bill.

How we quote it

Before launch we build a 40–60 case evaluation set from your real questions. We measure accuracy, median latency and cost per resolved task, then multiply by your expected volume. If the monthly inference cost exceeds the value of the work it replaces, we say so and change the design — smaller model for routing, larger model only for the hard 15%, deterministic code for anything that does not need a model at all.

A good agent is mostly ordinary software with a language model in the two places where language is genuinely the problem.

That is also the cheapest architecture, which is not a coincidence.