Introduction
On-chain spending limits for AI agents that pay for things with x402 on Stellar.
KryptWarden is a smart wallet for AI agents. You put USDC in a Soroban smart wallet, register each agent with its own policy, and the agent pays x402 APIs with a one-line fetch() replacement. The wallet's contract checks every payment against the policy before any money moves.
- Small payments settle on their own, up to the agent's auto-approve limit.
- Bigger payments become holds. They wait for the owner to approve them in the dashboard. If nobody answers in time, the payment doesn't happen.
- Off-policy payments are refused by the contract, not by the agent: unknown sellers, blown daily budgets, paused or revoked agents, expired keys.
- The agent key never holds XLM. Fees for holds and audit records are paid by the KryptWarden relayer.
Quickstart
See it work in 2 minutes, then run a real agent in 15.
How it works
The payment path, and where each check happens.
Agent SDK
Install @kryptwarden/sdk and pay with kw.fetch().
Network & addresses
Contract IDs, endpoints and demo sellers.
What's in the box
| Piece | What it does | Where |
|---|---|---|
| Wallet contract | Holds the USDC; enforces every policy in __check_auth | Soroban, deployed per owner |
| Factory contract | Deploys a wallet for an owner in one transaction | Soroban, CBZF…5XPR |
| Agent SDK | kw.fetch() that pays x402 challenges within policy | @kryptwarden/sdk |
| Facilitator & relayer | Verifies and settles x402 payments; sponsors hold and rejection transactions | pay.kryptwarden.xyz |
| Indexer (Spend API) | Reads contract events into a ledger the dashboard can query | api.kryptwarden.xyz |
| Dashboard | Create a wallet, register agents, approve holds, read the audit log | www.kryptwarden.xyz |
| Demo sellers | Five paid x402 endpoints to test against | demo-apis.kryptwarden.xyz |
Testnet only
Phase 1 runs on Stellar Testnet with Circle's Testnet USDC. Nothing here moves real money.
Who these docs are for
- Buildathon judges and first-time visitors: start with the Quickstart. Everything is hosted, so you don't need to clone anything.
- Developers adding spending limits to an agent: read How it works, then Pay with the SDK.
- Anyone selling an API to agents: see Sell over x402.
- People who want to run their own stack: see Self-hosting.