{
  "openapi": "3.1.0",
  "info": {
    "title": "Agentic Finance Graph — public state API",
    "version": "0.4.0",
    "description": "The machine-readable tape of the AI-agent economy. Free, unauthenticated, CC BY 4.0 with attribution to https://agenticfinancegraph.com. Live values are read from public APIs and on-chain eth_call; cited values are imported research and are labeled kind=cited. Registration counts are never a live-agent count.",
    "license": { "name": "CC BY 4.0", "url": "https://creativecommons.org/licenses/by/4.0/" },
    "contact": { "email": "agenticfinancegraph@proton.me", "url": "https://agenticfinancegraph.com" }
  },
  "servers": [{ "url": "https://agenticfinancegraph.com" }],
  "paths": {
    "/api/state": {
      "get": {
        "operationId": "getState",
        "summary": "Current machine-money tape: live and cited metrics with provenance",
        "description": "Returns stablecoin float, USDC circulating and share, native USDC on Base (eth_call totalSupply), agent vault cash (ERC-4626 totalAssets), DeFi TVL, plus cited ERC-8004 liveness and x402 payment statistics. Cached 5 minutes at the edge.",
        "responses": {
          "200": {
            "description": "The tape",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "as_of": { "type": "string", "format": "date-time" },
                    "live": {
                      "type": "object",
                      "description": "First-party or directly-read values",
                      "properties": {
                        "stablecoin_float_usd": { "$ref": "#/components/schemas/Metric" },
                        "usdc_circulating_usd": { "$ref": "#/components/schemas/Metric" },
                        "usdt_circulating_usd": { "$ref": "#/components/schemas/Metric" },
                        "usdc_share_of_float": { "$ref": "#/components/schemas/Metric" },
                        "native_usdc_on_base_usd": { "$ref": "#/components/schemas/Metric" },
                        "total_agent_vault_cash_usdc": { "$ref": "#/components/schemas/Metric" },
                        "defi_tvl_total_usd": { "$ref": "#/components/schemas/Metric" },
                        "defi_tvl_base_usd": { "$ref": "#/components/schemas/Metric" }
                      }
                    },
                    "cited": {
                      "type": "object",
                      "description": "Imported research, labeled with its producer and window",
                      "properties": {
                        "erc8004_registrations_total": { "$ref": "#/components/schemas/Metric" },
                        "erc8004_working_service_rate": { "$ref": "#/components/schemas/Metric" },
                        "base_strict_liveness_rate": { "$ref": "#/components/schemas/Metric" },
                        "agent_payments_settled_usd": { "$ref": "#/components/schemas/Metric" },
                        "agent_payment_avg_ticket_usd": { "$ref": "#/components/schemas/Metric" },
                        "usdc_settlement_share_agent_rails": { "$ref": "#/components/schemas/Metric" },
                        "agentfi_tvl_labeled_usd": { "$ref": "#/components/schemas/Metric" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Metric": {
        "type": "object",
        "required": ["value", "unit", "producer", "kind"],
        "properties": {
          "value": { "type": "number" },
          "unit": { "type": "string", "examples": ["USD", "USDC", "ratio", "agents"] },
          "producer": { "type": "string", "description": "self | DefiLlama | Keyrock | 8004scan | ...", "examples": ["self", "DefiLlama"] },
          "kind": { "type": "string", "enum": ["live", "cited"] },
          "window": { "type": "string", "description": "Time window the value describes" },
          "as_of": { "type": "string", "format": "date-time" },
          "method": { "type": "string", "description": "How a live value was produced, e.g. eth_call totalAssets()" },
          "caveat": { "type": "string" }
        }
      }
    }
  }
}
