Book a free call

How Much Does Agentic RAG Cost to Build and Run?

Agentic RAG costs more than plain RAG because the agent plans, calls tools and checks its own work, and each step is a model call. Here is the build and run cost.

Hertiv engineering teamReviewed by a senior engineer
6 min read
How Much Does Agentic RAG Cost to Build and Run?
On this page

Short answer

Agentic RAG usually costs a five-figure sum to build and a few hundred to a few thousand dollars a month to run, depending on question volume, the number of agent steps per question and the model you choose. The biggest cost driver is not storage but the repeated model calls the agent makes while planning, retrieving and checking its answers.

What is agentic RAG?

Agentic RAG is a retrieval system where an agent, not a fixed pipeline, decides how to answer. It plans the steps, searches your documents, calls tools, checks the result and tries again if the answer looks weak. Plain RAG runs the same retrieval and generation steps every time; agentic RAG adapts the steps to the question.

That flexibility is the point. A hard question might need three searches, a calculation and a second check, while a simple one needs a single lookup. The agent makes those calls on the fly, which is why it can answer questions a fixed pipeline cannot.

The trade is cost and time. Every extra step is another model call, and every model call has a price and a delay. If you are new to the idea, what agentic RAG is explains the pattern before you budget for it.

What does agentic RAG cost?

Agentic RAG costs come in two parts: a one-off build and a monthly running cost. The build covers the agent design, the retrieval setup, the tools it can call and the evaluation set. The running cost covers model calls, retrieval, storage and the checks that keep answers honest.

Cost part What it covers Typical shape
Build Agent design, tools, retrieval, testing One-off, weeks of engineering
Model calls Planning, retrieval, generation, checks Per question, the largest running cost
Retrieval Vector store and search Small monthly fee, grows with documents
Evaluation Test questions and answer reviews Regular, part of running cost
Operations Logging, traces, alerts Small monthly fee

For a small internal pilot the build is usually a few weeks of engineering work, and the running cost is a few hundred dollars a month. A customer-facing system with high volume costs more on both sides. The figures below are planning ranges, not quotes; vendor prices change, so check the vendor site before you commit.

What drives the cost up or down?

The number of agent steps per question drives the cost more than anything else. Each step is a model call with its own input and output tokens. An agent that averages four steps per question costs roughly four times as much in model calls as a single-pass RAG system answering the same questions.

Model choice is the second driver. A large model costs more per token than a small one, and the difference multiplies across every step. Many teams use a small model for planning and retrieval decisions and reserve the large model for the final answer, which cuts the bill without losing much quality.

Question volume is the third driver, and it is the easiest to predict. If you know how many questions a day you expect, you can estimate the monthly model cost from the average tokens per question. Retrieval and storage matter too, but they are usually a small share of the total. The general case is covered in RAG development cost, which breaks down the non-agent parts.

Should you build it yourself or use a managed service?

Building it yourself gives you control over the agent steps, the tools and the prompts. That matters when the agent must follow strict rules, call internal systems or handle sensitive data. The price is engineering time: someone has to design the loop, build the tools and keep the evaluation set current.

A managed service handles the retrieval, the agent loop and the hosting for a monthly fee. It is faster to start and easier to run, but you get less control over each step and you pay for every question at the vendor's rates. It fits teams that want a working system quickly and do not need custom tools.

A common middle path is to build the agent loop yourself and use a managed vector store. You keep control of the decisions that affect answer quality and hand off the storage and search work. Start with the smallest version that answers real questions, then add steps only where the evaluation set shows they help.

How do you budget an agentic RAG project?

You budget an agentic RAG project by working from questions per day to tokens per month, then adding the fixed costs. Start with the volume you expect, the average steps per question and the average tokens per step. Those three numbers give you the model cost, which is the part that varies.

  1. Estimate daily questions. Use real ticket or search volume, not a guess.
  2. Measure steps per question. Build a small prototype and count the calls it makes.
  3. Price the tokens. Multiply tokens per question by the vendor's per-token price; see vendor site for current rates.
  4. Add retrieval and storage. A vector store and document hosting are usually a small monthly fee.
  5. Budget evaluation time. Someone must review answers every week, and that time is part of the cost.

Set a monthly cap and an alert at 80 percent of it. Agentic systems can surprise you: a bad prompt can double the steps per question overnight, and a cap is the cheapest way to catch that early. How the agent loop itself works is covered in how agentic RAG works.

Example (hypothetical): a support team running agentic RAG

Example (hypothetical): a support team expects 500 questions a day and builds an agent that averages 4 model calls per question. Each call uses about 1,500 input tokens and 300 output tokens.

That is 2,000 calls a day. Input tokens come to 2,000 times 1,500, which is 3,000,000 a day, and output tokens come to 2,000 times 300, which is 600,000 a day. At planning rates of $2.50 per million input tokens and $10 per million output tokens, the daily model cost is $7.50 for input plus $6.00 for output, which is $13.50 a day, or about $405 a month.

Retrieval and storage add about $80 a month, and evaluation and logging add about $50. The running total is about $535 a month. The build took four weeks of engineering, priced as a one-off of $25,000 at planning rates. If the team cut the average steps from 4 to 3, the model cost would fall by a quarter, to about $304 a month, which is why step count is the first thing to optimise.

What are the common mistakes?

The most common mistakes in agentic RAG are letting the agent loop without a step limit, skipping evaluation, and choosing the largest model for every step.

  • No step limit. An agent that can loop forever will, on the worst question, at the worst time.
  • No evaluation set. Without test questions you cannot tell whether a change helped or hurt.
  • Large model everywhere. Small models handle planning and retrieval decisions well and cost far less.
  • Untracked tool calls. Every tool the agent can call should be logged, or the bill is a mystery.
  • Ignoring the long tail. A few hard questions can cost more than hundreds of easy ones.

Graph-based retrieval adds its own cost shape, and graph RAG cost covers that variant if your documents are heavily linked.

Key takeaways

  • Agentic RAG costs more than plain RAG because each agent step is a model call
  • Steps per question is the biggest cost driver, ahead of model choice and volume
  • Small models for planning and a large model for the final answer cut the bill
  • Budget from questions per day through tokens per month, then add retrieval and evaluation
  • Cap the steps per question and review the most expensive questions weekly

Frequently asked questions

How is agentic RAG cost different from plain RAG cost?

Plain RAG runs the same steps for every question, so its cost is easy to predict. Agentic RAG lets the agent choose the steps, so a hard question can cost several times more than an easy one. Budget for the average steps per question, not the best case.

What is the largest running cost in agentic RAG?

Model calls are usually the largest running cost, because the agent makes several calls per question. Retrieval, storage and logging are normally a small share. If model calls are not your largest cost, check whether the agent is making calls you did not expect.

Can a small model run an agentic RAG system?

Yes, for many parts. Small models handle planning, tool selection and retrieval decisions well. Many teams use a small model for those steps and a large model only for the final answer, which keeps quality high and the bill low.

How many steps should an agent take per question?

Most working systems average three to five steps per question. Set a hard cap, such as eight, so a bad question cannot loop forever. Measure the real average from your logs and tune the cap from there.

Do I need an evaluation set for cost control?

Yes. The evaluation set shows which questions cost the most and whether extra steps actually improve answers. Without it, you cannot tell if a more expensive agent is better or just more expensive.

Is a managed agentic RAG service cheaper than building one?

It depends on volume. Managed services are cheaper at low volume because there is no build cost. At high volume, building it yourself is usually cheaper per question, but you carry the engineering and maintenance cost.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning an agentic RAG system and want the cost model worked out first? Talk to Hertiv.

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call