Know what every customer actually costs you.
Capture model calls, agent steps, retries, and non-LLM usage. Attribute cost per customer in real time. React before the bill lands. Bill through Stripe Connect.
Not a dashboard.
A cost system that reacts.
Discover
Use the CLI and integration guide to identify LLM providers and declared non-LLM cost sources before production rollout.
Track
Stream tokens, tool calls, agent steps, retries, and configured usage metrics to the same customer-level cost view.
React
Use rules for alerts, budget hard-stops, throttles, model routing, failover, and margin recommendations.
Bill
Connect Stripe, generate invoices, and expose usage to end customers through a white-label portal.
You are blind to
30-60% of your agent cost.
LLM-only view
actual per-customer cost: unknown
AgentMeter view
acme.co · today · $0.46
Rules that run before the call,
not after the bill.
rule budget_limit { mode pre-call when customer.daily_spend >= 50 then block with AgentMeterBudgetExceeded}Blocks runaway spend before the provider call. Events still reconcile back to server truth.
Five minutes to first cost.
Thirty to full pipeline.
// 1. installpnpm add @agentmeter/sdk// 2. init — auto-patches openai / @anthropic-ai/sdk / aiimport { init, track } from "@agentmeter/sdk";import OpenAI from "openai";init({ apiKey: process.env.AGENTMETER_API_KEY });const openai = new OpenAI();// 3. wrap your agent run with customer + step contextawait track(user.id, { step: "draft" }, async () => { await openai.chat.completions.create({ ... });});A usage portal
under your brand.
Hi, Morgan
May 2026One tool
instead of three.
| Spreadsheet + provider dashboard | Helicone / Langfuse | Build in-house | AgentMeter | |
|---|---|---|---|---|
| Automatic LLM cost capture | Yes | Yes | Yes | Yes |
| Non-LLM cost tracking | No | No | No | Yes |
| Step-level cost per customer | No | No | No | Yes |
| Pre-call budget enforcement | No | No | Yes | Yes |
| Model routing per step | No | No | Yes | Yes |
| Stripe Connect billing | No | No | No | Yes |
| White-label customer portal | No | No | No | Yes |
| Open core, self-hostable | No | Yes | Yes | Yes |
Built for long questions.
Specific enough to cite.
LLM Cost Tracking For AI Agents
How to track model spend, customer IDs, steps, retries, and token usage for production AI agents.
Non-LLM Cost Tracking For AI Agents
How to track search, speech, vector database, workflow, and other non-LLM API costs next to model spend.
Per-Customer AI Cost Attribution
A practical guide to attributing AI agent cost by customer, step, model, and source before margins drift.
Pre-Call Budget Enforcement For AI Agents
How to stop AI agent overspend before a provider call leaves the runtime.
Usage-Based Billing For AI Agents
How AI agent businesses can turn cost telemetry into customer-facing usage, invoices, and pricing controls.
Report Usage, Not Cost
Why AI agent instrumentation should emit raw usage metrics while the backend calculates dollars.
MIT-licensed. Self-host in one command.
SDKs and core backend are MIT. Run AgentMeter on your own infrastructure when compliance requires it. Enterprise modules in src/ee are source-available under ELv2.
# clone and run git clone github.com/SpaceGravity/agentmeter docker compose up -> http://localhost:3000 # SDK in your app pnpm add @agentmeter/sdk
Start free.
Pay only when you grow.
Pro
Most popular14-day free trial
- - Up to 5M events / mo
- - Reactive rules + alerts
- - Webhooks
- - Email support
Scale
14-day free trial
- - Up to 50M events / mo
- - Customer billing portal
- - Advanced rules engine
- - Priority support
Frequently asked
How does AgentMeter integrate with my agent?
Install the TypeScript or Python SDK, create a telemetry API key, and send cost-shaped events from your runtime. SDK failures are handled so your host agent does not fail because AgentMeter is unavailable.
Do you read my prompts or completions?
No. AgentMeter expects cost-shaped telemetry only: model, tokens, step name, customer ID, and configured usage metrics. Do not send prompts, completions, emails, or raw user messages.
Can I bill my customers through AgentMeter?
Yes. Stripe Connect, invoice drafts, and the customer portal are part of the billing surface for builders who want customer-facing usage and billing workflows.
What about non-LLM costs?
Use reportUsage / report_usage to track API calls, lookups, executions, or any custom metric. Non-LLM sources can be priced and shown alongside model costs.
Can I self-host it?
The SDKs and core backend are MIT licensed. Enterprise-only modules live under src/ee and are licensed under ELv2.
Your customers' costs are streaming somewhere.
Make them visible.
Five minutes with the SDK. A real cost picture once events arrive.