SubGuardian
Developer Demo / API Simulator
AI Agent spends only after SubGuardian checks budget, usage, and policy, then returns allow / pause / reject / ask_user with auditable proof.
How it works
1
Agent asks before spending
2
SubGuardian checks policy + budget + usage
3
API returns allow / pause / reject / ask_user with proof
API Integration
Minimum fetch example
const res = await fetch("/api/v1/spend/authorize", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer sg_demo_local",
"X-SubGuardian-Demo": "developers-page"
},
body: JSON.stringify({
agentId: "research-agent",
userWallet: "0x...",
serviceName: "OpenAI API",
amount: 18,
reason: "Run customer research task"
})
});
const decision = await res.json();