“The unpredictability is worse than the absolute cost.”
Burn-rate forecasts with a projected exhaustion date
Get 2,500 events tracked for freeSign up now
Give every agent an identity, a budget, and a hard limit enforced before the provider call. One line of code.
2,500 events per month, free
Works with the providers your agents already call
Account-level caps fail in multi-agent systems because several agents share one credential, so hitting the cap stops all of them rather than the one misbehaving. Provider limits are commonly notification-only, and by the time an alert is read the spend already exists.
Capsera sees each agent and each run separately, and refuses the call before the money leaves.
Anthropic
Invoice
No further breakdown available.
Capsera
Invoice · same period
Same month. Same agents. One has a ceiling.
Without Capsera
$22,635
The invoice arrives after the damage is done.
With Capsera
$1,000
The call is blocked before you are billed.
How it works
One line at the top of your app. No proxy, no gateway, and no changes to your existing call sites.
pip install capseraSub-agents inherit their parent's identity from an in-process context stack, so a graph composed at runtime is attributable without threading a tag through every request.
capsera.init(agent="data_extractor")A budget per agent and per run, with a block action rather than an alert. The limit is checked before the provider call, not reconciled after the invoice.
capsera.budget(monthly=500, on_exceed='block')Spend attributed per agent, per run and per customer, with cost-aware routing when a cheaper model would do.
capsera.route(prefer='cost')A threshold on the envelope, not just the ceiling. The warning arrives while there is still something to decide, rather than as a line on next month's invoice.
reasoning_agent is at 66% of its monthly budget
$301.40 of $460. At 100% the next call is refused rather than billed.
An MCP server, so the assistant in your editor can answer what an agent cost, what is near its budget and what to route differently, without leaving the thing you were doing.
{
"mcpServers": {
"capsera": {
"command": "capsera-mcp"
}
}
}Shape only. The published command and its options will land with the server.
Org-wide spend, agent activity, and governance status at a glance.
Total spend
$1.69
Last 7 days
Total calls
200
API requests
Active agents
4
Unique agents
Tokens used
514.8K
344.8K in · 170.0K out
Daily spend
8 days · last 7 days
Top agents
View all ›Ranked by spend this period
Model breakdown
Analyze ›Spend by model
Live events
LiveWaiting for events. Traffic appears here in real time.
Works with
The SDK patches the provider clients in place at init, sync and async, so nothing about how you make calls has to change.
Called directly from your own code.
Open models, served fast.
Behind your existing cloud account.
Attribution follows the graph, not the call site.
Against a provider dashboard
Every row above is something Capsera does and a provider dashboard does not. Setup is one line of code either way.
Total usage
$642.00
No further breakdown available. Usage is reported per API key.
Total spend
$642.00
Eleven agents, each with its own line.
A provider usage console. Illustration, not a screenshot. Generic on purpose, because the limitation is in the data model rather than any one vendor’s design.
The same month in Capsera. Same total, four ways of asking what it was spent on.
Primary research · 2026-07-31
Cost defect
Clean
39 of the 51 repositories making direct LLM calls carried at least one cost defect. Not bugs: the code works. Patterns that quietly multiply cost, and none of them show up on a provider dashboard.
347 system prompts defeat caching · commit 5dff5c4
Pricing
For trying it on a side project.
For a team shipping one product.
For several teams sharing one bill.
For regulated and high-volume estates.
One line to adopt. Nothing stored. Nothing blocked if we go down.
Every quote below is from a public post by someone running language models in production without a governance layer. We hit the same wall ourselves, which is the reason Capsera exists.
“The unpredictability is worse than the absolute cost.”
Burn-rate forecasts with a projected exhaustion date
“One of my agents decided to call the same tool 47 times in a loop. In production.”
Anomaly detection flags the spike the same day
“The usage dashboard doesn't work because we use the same key for all customers.”
Cost attributed per agent, team, and customer
“Enforcement/blocking is bypassed.”
Enforcement in the call path, not a dashboard warning
“The marginal cost of serving one more query does not approach zero.”
Gross margin per customer, not just total spend
“Project limits are no longer hard limits, and are notification only.”
Hard limits that stop the call, not just alert on it
“I left an AI agent running, walked away for 20 minutes, and came back to a bill I didn't expect.”
Alerts at 80%, hard stop at 100%
“…never checked during request authentication.”
Budgets that hold at org, team and agent level
“This api is completely useless… it is just showing total usage.”
Live dashboards per agent, model, and day
Simple answers to make things clear.
Tracking never does: events go into a non-blocking in-memory queue and a background thread flushes them every 500ms. Budget enforcement adds one lightweight pre-call check, and it is optional. Turn it off and Capsera is fully out of your call path. Either way, if the backend is ever unreachable, everything fails open and your calls proceed untouched.
Enforcement lives in the SDK, inside your own process. Before each provider call it checks the budgets that match the calling agent; a budget with a block action stops the call before any provider spend, while throttle and downgrade reshape it. If Capsera is ever unreachable the check fails open, so you lose enforcement for that moment, never availability.
Thirteen, across three kinds. Model APIs: Anthropic, OpenAI, Google, Mistral, Cohere, DeepSeek and Kimi. Inference platforms: Groq, Together, Fireworks and Cerebras. Cloud model services: Vertex AI and Bedrock. Sync and async clients both. The SDK patches the provider libraries automatically at init, so there is no proxy, no gateway, and no change to your existing call sites.
Name each agent where it makes its calls, with a decorator or a context manager, then give it a budget envelope with an action at the limit: alert, throttle, or block. Because identity is inherited through the call context, an agent that spawns sub-agents covers them too, so putting every agent on a budget does not mean enumerating them by hand. Budgets can also be scoped to a team or the whole organisation, and the scopes compose.
Yes, and that is the main reason to use Capsera rather than a provider spend limit. A key-level cap stops every agent sharing that credential when one misbehaves; a per-agent envelope stops only the offender and leaves the rest running. Budgets scope to a single agent, a team, or the organisation, over daily, weekly, or monthly periods with calendar-aware resets.
Capsera instruments the provider clients rather than the framework, so calls made through LangGraph, CrewAI, LangChain, AutoGen, LlamaIndex or plain SDK code are all captured, and helpers attribute spend to LangGraph nodes and CrewAI agents and tasks. One honest caveat: CrewAI routes some calls through litellm internally, so direct client patching can miss those. Framework-level interception that closes this gap is the next scanner change.
Never. Prompt analysis extracts structural metadata only: token estimates, message counts, cache usage, context window utilization. The text of your prompts and completions stays in your infrastructure.
Budgets scope to a single agent, a team, or your whole organization, over daily, weekly, or monthly periods with calendar-aware resets. Each budget picks its action at the limit, either alert, throttle, or block, and you get an alert at your threshold (80% by default) plus an exceeded alert at 100%.
Costs are computed from exact per-model pricing tables using decimal arithmetic, based on the real input, output, and cache token counts returned by each API response, not estimates.
Ingestion returns a clear limit response with your current usage and reset date, and the SDK stops sending events until the month rolls over. Hitting the plan limit never blocks your LLM calls. Only tracking pauses.
Still have questions?
Get AssistanceInstall the SDK, name your agents, set an envelope. One line to adopt.
Six industries and six roles, and which part of the problem each one meets first.
Our own scan of 133 public agent repositories, with the method and the limitations.
How to evaluate a cost tool, and how to find the agents already in your codebase.
Field notes, benchmarks and everything else we publish, filterable.
Why this exists, who is building it, and what we will not claim.
Stop runaway agents before they become runaway invoices.