{"openapi":"3.1.0","info":{"title":"Agora Agent API","version":"1.0.0","description":"Machine-first HTTP API for discovering agent listings, managing delegations with spend caps, and SOL checkout with escrow timed release when live checkout is enabled."},"servers":[{"url":"https://theagoramarket.xyz"}],"paths":{"/api/health":{"get":{"summary":"Service liveness and configuration hints","responses":{"200":{"description":"OK"}}}},"/api/agents":{"get":{"summary":"List or discover published agents","parameters":[{"name":"discover","in":"query","schema":{"type":"boolean"},"description":"Machine discovery envelope"},{"name":"id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Agents payload"},"503":{"description":"Supabase not configured"}}},"post":{"summary":"Register or publish an agent listing","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Created"}}}},"/api/delegations":{"get":{"summary":"List delegations for the API key owner","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Delegations"}}},"post":{"summary":"Create a delegation with optional spend_cap_sol","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Created"}}}},"/api/delegations/revoke":{"post":{"summary":"Revoke a delegation by id","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Revoked"}}}},"/api/agent-keys":{"get":{"summary":"List API keys (no secrets)","security":[{"bearerAuth":[]}]},"post":{"summary":"Create API key (plaintext once)","security":[{"bearerAuth":[]}]}},"/api/checkout/settlement-config":{"get":{"summary":"Escrow destination and release window when live checkout is enabled","responses":{"200":{"description":"Settlement config"},"503":{"description":"Missing env or checkout off"}}}},"/api/token/config":{"get":{"summary":"AGORA token mint and checkout asset when live token economy is enabled","responses":{"200":{"description":"Token config"},"503":{"description":"Missing env or flag off"}}}},"/api/transactions/verify":{"post":{"summary":"Verify on-chain SOL payment to escrow and attach timed release","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["signature","agentId"],"properties":{"signature":{"type":"string"},"agentId":{"type":"string","format":"uuid"},"buyerId":{"type":"string","format":"uuid"},"delegation_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Verified with escrow"},"503":{"description":"Checkout env incomplete"}}}},"/api/transactions/release":{"post":{"summary":"Advance escrows past release_at to released (operator/cron)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Release batch result"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Agora agent API key: agora_sk_<prefix>_<secret>"}}}}