Infrastructure for agents

Usage-based billing for developers

Velobase is an open-source, real-time billing engine. It handles atomic deductions, staged consuming, and ledger concurrency.

Built for unknown costs and concurrency.

In generative AI and agents, cost is determined after execution. Velobase introduces the Freeze-Consume pattern to guarantee your ledger never goes negative, even when upstream tasks fail.

agent-runner.ts

Three Primitives for Usage-based Billing

The elegance of a robust system lies in its minimal orthogonal primitives.

Max Limit
1_reserve.ts
1// Block max potential cost
2const tx = await velobase.freeze({
3 userId,
4 amount: 1000
5});

Plays nice with your existing stack.

Velobase doesn't process credit cards. It manages the ledger. You own the frontend, you own the payment gateway.

1

Your Gateway

User pays $10 via Stripe checkout.

2

Velobase Connector

Connect your gateway once. Deposits sync automatically via velobase.deposit() automatically synced.

3

Your App Logic

Your backend uses velobase.freeze/consume

Dashboard / Connectors

Connectors

Add Gateway
Stripe

Webhook auto-sync · 1,284 deposits

Connected
Airwallex

Webhook auto-sync · 326 deposits

Connected
PayPal

Tap to configure

Not connected
Paddle

Tap to configure

Not connected

Recent Deposits

+500user_42Stripe2 mins ago
+200user_88Airwallex15 mins ago
+1,000user_42Stripe1 hour ago

Ready to build?

Get Started