Financial controls for the agentic era.
Your agents spend money now. NullSpend is the open-source layer that sees every dollar, stops every runaway, and reconciles the whole thing to a real P&L. Built for the AI-native teams shipping today and the finance teams closing the books tomorrow.
| Customer | Revenue (30d) | AI cost (30d) | Margin | Health |
|---|---|---|---|---|
| north-star-ai | $48,200 | $6,840 | +85.8% | Healthy |
| acme-corp | $31,400 | $5,960 | +81.0% | Healthy |
| lighthouse-labs | $19,800 | $4,712 | +76.2% | Healthy |
| orbital-systems | $12,600 | $4,118 | +67.3% | Moderate |
| crane-and-co | $8,450 | $3,920 | +53.6% | Moderate |
| vector-forge | $5,200 | $3,847 | +26.0% | At-risk |
| meridian-one | $3,100 | $4,248 | -37.0% | Critical |
eval-runner-7 spent 10× baseline in 4 minutes. Paused · paged on-call.
// THE PROBLEM
Your dashboard shows a total. It should show the truth.
Every AI-native company hits the same wall. Costs per customer swing wildly. Revenue and cost live in separate systems. The loudest customer is not the most profitable one, and nobody knows until the next board meeting.
Variance
Cost per customer varies 10x to 100x. Cost per feature and per agent too. You see one total.
Velocity
A looped agent burns a month of margin in an afternoon. Nobody sees it until the invoice.
Attribution
Your dashboard shows cost. Your billing shows revenue. Nothing joins them at the customer level.
// THE SOLUTION
Every dollar. Every customer. Every agent. Every time.
Connect your billing system. Tag requests with a customer ID. NullSpend joins revenue and AI cost at the customer, feature, and agent level. See trajectory, set health tiers, export to your board deck.
- Revenue sync every 2 hours, no manual mapping
- Real cost attribution from actual token counts across 56 models
- Health tiers you configure: healthy, moderate, at-risk, critical
- Regression alerts when a customer drops a tier
- Per-customer, per-feature, and per-agent margin trajectory
- CSV export for board decks and finance reviews
// ENFORCEMENT
Stop the runaway before it costs you the day.
Most tools log cost after the call returns. NullSpend checks and reserves budget before the request reaches the provider. If the budget is gone, the request is denied. Sub-20ms overhead. No race conditions.
Budgets
Hard or soft caps on API keys, customers, agents, or tags. Overdraft modes per budget. Hierarchical inheritance. Enforcement at the proxy, not in the app.
Runaway detection
Velocity circuit breakers. Loop detection. Session caps. When an agent spends 10x baseline in 60 seconds, NullSpend halts it before the day's budget evaporates.
HITL approval
Agents request more budget. Humans approve in Slack. Scoped, audited, expiring. The budget negotiation primitive your agent framework does not ship.
Plus policies, velocity circuit breakers, session caps, and tag-based inheritance. See all enforcement primitives →
// THREE WAYS TO CONNECT
One control plane. Three ways to plug in.
SDK for granular control. Proxy for zero code changes. MCP for agent-native flows. Use one or all. Best of breed.
SDK
When you want per-call control in app code.
import { NullSpend } from "@nullspend/sdk";
const ns = new NullSpend({ apiKey });
const fetch = ns.createTrackedFetch("openai");- Auto-calculates cost from response tokens
- Works with OpenAI, Anthropic, Gemini
- Available in TypeScript and Python
Proxy
When you want every request governed, no exceptions.
OPENAI_BASE_URL=
https://proxy.nullspend.dev/v1- One env var, every framework
- Unbypassable
- Sub-20ms overhead
MCP Server
When your agent asks for its own budget.
{
"mcpServers": {
"nullspend": {
"url": "https://mcp.nullspend.dev"
}
}
}- Works with Claude, Cursor, any MCP client
- check_budget, request_budget, get_cost tools
- Self-governance for autonomous stacks
// OPEN SOURCE
Read the code that decides your margin.
The NullSpend proxy, SDKs, cost engine, and MCP server are all Apache-2.0. Run it on your infrastructure. Read every line of the enforcement logic. Audit the exact formula we use to compute margin.
No vendor lock-in. No black-box billing. No “trust us, the number is right.” The binary we ship on nullspend.dev is the same one you run on your own servers.
$ git clone github.com/NullSpend/nullspend
$ pnpm install && pnpm dev
→ nullspend running on http://localhost:8787// PRICING
Free until it matters.
Free for builders. Accessible for founders. Ready for teams at scale. Custom for enterprise.
Free
Every enforcement primitive in Free. Forever free — unlimited self-hosted.
- 100,000 governed requests / month
- 3 budgets
- Velocity circuit breakers
- Session spend caps
- Model & provider mandates
- Tag-based budgets
- Multi-org
- Unlimited team members
- 7 day data retention
- 10 API keys
- 2 webhook endpoints
Pro
Know which customers make you money. Margin intelligence + Stripe sync.
- 500,000 governed requests / month
- Per-customer margin intelligence
- Stripe revenue sync
- Cost regression alerts
- CSV export
- Soft-block, warn-only & shadow-mode policies
- 60 day data retention
- Priority support
Scale
For teams running AI in production at serious volume.
- 2,000,000 governed requests / month
- Everything in Pro
- 180 day data retention
- SLA on uptime + response time
- Priority email support
Enterprise
Compliance-ready governance at any scale.
- Unlimited governed requests
- Unlimited budgets
- Custom data retention
- Unlimited team members
- SSO & SAML
- SCIM provisioning
- HIPAA BAA available
- EU data residency
- Dedicated support
// FAQ
The questions you would ask on a sales call.
If the question you have is not here, open an issue on GitHub or email the founder directly.
How is NullSpend different from other AI cost tools?
Do I still need my existing observability tool?
What happens if NullSpend goes down? Does my app go down?
OPENAI_BASE_URLback to the upstream provider — no code change, no NullSpend lock-in. For production-critical workloads, the entire stack (proxy, SDKs, cost engine, MCP server) is Apache-2.0, so you can run NullSpend on your own infrastructure and decouple from our availability entirely.Can I self-host?
How fast can I go live?
How does the margin calculation work?
What about SOC 2, SSO, and audit logs?
// START TODAY
See your margin table in five minutes.
Free forever for your first 100,000 requests. No credit card. Apache-2.0 across the stack. Your data stays yours.