Sluize Standard is a reference implementation of credit lines + surety bonds for autonomous AI agents, enforced by Open Wallet Standard (OWS) spending policies.
It was built for the OWS Hackathon (April 2026) under the “Agent Spend Governance” track.
- Web app (Next.js App Router): landing + auth + Agent dashboard + LP dashboard + Admin dashboard
- Routes live in
src/app/(public),src/app/(auth),src/app/(agent),src/app/(lp),src/app/(admin)
- Routes live in
- Solana programs (Anchor):
sluize-programs/programs/*agent-registry— on-chain agent account + scorecredit-facility— liquidity pool + credit line accountssurety-bond— bonds + disputesrevenue-splitter— splits incoming USDC between pool vault and agent destination (invoked by backend)
- OWS policy executable:
sluize-programs/sluize-spending-guard/(used by server policy provisioning) - Backend/API (Next.js route handlers):
src/app/api/*(Supabase + Solana + OWS provisioning + Helius webhook ingest)
- Next.js
16.2.2+ React19.2.4 - Tailwind CSS
v4+ Radix/shadcn primitives - Supabase (auth + Postgres)
- Solana (Anchor programs +
@solana/web3.js)
- Agent: register wallet → credit score → apply for a credit line → provision OWS policies → receive USDC → monitor repayments & policies
- LP: deposit/withdraw liquidity → track pool analytics
- Admin: review applications → monitor protocol health (RPC + program IDs) → manage loans/bonds
pnpm install
pnpm devThen open http://localhost:3000.
pnpm dev— run locallypnpm build/pnpm start— production build + servepnpm lint— eslint
Create .env.local (this repo expects these names):
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Supabase
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_KEY=
# Solana
NEXT_PUBLIC_SOLANA_RPC=https://api.devnet.solana.com
NEXT_PUBLIC_SOLANA_CHAIN=devnet
NEXT_PUBLIC_USDC_MINT=
NEXT_PUBLIC_AGENT_REGISTRY_PROGRAM=
NEXT_PUBLIC_CREDIT_FACILITY_PROGRAM=
NEXT_PUBLIC_SURETY_BOND_PROGRAM=
NEXT_PUBLIC_REVENUE_SPLITTER_PROGRAM=
# Webhooks (optional, for automated repayment / policy revocation updates)
HELIUS_WEBHOOK_SECRET=
# OWS (optional; if omitted, Sluize generates a demo ows_key_* token)
OWS_VAULT_DIR=/tmp/.ows
OWS_TREASURY_WALLET_NAME=sluize-treasury
SOLANA_CAIP2_CHAIN_ID=solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
SLUIZE_POLICY_EXECUTABLE_PATH=/usr/local/bin/sluize-spending-guardTip: sluize-programs/Anchor.toml includes devnet program IDs you can paste into the NEXT_PUBLIC_*_PROGRAM env vars.
Programs and tests live under sluize-programs/.
cd sluize-programs
npm install
anchor build
anchor testNote: sluize-programs/Anchor.toml currently runs tests via yarn run ts-mocha .... If you don’t have yarn installed, update that script or install yarn.
- Policy files are written to
OWS_VAULT_DIRbysrc/lib/ows-provisioner.ts. - If the
owsCLI is installed, Sluize will attempt to register policies + create an API key bound to those policies. - If the CLI isn’t installed, Sluize still generates a demo
ows_key_*token and hashes it (SHA-256) for storage. - The spending policy points at
SLUIZE_POLICY_EXECUTABLE_PATH(the Node executable insluize-programs/sluize-spending-guard/).
- Helius webhook endpoint:
POST /api/webhooks/solana(HMAC-verified viaHELIUS_WEBHOOK_SECRET) - Vercel: runtime timeouts are configured in
vercel.jsonfor the longer-running API routes
SLUIZE_MASTER.md— full product + architecture spec (authoritative)SLUIZE_CSS_FIX.md— CSS/token architecture rulesSLUIZE_REFACTOR.md— UI overhaul + empty-pages task list