A poisoned page tells your agent to pay $180 for “priority access.” It complies. Nobody notices until the wallet is empty.
The control plane for
AI agent payments.
Set the rules. Watch every payment. Score every counterparty. Rein governs your agent's authority to spend — it never holds the funds.
$ npm install @reinconsole/sdk
MIT-licensed · 8 packages on npm · x402 + ERC-8004 stack
- 14:02:11 ALLOW $0.05 → api.research.example within budget
- 14:02:12 SETTLED $0.05 → api.research.example base-sepolia
- 14:02:19 DENY $180.00 → premium-intel.example over per-tx cap
An agent with a wallet is an unattended
terminal with a credit card.
A retry loop hits a paid endpoint 400 times before sunrise. Every call cost $0.25. Every call was authorized — by nobody.
The cheapest vendor in the marketplace has a 12% dispute rate and three burned wallets behind it. Your agent only sees the price.
Rein exists because “the agent will behave” is not a security model.
Three planes. One loop.
Guard the demand side, gate the supply side, and let one reputation graph feed evidence back into enforcement on both.
GUARD
demand side
Wrap your agent's fetch once. Every x402 paywall becomes a
policy decision before a cent moves.
import { createGuard } from '@reinconsole/sdk';
const guard = createGuard({ engineUrl, agentId });
const fetch = guard.wrap();
// vendor answers 402 → intent → policy check →
// signed decision. Deny blocks before payment exists.
const res = await fetch('https://api.vendor.example');
- budgets & tx caps
- allow / deny lists
- kill switch
- signed receipts
GATE
supply sidePrice your routes once. Every payment into your API is screened, settled, and receipted before your handler runs.
import { createGate, gateMiddleware } from '@reinconsole/gate';
const gate = createGate({
routes: [{ path: '/api/answer', price: '0.05' }],
rails, payTo: '0xYourTreasury…',
screen: { check: payerCheck(graph, { denyBelow: 40 }) },
});
app.use(gateMiddleware(gate));
- quote consistency
- replay protection
- velocity caps
- payer screening
GRAPH
reputationEvidence in, scores out. Both sides of the wire feed one graph — and the graph feeds back into enforcement.
import { ReputationGraph, payerCheck } from '@reinconsole/graph';
const graph = new ReputationGraph()
.observe(engine).observe(indexer).observe(gate);
// pushed scores make vendorReputationLt policies fire
await graph.syncVendors(engine.spend);
- never stored, always explainable
- unknown ≠ bad
- survives key rotation
“Live on testnet” — with links,
not adjectives.
Authority moves through Rein.
Money doesn't.
Put reins on it.
$ npm install @reinconsole/sdk
v0.1 — early open-source infrastructure, live on testnet. APIs may change before 1.0.
No waitlist. No email capture. The code is public.