The programmable spending firewall for autonomous AI agents.
Kartein is a policy enforcement layer that sits between AI agents and the blockchain. Every transaction is validated against configurable rules — per-transaction limits, daily caps, recipient whitelists, time restrictions, and category budgets — before it reaches the chain.
Built for Synthesis — the first builder event you can enter without a body.
AI agents make autonomous payments via x402. Kartein validates every transaction against programmable policies before settlement. Integration with Locus payment infrastructure on Base provides USDC spending controls with full audit trails.
Trust is programmable. Each agent operates within defined boundaries — spending limits, approved recipients, time windows. The policy engine enforces 8 sequential trust checks on every transaction. Trust isn't assumed; it's verified.
Multiple agents share a managed vault with individual budgets. One agent's limits don't affect another. Cooperative spending with individual accountability — agents work together without stepping on each other's resources.
Agent wallet keys are isolated per-agent and never exposed cross-boundary. Policy rules act as access control — agents can only interact with approved endpoints. The Locus integration provides gasless transactions without exposing private keys.
Agent → x402 Payment Request → Kartein Policy Engine → Approve/Block → Settlement
│
┌───────┴───────┐
│ 8 Checks: │
│ 1. Frozen? │
│ 2. Per-tx │
│ 3. Daily cap │
│ 4. Budget │
│ 5. Whitelist │
│ 6. Blocklist │
│ 7. Category │
│ 8. Time │
└───────────────┘
│
┌───────┴───────┐
│ │
Solana Base (Locus)
Devnet Mainnet
| Layer | Function |
|---|---|
| Vault | Budget pool with per-agent allocation |
| Policy Engine | 8 programmable validation checks |
| x402 Proxy | Intercepts HTTP 402 payment requests |
| AI Monitor | Anomaly detection on spending patterns |
| Dashboard | Real-time monitoring with kill switch |
| Component | Technology |
|---|---|
| Frontend | Next.js 16, React 19, TypeScript |
| UI | Tailwind CSS, shadcn/ui, Framer Motion |
| State | Zustand |
| Solana | @solana/web3.js, @solana/spl-token |
| Base/Ethereum | viem, Locus Payment API |
| Charts | Recharts |
| Testing | Vitest (23 tests) |
| Deployment | Vercel |
- Agent Terminal — type natural language commands, watch the policy engine respond
- Guided Demo — 14-step scripted narrative demonstrating all policy checks
- Real on-chain settlement — approved transactions create real Solana devnet transfers
- Multi-chain — Solana devnet + Base mainnet (via Locus)
- Policy Engine — 8 configurable checks per transaction
- Kill Switch — freeze any agent or all agents instantly
- Spending Analytics — cumulative charts with approved/blocked breakdown
- 23 unit tests — complete policy engine test coverage
git clone https://github.com/kushwahaamar-dev/kartein.git
cd kartein
npm install
npm run dev# Locus API key for Base chain payments
NEXT_PUBLIC_LOCUS_API_KEY=claw_dev_your_key_here- Click "Launch Dashboard" → click "Guided Demo"
- Watch 14 scripted steps demonstrating all policy checks
- Use the Agent Terminal — type "Buy $50 of compute from AWS" → BLOCKED
- Request SOL airdrop → approved transactions settle on-chain
- Click Explorer links → verify real transactions on Solana devnet
POST /api/policy
{
"agent": { ... },
"amount": 10.00,
"recipient": "0x...",
"category": "compute"
}GET /api/healthnpm test
# 23 tests covering all 8 policy checksThis project targets:
- Agents That Pay — x402 payment validation with Locus
- Agents That Trust — programmable trust via policy engine
- Agents That Cooperate — shared vault, individual budgets
- Agents That Keep Secrets — key isolation, policy-as-access-control
MIT
Built at Synthesis 2026 — the first builder event you can enter without a body.