How much does it cost to implement an AI agent in a SaaS?
The model price is not the TCO. Split the cost into five lines, measure it per successful action, and kill the case when it does not fit the margin. Inside, the business case a CEO can sign.

The question is not "how much does an AI agent cost?". It is "what upfront and recurring investment does adding an agent to my SaaS product require, and at what point does it stop fitting the margin?". If you want a closed price, there is none. If you want a TCO a CEO can sign, there is: you split it into five lines, you measure by successful action, and you kill the case when unit cost exceeds the value that action generates.
In the conversations we have, the most expensive mistake is not picking the wrong model. It is budgeting only tokens and discovering, three months later, that 70% of the spend is in engineering, operations, and the time of people who already had a roadmap.
The model price is not the TCO
When someone asks how much it costs to integrate AI into a SaaS, they almost always show a sheet with API rates. That is a useful input and an incomplete answer. The model is the most visible line item and, in many use cases, the smallest.
A weekend demo can cost less than what you spend on the team's coffees. Taking that same flow into a multi-tenant product (with permissions, traces, a cost cap, and someone on call) changes the order of magnitude. Not because the model suddenly gets more expensive: because the system around it appears. We cover that in detail in the demo versus production checklist. Here we stay with the bill.
Three different numbers, three different owners:
Model cost. Input tokens, output tokens, cache, and tool calls. Finance sees it on the provider invoice. It changes every quarter and you can cut it with a smaller model, cache, and less context.
System cost. Identity, permissions per tenant, observability, evaluation, queues, retries, rollback. Engineering sees it. It does not show up on the API rate card and it is what decides whether the agent scales or stays a pilot.
Decision cost. Hours from the CEO, CTO, legal, and product to approve the case, define acceptable risk, and decide whether to build or buy. The P&L sees it as opportunity: every month in limbo is a month without learning.
If your AI agent business case only has the first line, it is not a business case. It is a token budget.
The five line items that do belong on the sheet
Before you ask a vendor or your team for a number, write these five lines. If any of them stays blank, the TCO is incomplete.
1. Model and execution. Price per million tokens, cache, embeddings if there is RAG, and above all tool calls: every time the agent touches your API, an MCP, or a sandbox, you pay inference plus infra. Treat providers' public pricing as a floor, not a ceiling: the real price goes up with retries, long context, and reasoning models.
2. Product engineering. Turning your API into tools, injecting context per tenant, defining scopes, and standing up the harness. This is not "an intern and a weekend". It is the work that makes the agent talk to your SaaS and not to a generic PDF.
3. Operations and quality. Traces, evaluation, regression datasets, alerts, on-call. An agent without measurement is variable cost without a brake. This is where you decide whether you can drop to a smaller model or whether you are flying blind.
4. Risk and support. Errors that reach the customer, tickets, compliance (GDPR, AI Act), human review on flows that write. The cost is not only the hypothetical payout: it is Customer Success time and brand wear.
5. Opportunity cost. What the team stops doing while it builds the agent. If your product roadmap is already tight, "we'll do it in-house" is not free: it is postponing what pays payroll today.
DORA software delivery research has been saying the same thing in other words for years: performance is not set by the tool you buy, but by the team's delivery capabilities. With agents, that sentence translates into euros per month.

Upfront investment: what you pay before the agent touches a customer
The cost of implementing an AI agent does not start when the user opens the chat. It starts when someone decides which case deserves production.
In a typical B2B SaaS, the upfront investment looks like this. These are ranges, not closed budgets; the low end assumes a narrow case and a team that already has clean APIs.
Discovery and scope cut (1-3 weeks). Pick a flow with measurable value, define "success", and decide what the agent will not do. Cheap in money, expensive if you skip it: an open scope multiplies the rest.
Integration with your product (2-8 weeks). Expose endpoints as tools, auth per tenant, real context, limits. If your API is already coherent, you land on the low end. If the agent has to "understand the company" through prompts, you land on the high end.
Production layer (2-6 weeks in parallel or after). Logs, cost per run, minimum evaluation, spend cap, rollback. This is the work the demo does not show and the work that prevents the invoice surprise.
People. A platform/AI engineering profile part-time or full-time, plus hours from product and from someone who knows the domain. Salary does not go on the vendor slide. It goes on yours.
Translated into a range a CEO can use in committee: standing up the first usable agent in product is usually between a few weeks of a senior profile and a quarter of a small team, plus model spend from the tests. The €5,000 POC over two Saturdays exists. It is almost never the system you want to put in front of a customer.
If the case is a read assistant over internal docs, the upfront compresses. If the agent writes in the customer's tenant (creates objects, changes states, fires workflows) the upfront stretches, and it should stretch.
Recurring cost: tokens, tool calls, and people on call
This is where the real SaaS AI agent price is decided. Monthly spend is not a flat license. It is a function of volume × complexity × required quality.
Model. A simple conversation turn, with little context and a light model, can cost cents of a dollar or less. The same turn with a long history, RAG, a reasoning model, and five tool calls goes to tens of cents or more than a dollar. Multiply by conversations per month and it stops being "the cost of AI" and becomes a COGS line.
Tool calls. In product, the agent does not only talk: it calls. Each call to your API consumes orchestration tokens and, if there is a sandbox or connectors, infra. That is why we measure by tool call and not only by token: it is the unit that looks like a product action.
Observability and evaluation. Retaining traces, running evals, keeping a regression dataset. Cheap at first; it grows when you want to sleep well. Cutting here is saving today to pay for incidents tomorrow.
Operations people. Someone looks at failures, tunes prompts, decides when to change models, and handles the case that left the lane. Even if it is 20% of a profile, it is recurring. If nobody has it on the org chart, the cost still shows up: in the CTO's late-night Slack.
A practical rule: if you cannot say how much a successful action costs you this week, you do not have a TCO. You have an invoice you have not read yet.
Unit economics: how much you can afford per conversation
The business case is not approved with an annual total. It is approved with an inequality.
Cost per successful action < value captured by that action × success rate.
Example, without dressing it up as a named real case. An agent that resolves a support ticket with €12 of internal cost. If it is right 70% of the time and the remaining 30% escalates to a human (with the human cost plus the failed attempt), the combined cost still has to stay under those €12. If the model alone already eats €2 per conversation and there are retries on top, the case is not "expensive AI": it is a flow that should not be autonomous yet.
Three levers you do control:
Cut scope. Fewer tools, less context, less freedom to wander. The cheapest agent is the one that does one thing.
Drop to a smaller model when the eval allows it. The large model is for the 10% of hard turns, not for saying hello. Without evaluation, you do not dare to drop and you pay the premium forever.
Put a cap on it. Limit per tenant, per thread, and per day. A retry loop with no ceiling turns a cent into an invoice. We have seen it more times than we like to admit.
If you sell a SaaS with 70-80% gross margin, an agent that adds 15 points of COGS in the segment where you turn it on is not innovation. It is a pricing decision. Either you raise price, or you pick a flow where value per action is higher, or you do not turn it on across every plan.
A business case a CEO can sign
Forget the "AI potential" slide. For the committee, one page and four numbers fit.
1. Case and metric. Which flow, which action counts as success, who the user is. If it does not fit in one sentence, it is not ready to budget.
2. Upfront investment. Engineering weeks + test cost. Include the production work, not only the prototype.
3. Recurring cost at volume. Three scenarios: 1,000, 10,000, and 100,000 actions per month. In each one, model + ops + support. The middle scenario is the one that usually lies least.
4. Payback. In which month the value (hours saved, conversion, retention, tickets avoided) covers upfront + recurring. If payback depends on a volume you do not have, the case is a bet, not a plan.
Add a line for "what happens if the model changes price". Because it will change. A TCO that cannot take a 30% rise in inference is not a TCO: it is a wish.
And one for risk: what percentage of actions needs a human, and what that human costs. The agent that "almost" resolves and then escalates everything is more expensive than having no agent.
Signs the number does not add up
You do not need a sophisticated financial model. These signs are enough to stop.
The team estimates tokens and "we'll see the rest later". The rest is the project.
Nobody knows the cost per thread this week. Then nobody can decide whether to drop to a smaller model.
The use case writes to customer data and there is still no cap and no owner. The hidden cost is the incident.
ROI is calculated with a 95% accuracy that nobody has measured. Measure first on 5% of traffic.
The "we'll build it ourselves" alternative does not include platform, evals, or on-call. You are comparing a prototype with a product.
If several of these are true, you do not need a cheaper vendor. You need a narrower scope or more weeks of system. The price of creating an AI agent in-house is not the salary of whoever writes the first prompt. It is the cost of operating it in month 6, when the model has changed twice and the intern is already gone.
How to lower TCO without shrinking the business case
There are ways to spend less that do not consist of picking the dumbest model and hoping.
Start on one plan or one segment. Unit economics are learned with real volume, not with an extrapolation from 40 demos. A free tier or an instrumented pilot is for that: seeing tool calls, tokens, and failures before you commit the margin of the whole base.
Measure by agent, not by account. A support agent and an onboarding agent do not have the same cost or the same value. If you mix them, the one that destroys margin hides behind the one that creates it.
Cache, minimum context, just enough tools. Every document you stuff in "just in case" is paid on every turn. Every extra tool is a chance to get it wrong and retry.
Do not build the boring layer twice. Observability, permissions, a cost cap, and MCP on your API are platform work. If your team stands that up for a single agent, the TCO of the second agent stays high. If that layer already exists (owned or bought) marginal cost drops.
At Devic that layer is the product: a harness with observability and cost control, tool calls as the unit, and plans with included volume so you can measure before you scale. The free plan covers 5,000 tool calls a month with no card; it is not the production TCO, it is how you stop guessing. If the case needs on-premise, long retention, or hands-on support, the number is no longer self-serve and you talk with the requirements on the table.
Checklist: do you have a TCO or only a token invoice?
Before you approve the business case, the team should be able to answer yes to this:
Is the flow and the success metric written down?
Does the upfront investment include production, not only the demo?
Is there a cost per successful action, not only a monthly total?
Are there three volume scenarios, not one "conservative" one that is actually the PowerPoint one?
Is there a spend cap per tenant and an owner with a name?
Does payback survive a 30% rise in the model?
Do you know which part you will build and which part you do not want to build again?
If two or more are missing, the next step is not to negotiate price. It is to close scope and instrument.
Once you have those lines, the rest is arithmetic. And if you want to check them against a real case (your API, your margin, your volume) we look at it with the numbers in front of us, not with a potential slide.
Latest posts
Ready to turn your platform AI-Native?
Centralize agents, tools, and flows in one platform and start scaling with less friction.
Build and run agents without friction
Connect your current infrastructure
Devic AI
Devic AI
Devic AI




