{"schema_version":"1.0","name":"AgentLedger","description":"Per-agent spend management: track spend across x402/MPP/API-key rails, set budget caps, get anomaly alerts, keep an audit trail.","url":"https://aiagentscity.com","api_base":"https://aiagentscity.com/v1","openapi":"https://aiagentscity.com/openapi.json","auth":{"type":"workspace_key","field":"workspace_key","description":"Get a workspace_key with no human at all by paying via POST /v1/billing/x402 (the paying wallet becomes the workspace identity), or at GET /start — no signup, no login, no card. Claiming a NEW agent_id requires that workspace_key in the first POST /v1/track or /v1/budget body; that call mints an agent_secret in the response — save it, every later write to that agent_id must include it and needs no workspace_key. Reads (report/alerts/tokens) require agent_secret or workspace_key, sent as X-Agent-Secret or X-Workspace-Key. A LOST agent_secret is recoverable — the workspace_key can always mint a new one at POST /v1/agents/{agent_id}/rotate-secret, so losing a credential never bricks an agent_id."},"pricing":{"model":"freemium","amount_usd":19.0,"description":"Free tier is 3 agents per workspace. Pro is $19/mo for unlimited agents."},"capabilities":[{"id":"mint_workspace_x402","description":"Self-serve workspace + workspace_key for an agent with a wallet — no human, no login. Present an x402 payment in the X-PAYMENT header; the paying wallet becomes the workspace identity. Do this first: a workspace_key is required to claim a new agent_id.","endpoint":"/v1/billing/x402","method":"POST","free":false},{"id":"track_spend","description":"Record a spend entry for an agent","endpoint":"/v1/track","method":"POST","free":true},{"id":"set_budget","description":"Set monthly/daily budget caps for an agent","endpoint":"/v1/budget","method":"POST","free":true},{"id":"get_report","description":"Spend report — totals, by rail, by service, anomalies","endpoint":"/v1/report/{agent_id}","method":"GET","free":true},{"id":"get_alerts","description":"Anomaly alerts for an agent","endpoint":"/v1/alerts/{agent_id}","method":"GET","free":true},{"id":"get_tokens","description":"Token burn report — in/out totals by model","endpoint":"/v1/tokens/{agent_id}","method":"GET","free":true},{"id":"rotate_agent_secret","description":"Recover a LOST agent_secret: mint a new one for an agent_id you own, invalidating the previous credential immediately. Workspace_key only — an agent_secret cannot rotate itself. 404 if the agent_id is not claimed.","endpoint":"/v1/agents/{agent_id}/rotate-secret","method":"POST","free":true},{"id":"route_through_proxy","description":"Point your provider base_url at /proxy/{provider} — openai, anthropic, or any vendor listed in providers.json (deepseek, moonshot ship as examples; adding one is a config edit). Every call is metered and capped BEFORE it reaches the provider: a call that would cross the budget gets 402 to the caller and the provider is never contacted. Pass-through — send your provider credential in Authorization / x-api-key and AgentLedger forwards it without storing it. Traffic that bypasses the proxy is not enforced.","endpoint":"/proxy/{provider}/{path}","method":"POST","free":true},{"id":"register_alert_webhook","description":"Register an http(s) webhook for this workspace's alerts — budget.warning at 80%, budget.exceeded when a write is actually blocked, and anomaly.detected. Delivered on the event with retries; every attempt is recorded, including failures. Cost metadata only, never prompt content.","endpoint":"/v1/webhooks","method":"POST","free":true},{"id":"share_report_link","description":"Mint a read-only, expiring URL for an agent's human-readable report page — a browser cannot send X-Agent-Secret as a header, so this is how a report reaches a person. Scoped to ONE agent_id, read-only, expiring (7 days default, 90 max), revocable in bulk.","endpoint":"/v1/report/{agent_id}/share","method":"POST","free":true},{"id":"revoke_agent_secret","description":"Invalidate an agent's secret while keeping its spend history. The agent_id stays claimed, so no other workspace can take it over.","endpoint":"/v1/agents/{agent_id}/revoke-secret","method":"POST","free":true}],"contact":"entradox@icloud.com","legal":"Parmanand LLC. Beta software, provided as-is. Privacy: /privacy · Terms: /terms. Cost metadata only — prompts and responses are never stored."}