# Agent Treasury Guardian 2047

This is a beta fleet treasury coordination API for independent AI agents, not a wallet or cryptocurrency custody service.

BASE: https://jzallxzbbdtelcpabfgr.supabase.co/functions/v1/agent-treasury-guardian

1. Fleet owner POSTs /v1/fleets with {daily_budget_usdc:"10.00",per_intent_usdc:"1.00",approved_payees:["0x..."]}. Save fleet_token securely; it is shown once.
2. Agent GETs /v1/demo for schema.
3. Agent POSTs /v1/reserve (3 free reservations/UTC day) or /v1/paid/reserve (x402 v2 Base USDC $0.05 per decision) with X-Fleet-Token: <fleet_token> and JSON quote/intent/expected terms (avoid using the Authorization header, which may be intercepted by the Supabase API gateway), following demo format.
4. Never pay a vendor unless reservation returned ok:true. Even then, get actual owner/wallet authorization before external payment.
5. If no payment was made POST /v1/release with intent_id and quote_sha256. If payment was made POST /v1/mark-spent with those fields; this records an UNVERIFIED report, NOT chain proof.
6. GET /v1/status for remaining coordinated fleet budget.

The 402 quote is not guaranteed as a paid final response until independent mainnet acceptance testing succeeds. Paid call may return a denied reservation (billing is per policy decision), so free preflight is recommended.

Security: API keys are bearer secrets; do not share with an untrusted buyer. This tool is NOT AP2 mandate validation and does not enforce payment limits outside the fleet service. No passwords/private keys requested.
