“What stops it from overspending?”
A hard limit, checked before the request reaches your payment rail. A persuasive prompt can’t change it.
Hard spend limits for AI agents, checked before any payment moves. And a record of every decision your auditor can verify on their own.
research_agentOpenAI
$420.00
acd69e5e…9f950a14d077c9f2…e7e821d6Simulated agents. Real SHA-256, computed in your browser. No money moves.
“What stops it from overspending?”
A hard limit, checked before the request reaches your payment rail. A persuasive prompt can’t change it.
“Can you prove what it did?”
Every decision, approved or blocked, sealed into a chain your auditor can re-verify offline.
Before your agent spends a cent, and long after the money has moved.
Per-request, daily and monthly limits, vendor allowlists and an instant freeze, evaluated before the request reaches your payment rail. A clever prompt doesn’t change the policy.
Approved and blocked requests are appended to a hash chain. Each record carries the hash of the one before it, so a later edit, deletion or reordering breaks the chain at an exact, locatable record.
Export a signed Agent Spend Audit Report. Ed25519 checkpoints and RFC 9162 Merkle proofs let anyone re-verify it offline, with independent verifiers in TypeScript and Python.
Read the wire specA working policy engine and SHA-256 chain, running in your browser. Nothing is sent anywhere and no money moves.
| Record | Vendor | Amount | Decision | Integrity |
|---|---|---|---|---|
| 0001 | OpenAI | $420.00 | Approved | Recorded |
| 0002 | Anthropic | $88.00 | Approved | Recorded |
| 0003 | OpenAI | $640.00 | Blocked | Recorded |
| 0004 | Anthropic | $120.00 | Approved | Recorded |
Every decision leaves a record.
This sandbox uses a local SHA-256 chain. The console runs the full engine with signed checkpoints.
agent_42 · signed sample
d45f95d8e7340ca4…f8e21954From the downloadable signed sample. Example data.
The audit report
One file holds the decisions, the chain, the signed checkpoint and the witness cosignatures. Your auditor doesn’t need an account, our servers or our word.
Split-view protection assumes at least one honest, reachable witness. Keep your own copies of trusted checkpoints.
Your payment provider still moves the money. Comptra decides first and records the outcome. A block is a normal response, not an exception.
import { Comptra } from 'comptra';
const comptra = new Comptra({
apiKey: process.env.COMPTRA_KEY,
baseUrl: 'http://localhost:8787'
});
const decision = await comptra.gate({
agentId: 'research_agent',
vendor: { name: 'openai' },
amountMinor: 42000, // $420.00
currency: 'USD'
});
if (!decision.allowed) {
throw new Error(decision.reason);
}
// Only then, call your payment adapter.
curl http://localhost:8787/v1/gate \
-H "Authorization: Bearer $COMPTRA_KEY" \
-H "Content-Type: application/json" \
-d '{"agent_id":"research_agent",
"vendor":{"name":"openai"},
"amount_minor":64000}'
# HTTP 200. A block is a normal outcome.
{
"decision": "BLOCK",
"reason_code": "PER_CALL_CAP",
"limit": 50000,
"observed": 64000,
"ledger_seq": 12,
...
}
No. Comptra evaluates spending policies and records decisions. Your payment provider handles execution and settlement. Comptra is not a bank and not a payment rail.
Comptra sits above the rail. The engine ships a simulated rail, a Stripe Issuing test-mode adapter and an x402 preview. A new rail is one adapter interface. Tell us which one you use.
Yes. Start with the playground above or run the open-source engine locally. Get in touch to scope your workflow, spending policies and deployment.
The engine runs on Node today and includes a Cloudflare Workers entry point. Production key custody, such as a KMS or HSM, is scoped with each design partner.
Design partners, Vienna
API credits, research data, a few hours of compute. Tell me what you’re building and where the spending needs a boundary.
Used only to reply to your enquiry. Privacy policy