Selling AI agents as SaaS is a metering and margin problem
Public per-outcome prices, the token cost of a 12-turn run, and the parts of an agent business that break first: loops, tenant credentials, and billing reconciliation.
The unit you sell has to be the unit you meter
Intercom lists Fin at $0.99 per resolution. Salesforce launched Agentforce at $2 per conversation and now also sells Flex Credits by the action. Those are your public comps, and they cap your price before you know your cost.
Selling AI agents is a metering problem in a software costume. You are selling a unit of completed work whose cost is variable, inflatable by the customer's own data, and denominated in tokens. So the product you actually have to build is the meter, the cap, and the record of what the agent did.
Everything else is downstream of that. Pick the billable unit first, in writing, before you pick a framework. A resolution. A qualified lead. A reconciled invoice. A closed ticket. The unit has to be something your system can detect without a human reading the transcript, because if a person has to confirm it, your gross margin has a salary in it.
The failure I see most often in agent startups is a billable unit that nobody can measure. "Hours saved" cannot be metered. "Productivity" cannot be invoiced. "Conversations" can, which is why Salesforce picked it — a conversation has a start and an end and a row in a table. If you cannot write the SQL that counts your billable unit, you do not have a pricing model, you have a deck.
Related: autonomous agents are defined by who chooses the next step, which is the same boundary question applied to the runtime instead of the invoice.
What one run costs, using published prices
Take a support agent that resolves a ticket in 12 model turns. Each turn sends roughly 20,000 input tokens — system prompt, tool schemas, retrieved docs, the growing transcript — and returns about 800 output tokens.
Per run that is 240,000 input tokens and 9,600 output tokens.
Claude Sonnet 4.5 is published at $3 per million input tokens and $15 per million output. The arithmetic: $0.72 of input, $0.14 of output, about $0.86 per run. Against Fin's $0.99 per resolution, that is roughly 13% gross margin — before embeddings, before retries, before the infrastructure, before anyone answers a support email about your support agent.
Prompt caching is what moves that number. Anthropic charges cache reads at 0.1× the base input rate and cache writes at 1.25×, with a five-minute default TTL; OpenAI discounts repeated input prefixes the same way. If 75% of your per-turn input is a stable prefix — system prompt, tool definitions, the same twelve help-center articles — the input bill drops from $0.72 to roughly $0.23 plus a one-time write. The run lands near $0.40. Margin goes from 13% to about 60%.
That is not an optimization. That is the difference between a business and a hobby, and it is decided by how you order your prompt. Stable content first, volatile content last. Get that wrong and the cache never hits.
Two more levers with published terms: the OpenAI Batch API discounts 50% for work that tolerates a 24-hour window, which covers enrichment, classification and overnight research but not live chat. And model routing — running the cheap model for the eight boring turns and the expensive one for the two that matter.
Arithmetic on published list prices. Retries are billed too, so a step that fails twice before working costs three times this.
Set runs to your actual monthly volume. If the number at the bottom is larger than your MRR, you do not have a pricing problem, you have an architecture problem — and it is almost always context that grows every turn and never gets pruned.
Loops are where the margin goes
Unbounded loops are the most common production failure in agent systems, and they are expensive in a specific way: the cost grows linearly with steps while a per-outcome price does not move at all. An agent that normally resolves in 12 turns and occasionally spins to 60 on a malformed tool response has just sold $4 of tokens for $0.99.
The fix is a step cap enforced outside the model, because a model asked to limit itself is still the thing deciding. Both major SDKs ship one. LangGraph defaults to a recursion limit of 25 super-steps and raises GraphRecursionError past it. The OpenAI Agents SDK takes max_turns on the run and raises MaxTurnsExceeded. Those are defaults, not designs — pick your own number from your p99 turn count and alert on every breach, because a breach is either a bug or an abuse pattern and both are worth a page.
Caps belong at three levels, not one: steps per run, tokens per run, and spend per tenant per day. The third is the one people skip. It is also the one that matters when a single customer connects a mailbox with 400,000 threads in it. Run the agent inside a durable workflow — Temporal is the obvious choice for this — so a run that trips a cap can be inspected and resumed rather than restarted from token zero.
The architecture I would not ship: one runtime, one credential
I would not build a single shared agent runtime that holds one set of credentials for every tenant and relies on the prompt to keep data separated. It is the fastest thing to ship. It is also the only architecture whose failure mode is a headline.
The reason is compound, and Simon Willison named the shape of it in June 2025: the lethal trifecta is private data, exposure to untrusted content, and a way to send data out. An agent with all three is exploitable, and prompt injection sits at LLM01 in the OWASP Top 10 for LLM Applications. A support agent reads tickets written by strangers. That is untrusted content by definition. Give it a shared database handle and an HTTP tool and you have assembled all three on purpose.
What I would build instead: per-tenant credentials, issued per run, scoped to that tenant's resources and expiring with the run. Isolation enforced in the database rather than in application code — PostgreSQL row security policies apply at the table, so a forgotten WHERE tenant_id = ... is not a breach. Tool access through MCP servers with real authorization, since the 2025-06-18 revision of the spec defines an authorization framework for HTTP transports, rather than tools that read ambient environment variables. And an egress allowlist. The agent cannot POST anywhere you have not named.
The uncomfortable part: none of this stops injection. It bounds the blast radius to one tenant's data and one tenant's permissions. That is the achievable goal. Anyone selling you prompt-level defenses as a solution is selling you a filter in front of a door you left open. More on what you inherit when you host this yourself: self-hosting an agent framework is the easy half.
Four pricing models, ranked by what breaks first
| Model | What you charge for | What breaks first |
|---|---|---|
| Per seat | Humans with logins | The pitch. You sold labor replacement, then billed by headcount — every success shrinks the contract |
| Flat subscription | Access, unlimited use | One power user. Variable COGS under a fixed price has no ceiling, and the heaviest 5% set the loss |
| Usage / credits | Runs, actions, tokens | Adoption. Buyers throttle usage to control spend, so the product that works best gets used least |
| Per outcome | Resolutions, qualified leads, reconciled invoices | Definition. You will argue about what counted, and the customer will win |
Per seat is the one I would refuse outright for an agent product. If the agent does the work of a person, per-seat pricing means your best outcome — the customer needs fewer people — is also your churn event. You are shorting your own product.
Outcome pricing is the right destination and the wrong starting point. You cannot sell a resolution until your system detects a resolution without a human in the loop, and most teams need months of labeled runs before that detector is trustworthy. Start with usage priced transparently, instrument the outcome in parallel, and switch when the detector and the invoice agree. Credits are the honest middle: they let the buyer cap spend, which is the objection you will hear in every deal anyway.
One structural note. Outcome pricing with no floor makes your revenue a function of the customer's ticket volume, which you do not control. A platform fee plus a per-outcome rate keeps the base predictable without pretending usage is free.
Billing is a reconciliation problem
The billing system is not the hard part. Stripe's usage-based billing takes meter events and does metered subscriptions; Lago does the same thing if you want it self-hosted and inspectable. Either works.
The hard part is that your agent logs and your invoices are two different systems that have to agree, forever, under retries.
Three places this goes wrong:
- Double-counted retries. A run that fails at step 9, resumes, and completes has emitted two sets of events. Every meter event needs an idempotency key derived from the run ID and the step, not from the wall clock.
- Billed failures. A run that burned 40,000 tokens and returned nothing still cost you money and must not appear on the customer's bill. Write the usage record only on the terminal success state, and eat the loss visibly in your own COGS dashboard where you will see it.
- No audit trail at the row level. When a customer disputes an invoice, you need to produce the run ID, the trace, and the outcome evidence for every line item. An aggregate count — "the logs say 1,412 resolutions" — is not something the customer can check line by line, and a dispute that cannot be settled at the row level tends to be settled with credits.
Watch the stacking fees too. Stripe is 2.9% + $0.30 per successful US card charge, with Billing fees on top of that — immaterial on a $4,000 monthly invoice, material if you let customers buy $20 of credits at a time.
Containment is what gets renewed
The demo sells the agent. The renewal is bought by whoever has to explain it to their boss when it gets something wrong.
So the surfaces around the agent are product, not plumbing: a trace for every run that a non-engineer can read, a replay that reproduces a decision from the stored inputs, a confidence threshold that escalates instead of guessing, and a kill switch that one person can hit without filing a ticket. Tracing ships in the OpenAI Agents SDK by default. The part nobody ships for you is the customer-facing version of it.
I would not delegate spend authority to an agent yet — not ours, not a customer's. Read-and-draft is a different product from read-and-act, and read-and-act-with-a-credit-card is a different product again, with a different buyer and a different insurance conversation. I'm building toward a zero-human company and I still put the payment step behind a human or a hard-coded policy engine. The reasoning is in agentic commerce means the agent pays, not just recommends.
Escalation rate is the metric I would put on the wall next to margin. An agent that escalates 30% of the time and is right about which 30% is sellable. An agent that escalates 2% and is quietly wrong on 8% is a liability you are charging for.
Who actually buys it
The buyer is the person who owns the number the agent moves, and that person already has a budget line for the humans or the outsourcer doing it today. That is the pitch: here is the same unit of work at a lower cost per unit, with an audit trail the current vendor does not give you.
So your first product is one agent doing one job you can name in a sentence — the single-bounded-worker approach set out in how to build an AI company, starting with one bounded worker. Not a platform. Platforms get bought by people who already trust you with one job.
At Metadata I took a product from $0 to $15M ARR and raised $50M selling software to demand-gen leaders, and the thing that closed deals was never the model underneath — it was that the buyer could see what happened and tell their CMO why. Six patents in AI-driven marketing did not win a single deal on their own.
The agent itself is not defensible. Anyone can wire the same SDK to the same model this quarter. What survives a competitor copying your prompt is the labeled outcome data, the integration nobody wants to rebuild, and the escalation path your customer's team has already trained itself around — which is the actual subject of what survives a competitor copying you. Build the meter and the record first. Those compound; the prompt does not.
Sources
- Intercom pricing (Fin) — Fin priced per resolution ($0.99) — the public comp for outcome pricing in support
- Salesforce Agentforce pricing — Per-conversation pricing and Flex Credits sold by the action
- Anthropic model pricing — Claude Sonnet 4.5 at $3 / $15 per million input / output tokens
- Anthropic prompt caching — Cache reads at 0.1x base input price, cache writes at 1.25x, five-minute default TTL
- OpenAI prompt caching guide — Discounted repeated input prefixes
- OpenAI Batch API — 50% discount for asynchronous batch jobs with a 24-hour completion window
- LangGraph GRAPH_RECURSION_LIMIT — Default recursion limit of 25 super-steps and the error raised when exceeded
- OpenAI Agents SDK — running agents — max_turns parameter and MaxTurnsExceeded
- OWASP Top 10 for LLM Applications — Prompt injection ranked LLM01
- Simon Willison, 'The lethal trifecta' — Private data + untrusted content + exfiltration as the compound risk (16 June 2025)
- PostgreSQL row security policies — Tenant isolation enforced in the database rather than application code
- Model Context Protocol specification, revision 2025-06-18 — Authorization framework for HTTP-based MCP transports
- Stripe usage-based billing — Meter events and metered subscription billing
- Stripe pricing — 2.9% + $0.30 per successful card charge in the US, plus Billing fees
- Lago (open-source metering and billing) — Self-hostable usage metering alternative
- Temporal documentation — Durable execution and workflow replay for long-running runs