Skip to main content

Most powerful & flexible
usage stack for AI.

Control prices, limits, and contracts for users and agents, live.

npm i @formata/limitr
Start freeHow it works

The policy

One policy file:
credits, limits, contracts.

The policy runs inside your app and decides every call: what's allowed, what it's worth, and what it costs you.

01
Write the plans: credits, limits, prices, what a call costs you. YAML or Stof, by hand or by your agent.
02
Gate the call: allow() in your process. Node, Bun, Deno, the browser, Rust.
03
Change the price: a new model, a trial, one customer's cap. Live on the next call.
policy.yamltested as written · engine 0.8.5
policy:
credits:
ai_token: { price: { amount: 0.00002 }, overhead_cost: 0.000008 }
plans:
free:
entitlements:
chat: { limit: { credit: ai_token, value: 50000, resets: true } }
pro:
entitlements:
chat: { limit: { credit: ai_token, mode: soft, value: 2000000, resets: true } }
export_pdf: {} # no limit: a feature flag
app.tsengine 0.8.5
const limitr = await Limitr.new(policy, 'yaml');
await limitr.ensureCustomer('acme', 'pro');
await limitr.allow('acme', 'export_pdf'); // true
await limitr.allow('acme', 'chat', 2_100_000); // true, soft limit
// event: meter-overage → bill acme: $2
outputallow('acme', 'export_pdf') → trueallow('acme', 'chat', 2_100_000) → trueevent: meter-overage → bill acme: $2.00

The engine

Enforced inside your app.

Offline and sandboxed, durable for high-throughput AI. Open source and extensible, so it fits your business forever.

How the engine works →
the policy is the boundary

Control

Feature flags, hard and soft limits, spend caps, an agent's budget.

allow('ada', 'chat', 60_000) // false

Bill

Usage pricing, credits, overage, one customer's contract. Margin known per call.

meter-overage → bill acme: $2

Start with the engine alone. Limitr Cloud is a one-line change later, and never required.

Limitr Cloud

Controls and billing, live.

Hosted by us, edited by you. Change a plan, a price, or one customer's deal, test it on real traffic, then publish to every engine. No ticket, no release.

Limitr Cloud: a policy draft with two changes, a passed test run on 312,400 replayed calls, and a Publish button

Change it live

Every engine has the change on its next call. Versioned, one click to revert.

Ledger to invoice

Usage lands in a ledger and rolls into invoices. Stripe built in, or your own rails.

Limitr Analyst

The agent in Cloud. Ask what a change will do, it simulates it on real usage, then writes it.

Agentic by design

Built for coding agents.

We think integration should be agentic. So Limitr is an open-source engine and usage stack that ships with skills: your agent learns the policy, the SDK, and the patterns, and does the work.

>
/plugin marketplace add dev-formata-io/limitr
>
/plugin install limitr@limitr

In Limitr Cloud, Limitr Analyst answers integration questions too, and can write the change for you.

Write the policy

Credits, plans, limits, prices, one customer's contract, from a plain brief. Tested before it ships.

Wire the SDK

allow() at the call, reserve and settle around the model, events to your billing, in your framework.

Build the surfaces

Usage views, plan pickers, billing settings, and internal controls in your own UI, read from the policy.

Answer the hard questions

Margin per customer, what a price change would do, where a cap should sit, from the engine's own events.

Start free. Scale with usage.

Full pricing →

Open source

Free

The engine, forever. Write and test policies in Cloud.

Start free

Pay as you go

$49 /mo

Publish live. Ledger, invoices, Stripe.

Go live

Scale

$499 /mo

Custom deals, contracts, forecasting.

Start on Scale

Enterprise

Let's talk

Usage included, SLA, our team.

Book a demo

Start with the policy.

npm i @formata/limitr