Fund AI agents — without giving them a wallet.
Define exactly how much an agent can spend.
Every payment is pre-approved, limited, and reversible.
They receive permissions to spend them.
Why this exists
How it works
Secrets are generated client-side and never stored on the server. Save them immediately after preparation — if lost, funds remain locked until expiry.
Key concept
Agents cannot spend more than what was allocated. There is no way for an agent — or an attacker who compromises one — to exceed the committed budget.
Security guarantees
Compared to traditional approaches
| Model | Agent needs | Risk | Reversible |
|---|---|---|---|
| Wallets | Private key | Full drain possible | ✗ |
| API billing | Account credentials | Unlimited charges | Partial |
| RelAI Budget Vault | Nothing | Max = allocated budget | ✓ |
Works with
Simple API key usage for agents
Payment execution layer
On-chain settlement
Using the Dashboard
Available at /dashboard/payment-codes under the Agent Budget tab.
API Reference
/facilitator/agent-budget/prepareGenerate N (secret, hashlock) pairs. Returns secrets + deposit calldata. Requires auth.
/facilitator/agent-budget/redeemReveal a secret to redeem a commitment to a payee address. Called by the agent.
/facilitator/agent-budget/cancelCancel an unused commitment by hashlock (owner only). Returns USDC to owner.
curl -X POST https://api.relai.fi/facilitator/agent-budget/prepare \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "items": [
{ "amount": 1000000, "expiry": 1735000000 },
{ "amount": 1000000, "expiry": 1735000000 },
{ "amount": 1000000, "expiry": 1735000000 }
]}'
→ {
"secrets": ["0xabc123...", "0xdef456...", "0x789xyz..."],
"totalHuman": "3.00",
"vaultAddress": "0xA570faFC8128792fD71503026cC683A3d54369Eb"
}curl -X POST https://api.relai.fi/facilitator/agent-budget/redeem \
-H "Content-Type: application/json" \
-d '{ "secret": "0xabc123...", "payee": "0xApiProviderAddress" }'
→ { "success": true, "txHash": "0x...", "amount": 1000000 }Contract Reference
deposit(address usdc, Item[] items)Lock USDC for each item. Item = { hashlock, amount, expiry }.
redeem(bytes32 secret, address payee)Reveal preimage — if hash(secret) matches, transfers amount to payee.
cancel(bytes32 hashlock)Owner cancels a single unused commitment and recovers USDC.
cancelBatch(bytes32[] hashlocks)Owner cancels multiple commitments in one transaction.
reclaimExpired(bytes32[] hashlocks)Reclaim expired, unused commitments — funds returned to owner. Anyone can call after expiry.