outcome-based billing for AI agents — built for agent builders shipping instrumented customer-facing agents

Charge per agent run on delivered outcomes, not flat subscriptions

If you're shipping a customer-facing AI agent, every billable run has to make margin sense. Rev gives you per-agent cost caps, agent margin tracking, deferred outcome reconciliation, and Stripe-native monetization — no spreadsheet math, no surprise refunds when an agent run doesn't deliver.

One email from the agent builder track. Day 1 SDK quickstart, Day 3 outcome deep-dive.
Read the developer guide Rev vs Stripe, Helicone, Langfuse
Built for AI agent builders

Four primitives that fix outcome-based agent billing

Each one closes a margin gap that subscription tools and observability-only stacks can't. Wire them in once and your agent has commercial superpowers from the first run.

$

Per-agent cost caps

Set a hard ceiling on every agent task — base fee + token rate + outcome bonus. Over-cap runs are rejected before they bill, so unpredictable per-call agent spend stops being a surprise at the end of the month.

Agent margin dashboards

Every meter event records the customer charge and your cost side-by-side. The dashboard groups margin by agent_id, customer_id, and time window — see unit economics per agent before your worst task eats your month's margin.

Deferred outcome resolution

Charge only when the agent outcome delivers: the customer acks the result, completes the task, accepts the draft. Failed or expired pending events automatically refund the bonus — the customer only pays when the agent delivered.

Sub-15-minute quickstart

From API key to first billable agent outcome in under 15 minutes. SDK installs in one line, your agent services emit meter events, and the outcome pricing rules are configured from the dashboard — no multi-week billing migration project.

Code-first

Per-agent cost cap in one POST

Out-of-the-box SDK in Node.js and Python. Configure the per-agent cap once; Rev rejects over-cap runs and reports the cost side-by-side with the outcome bonus.

agent-pricing.js
Node.js
// Configure a per-agent cost cap on the agent billing tier
const tier = await rev.pricing.createTier({
  agent_id: 'research-agent-v2',
  base_fee: 0.10,          // $0.10 per agent run
  token_rate: 0.00003,     // per token consumed
  outcome_bonus: 4.00,      // $4.00 per task the user acks
  cost_cap_usd: 0.50,       // per-agent run ceiling
  currency: 'USD',
});

// Meter every agent run event — returns the OK billable event
const event = await rev.meter.emit({
  agent_id: 'research-agent-v2',
  customer_id: customer.id,
  tokens: inputTokens + outputTokens,
  outcome: 'pending',
});

// Resolve the agent outcome — bonus posts on success, refunds on failure
if (userAcked) {
  await rev.outcomes.resolve(event.id, 'success');
} if (taskFailed) {
  await rev.outcomes.resolve(event.id, 'failure');
}
Side-by-side comparison

Rev vs observability-onlyagent stacks

Stripe metered billing, Helicone, and Langfuse observe or charge on schedule. They can't enforce per-task cost caps or reconcile a hindsight outcome. This is the gap Rev fills for AI agents.

Capability Rev Stripe metered billing Helicone Langfuse
Outcome-based billing for AI agentsCharge only when the agent task reaches a real success milestone — user ack, completed deliverable, accepted draft Built-in Not supported Observability only Observability only
Per-task / per-agent cost capsHard ceiling per agent task — over-cap runs rejected before billing Built-in Not supported Not supported Not supported
Agent margin trackingPer-agent and per-customer margin dashboard showing token cost vs revenue Built-in Aggregate only Cost only Cost only
Deferred outcome resolutionPending → success/failure/expired with bonus reconciliation when the agent task closes First-class Not supported Not supported Not supported
Usage-based monetizationMetered agent usage aggregated per agent_id, customer_id, and time window Built-in Metered events Token logs Trace logs
Request-level traces & auditPer-agent usage traces with cost and outcome state for finance review
Metered events via Rev SDK
Per-event logs Per-request traces Per-request traces

The common pattern: keep Stripe for charging, Helicone or Langfuse for trace observability, wire Rev for outcome-based metering. The services compose — Rev sits in front of charging as the pricing engine, and behind your agent runs as the per-task cost-cap layer.

From first meter event to first agent bill in under 15 minutes

Free tier, no Stripe required to start, dashboard updates the moment you resolve your first agent outcome. Built for agent builders that need outcome-based monetization wired to Stripe today.

Read the developer guide → Get Your Free API Key

Frequently asked questions — AI agent billing

How does Rev prevent margin leakage on AI agent runs?
Rev decouples agent run cost from the outcome delivered. You define a per-agent cost cap (e.g. $0.50 per agent task), a token rate per 1k tokens, and an outcome bonus (e.g. +$4.00 per task the user acks or completes). The SDK reports agent run events and the outcome state per customer; Rev computes the billable amount and pushes it to Stripe. Failed or expired outcomes automatically refund the bonus, so margin leakage on unpredictable-per-call agent spend stops at the pricing layer, not after the customer churns.
Can I set per-task or per-agent cost caps without breaking shared metering?
Yes. Each agent_id (or each customer_id running that agent) gets a pricing tier defined in Rev, so cost caps are scoped to the agent task without isolating metering. One pricing engine, one meter pipeline, but the cap is enforced at meter-time per run — over-cap usage is rejected before it bills, and the event is logged as pending for review. You set the cap per agent or per customer from the dashboard or API.
How do agent margin dashboards work?
Every meter event records the customer charge and your cost side-by-side — token spend, base fee, outcome bonus, refunded bonuses. The dashboard groups margin by agent_id, customer_id, and time window, so agent builders see per-agent unit economics in real time, segmented by the cohorts that actually drive expansion revenue vs the long-tail tasks that eat margin.
Why use Rev instead of agent observability tools like Helicone or Langfuse?
Helicone and Langfuse are observability layers — they record traces, latency, and token counts, but they don't bill. They have no built-in per-agent cost caps, no deferred outcome bonus reconciliation, and no pipeline that hands outcome-resolved amounts to Stripe. Rev is the outcome-priced monetization layer that sits next to those tools — capture the trace in Helicone, decide what to charge in Rev, push the billable amount into Stripe.
How long does the quickstart onboarding take for an agent builder?
Most agent builders ship outcome-based billing in under 15 minutes: create an API key, install the Node.js or Python SDK, send one /v1/meter call from one of your agent services, configure a per-agent pricing tier with a per-task cost cap and outcome bonus, resolve an event as success, and the dashboard updates while Stripe gets the billable record.
How does deferred outcome reconciliation work for AI agents?
Meter events start as pending when the agent run kicks off. The agent emits the outcome at a later checkpoint — success when the customer acks the result, failure when the task errors or the user rejects, expired if no outcome arrives within the window you configured. On success the outcome bonus posts and Stripe gets the full amount; on failure or expired the bonus refunds automatically and only the base fee + token rate stays. You're never charging customers for tasks their agent bombed.
Does Rev use Stripe for monetization on AI agents?
Yes — Stripe-native for charging. The per-agent metering, outcome resolution, pricing engine, and agent margin dashboard work without Stripe, useful when you're prototyping or billing through your own PSP. To monetize, connect Stripe; Rev pushes outcome-resolved events into Stripe checkout sessions and subscriptions automatically, so your agent revenue lands in Stripe with the per-agent cost cap already enforced upstream.
Building agent-powered products? Join the outcome-based billing track for AI agents.