agensor
Billing infrastructure for the agent era

Ship AI products.
Bill your users.
Scale without rebuilding.

Agensor gives every AI agent a wallet. Real-time credit enforcement, per-user metering, and Stripe top-ups — wired in 30 minutes.

No credit card required  ·  Free while in beta

Every AI product rebuilds billing from scratch.

You're not Stripe

Building token metering, credit ledgers, Stripe webhooks, and per-user enforcement is weeks of work — not your product.

It breaks at scale

A hand-rolled in-memory counter works until you add a second server. Then it's a financial bug.

You do it again, every time

New product, new metering system. Same problem, different repo.

Three lines of code.

Production-ready billing.

1

Step 01Install

$ npm install agensor
2

Step 02Wrap

const client = meter.wrapAnthropic(anthropic, {
getUserId: () => req.user.id
})
3

Step 03Enforce

// That's it. Every call is now metered.
// Users hit their limit → BudgetExhaustedError
// Stripe top-up → credits added automatically

Everything you need. Nothing you don't.

Open source

SDK — Drop-in wrappers

wrapAnthropic() and wrapOpenAI() intercept every call. Token costs debited in real time. Zero latency overhead.

Included

Dashboard — Full visibility

See every user, every credit, every transaction. API key management. Usage charts. Built in.

React component

User portal widget

<AgensorPortal /> — embed in your product. Users see their balance, history, and can top up with one click.

Layer 2 →

A2A payments — coming soon

Agents paying agents. Budget delegation. Call trees. The financial layer for multi-agent systems.

Wrap once. Bill forever.

index.ts
import { createMeter } from 'agensor'
import Anthropic from '@anthropic-ai/sdk'
 
const meter = createMeter({ apiKey: 'sk_live_...' })
const anthropic = new Anthropic()
 
// Wrap your client — drop-in replacement
const client = meter.wrapAnthropic(anthropic, {
getUserId: () => req.user.id,
})
 
// Every call is now metered. Nothing else changes.
const message = await client.messages.create({
model': 'claude-sonnet-4-6',
max_tokens: 1024,
messages: [{ role: 'user', content: prompt }],
})

Be first to ship AI products
that bill themselves.

Join developers building the next generation of agent products.
Early access is free. Pricing starts later.

No spam. One email when we open early access.