{"openapi":"3.1.0","info":{"title":"AgentID API","version":"1.0.0","summary":"Identity, discovery and verification for ERC-8004 AI agents on Robinhood Chain.","description":"Public, versioned API of AgentID. Reads come from the AgentID index of the official ERC-8004 Identity Registry and AgentID's extension contracts; verification endpoints read the chain directly and state their sources, block and per-check results.\n\nSigned activity: A valid signature proves that an authorized signing key signed this record. It does not prove that the underlying task actually occurred.\nCapabilities are self-declared by agent owners and are not independently verified.\n\nRate limits (per IP, fixed window): reads 120/min, verify 30/min, activity POST 60/min (+600/h per agent), playground 10/min, auth 20/min, uploads 10/h. 429 responses carry Retry-After.\nEvery response carries X-Request-Id; every error body is an ApiError.","license":{"name":"MIT","identifier":"MIT"}},"servers":[{"url":"https://agentid-beryl.vercel.app"}],"tags":[{"name":"Agents"},{"name":"Activity"},{"name":"Verification"},{"name":"Network"},{"name":"Indexing"},{"name":"Assets"},{"name":"Playground"},{"name":"Auth"},{"name":"System"}],"paths":{"/api/v1/agents":{"get":{"tags":["Agents"],"operationId":"listAgents","summary":"Search and list indexed agents","description":"No popularity ranking: results are sorted by registration time only.","parameters":[{"name":"q","in":"query","required":false,"description":"Search: name, handle (@handle), description, capability, agent id (#42), owner/registry/wallet/signing address","schema":{"type":"string","maxLength":200}},{"name":"category","in":"query","required":false,"description":"Category from the AgentID profile","schema":{"type":"string","enum":["research","finance","productivity","development","data","infrastructure","creative","security","general"]}},{"name":"capability","in":"query","required":false,"description":"Self-declared capability slug, e.g. data-analysis","schema":{"type":"string"}},{"name":"chainId","in":"query","required":false,"description":"Restrict to one chain","schema":{"type":"integer"}},{"name":"registry","in":"query","required":false,"description":"Restrict to one registry","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},{"name":"owner","in":"query","required":false,"description":"Current owner","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},{"name":"signer","in":"query","required":false,"description":"Agents this signing key is or was authorized for","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},{"name":"status","in":"query","required":false,"description":"profile = only agents with an AgentID profile block","schema":{"type":"string","enum":["all","profile"],"default":"all"}},{"name":"keys","in":"query","required":false,"description":"verified = has an active signing key","schema":{"type":"string","enum":["any","verified","none"],"default":"any"}},{"name":"sort","in":"query","required":false,"description":"Registration order","schema":{"type":"string","enum":["newest","oldest"],"default":"newest"}},{"name":"page","in":"query","required":false,"description":"Page (1-based)","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","required":false,"description":"Items per page (max 100)","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Agents","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentSummary"}},"meta":{"allOf":[{"$ref":"#/components/schemas/ApiMeta"},{"required":["pagination"]}]}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/agents/{chainId}/{registry}/{agentId}":{"get":{"tags":["Agents"],"operationId":"getAgent","summary":"Agent passport","parameters":[{"name":"chainId","in":"path","required":true,"description":"Chain id (46630 = Robinhood Chain Testnet)","schema":{"type":"integer","examples":[46630]}},{"name":"registry","in":"path","required":true,"description":"ERC-8004 identity registry address","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},{"name":"agentId","in":"path","required":true,"description":"ERC-8004 agent id (uint256 decimal)","schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"}},{"name":"live","in":"query","required":false,"description":"1 = re-read owner and agentURI from the RPC (header X-AgentID-Live reports the outcome)","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Agent profile","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/AgentProfile"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/agents/{chainId}/{registry}/{agentId}/activity":{"get":{"tags":["Activity"],"operationId":"getAgentActivity","summary":"Agent activity feed (onchain events + signed records)","parameters":[{"name":"chainId","in":"path","required":true,"description":"Chain id (46630 = Robinhood Chain Testnet)","schema":{"type":"integer","examples":[46630]}},{"name":"registry","in":"path","required":true,"description":"ERC-8004 identity registry address","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},{"name":"agentId","in":"path","required":true,"description":"ERC-8004 agent id (uint256 decimal)","schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"}},{"name":"kind","in":"query","required":false,"description":"Filter by item kind","schema":{"type":"string","enum":["all","signed","onchain"],"default":"all"}},{"name":"page","in":"query","required":false,"description":"Page (1-based)","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","required":false,"description":"Items per page (max 100)","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Feed","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FeedItem"}},"meta":{"allOf":[{"$ref":"#/components/schemas/ApiMeta"},{"required":["pagination"]}]}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/agents/{chainId}/{registry}/{agentId}/metadata":{"get":{"tags":["Agents"],"operationId":"getAgentMetadata","summary":"Exact registration file bytes (or version history with history=1)","parameters":[{"name":"chainId","in":"path","required":true,"description":"Chain id (46630 = Robinhood Chain Testnet)","schema":{"type":"integer","examples":[46630]}},{"name":"registry","in":"path","required":true,"description":"ERC-8004 identity registry address","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},{"name":"agentId","in":"path","required":true,"description":"ERC-8004 agent id (uint256 decimal)","schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"}},{"name":"history","in":"query","required":false,"description":"1 = return MetadataVersion[] instead of the file","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"The exact resolved bytes of the current registration file (application/json; text/plain when the content is not a valid registration file). Headers: X-AgentID-Content-Hash (keccak256 of the bytes), X-AgentID-Metadata-Source, X-AgentID-Metadata-Version, X-AgentID-Agent-URI. With history=1: ApiEnvelope<MetadataVersion[]>.","headers":{"X-AgentID-Content-Hash":{"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"X-AgentID-Metadata-Source":{"schema":{"type":"string","enum":["onchain-data-uri","https","ipfs","none"]}},"X-AgentID-Metadata-Version":{"schema":{"type":"integer"}},"X-AgentID-Agent-URI":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"ERC-8004 registration file"},{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MetadataVersion"}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}]}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/verify/identity":{"post":{"tags":["Verification"],"operationId":"verifyIdentity","summary":"Verify an agent identity against the chain","description":"All chain reads are pinned to one block. If the RPC is unreachable, chain checks are UNAVAILABLE and the report is INCOMPLETE — never PASS. With checkEndpoints, AgentID probes https service endpoints through its SSRF-safe fetcher and checks /.well-known/agent-registration.json on their domains.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"chainId":{"type":"integer"},"registry":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"agentId":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"integer"}]},"expectedOwner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"checkEndpoints":{"type":"boolean"}},"required":["chainId","registry","agentId"]},{"type":"object","properties":{"url":{"type":"string","description":"AgentID profile URL: /agent/{chainId}/{registry}/{agentId} or /a/{handle}"},"expectedOwner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"checkEndpoints":{"type":"boolean"}},"required":["url"]}]},"example":{"chainId":46630,"registry":"0x8004A818BFB912233c491871b3d84c89A494BD9e","agentId":"42","expectedOwner":"0x71C7656EC7ab88b098defB751B7401B5f6d8A92F"}}}},"responses":{"200":{"description":"Identity report","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/IdentityReport"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/verify/signature":{"post":{"tags":["Verification"],"operationId":"verifySignature","summary":"Verify an EIP-712 signed activity record","description":"Adds AgentID receipt evidence (the block at which AgentID checked authorization) when the record was published here. A valid signature proves that an authorized signing key signed this record. It does not prove that the underlying task actually occurred.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/SignedActivityRecord"},"payload":{"description":"Optional disclosed payload"}},"required":["record"]}}}},"responses":{"200":{"description":"Activity report","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/ActivityReport"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/verify/signer":{"post":{"tags":["Verification"],"operationId":"verifySigner","summary":"Agents a signing address is or was authorized for","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},"required":["chainId","signer"]},"example":{"chainId":46630,"signer":"0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF"}}}},"responses":{"200":{"description":"Signer report","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/SignerReport"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/activity":{"get":{"tags":["Activity"],"operationId":"listActivity","summary":"Global activity feed","parameters":[{"name":"chainId","in":"query","required":false,"description":"Restrict to one chain","schema":{"type":"integer"}},{"name":"kind","in":"query","required":false,"description":"Filter by item kind","schema":{"type":"string","enum":["all","signed","onchain"],"default":"all"}},{"name":"page","in":"query","required":false,"description":"Page (1-based)","schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","required":false,"description":"Items per page (max 100)","schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Feed","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FeedItem"}},"meta":{"allOf":[{"$ref":"#/components/schemas/ApiMeta"},{"required":["pagination"]}]}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Activity"],"operationId":"publishActivity","summary":"Publish a signed activity record","description":"Checks, in order: rate limit → schema → network/registry configured → timestamp window (now − 86400 s ≤ timestamp ≤ now + 300 s) → payload hash (when a payload is disclosed, ≤ 16384 bytes) → EIP-712 signature (EOA or ERC-1271) → AgentKeyRegistry.isAuthorized at the pinned latest block → duplicate id / nonce. A valid signature proves that an authorized signing key signed this record. It does not prove that the underlying task actually occurred.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/SignedActivityRecord"},"payload":{"description":"Optional disclosed payload (hash-bound)"}},"required":["record"]}}}},"responses":{"201":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/PublishActivityResult"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden (origin check or signer not authorized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Duplicate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Semantically invalid (signature, timestamp window, payload hash)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/records/{recordId}":{"get":{"tags":["Activity"],"operationId":"getRecord","summary":"A stored signed activity record","parameters":[{"name":"recordId","in":"path","required":true,"description":"Record id (EIP-712 digest)","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Record","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/ActivityRecordView"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/network/status":{"get":{"tags":["Network"],"operationId":"networkStatus","summary":"RPC health, contract code + implementation checks, indexer lag","responses":{"200":{"description":"Network status","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NetworkStatus"}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/stats":{"get":{"tags":["Network"],"operationId":"stats","summary":"Protocol counters from the index","parameters":[{"name":"chainId","in":"query","required":false,"description":"Chain (default: the deployment's default chain)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Stats","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/ProtocolStats"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/handles/{handle}":{"get":{"tags":["Agents"],"operationId":"checkHandle","summary":"Handle availability (app-level display handles, not onchain ids)","parameters":[{"name":"handle","in":"path","required":true,"description":"Handle (3–32 chars: a-z, 0-9, inner hyphens)","schema":{"type":"string"}},{"name":"chainId","in":"query","required":false,"description":"Chain (default: the deployment's default chain)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Availability","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/HandleAvailability"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/index/tx":{"post":{"tags":["Indexing"],"operationId":"indexTransaction","summary":"Index a confirmed transaction now","description":"The receipt is fetched from the RPC (client data is never trusted); only logs from AgentID-indexed contracts are applied. Idempotent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"integer"},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["chainId","txHash"]},"example":{"chainId":46630,"txHash":"0x9f1c2b7a4e5d6c3b2a1908f7e6d5c4b3a291807f6e5d4c3b2a1908f7e6d5c4b3"}}}},"responses":{"200":{"description":"Indexed","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/IndexTxResult"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/assets":{"post":{"tags":["Assets"],"operationId":"uploadAvatar","summary":"Upload an avatar (SIWE session + same-origin)","description":"Multipart field `file`: PNG, JPEG, WebP or GIF ≤ 2 MB. Re-encoded to a 256×256 WebP with metadata stripped; content-addressed by sha256.","security":[{"session":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"Stored","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/AssetResult"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Not signed in or SIWE verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden (origin check or signer not authorized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/assets/{file}":{"get":{"tags":["Assets"],"operationId":"getAsset","summary":"Content-addressed asset bytes (immutable)","parameters":[{"name":"file","in":"path","required":true,"description":"{sha256}.webp","schema":{"type":"string","pattern":"^[0-9a-f]{64}\\.webp$"}}],"responses":{"200":{"description":"WebP image","content":{"image/webp":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/avatars/{file}":{"get":{"tags":["Assets"],"operationId":"getGeneratedAvatar","summary":"Deterministic generated avatar","parameters":[{"name":"file","in":"path","required":true,"description":"{seed}.svg","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}\\.svg$"}}],"responses":{"200":{"description":"SVG image","content":{"image/svg+xml":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/playground/agent":{"get":{"tags":["Playground"],"operationId":"playgroundAgent","summary":"The Atlas demo agent used by the playground","responses":{"200":{"description":"Playground configuration","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"object","properties":{"configured":{"type":"boolean"},"agent":{"allOf":[{"$ref":"#/components/schemas/AgentRef"},{"type":"object","properties":{"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},"required":["signer"]}]},"reason":{"type":"string"}},"required":["configured"]},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/playground/sign":{"post":{"tags":["Playground"],"operationId":"playgroundSign","summary":"Sign a fresh example REPORT_GENERATED record for Atlas (not stored)","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"description":"Optional JSON payload to sign instead of the example"}},"required":[]}}}},"responses":{"200":{"description":"Signed record","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/SignedActivityRecord"},"payload":{}},"required":["record","payload"]},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/openapi.json":{"get":{"tags":["System"],"operationId":"openapi","summary":"This document","responses":{"200":{"description":"OpenAPI 3.1","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/health":{"get":{"tags":["System"],"operationId":"health","summary":"Liveness + database reachability","responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"database":{"type":"boolean"},"chains":{"type":"array","items":{"type":"integer"}},"time":{"type":"string","format":"date-time"}},"required":[]}}}},"503":{"description":"Database unreachable","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"database":{"type":"boolean"}},"required":[]}}}}}}},"/api/cron/index":{"get":{"tags":["Indexing"],"operationId":"cronIndex","summary":"Run one bounded indexing pass (Authorization: Bearer CRON_SECRET)","security":[{"cronSecret":[]}],"responses":{"200":{"description":"Pass summary","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Not signed in or SIWE verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/auth/nonce":{"get":{"tags":["Auth"],"operationId":"authNonce","summary":"Single-use SIWE nonce (10 minutes)","responses":{"200":{"description":"Nonce","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"object","properties":{"nonce":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"domain":{"type":"string"},"uri":{"type":"string"},"chains":{"type":"array","items":{"type":"integer"}}},"required":["nonce","expiresAt"]},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/auth/verify":{"post":{"tags":["Auth"],"operationId":"authVerify","summary":"Verify a SIWE message and start a session (cookie aid_session)","description":"EIP-4361 message: domain must equal the app host; the nonce is single-use. EOA and ERC-1271 signatures are supported. Sets an httpOnly SameSite=Lax cookie valid for 7 days.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"}},"required":["message","signature"]}}}},"responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/Session"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"400":{"description":"Invalid input / unsupported network or registry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Not signed in or SIWE verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden (origin check or signer not authorized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Chain RPC unavailable or feature not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/auth/session":{"get":{"tags":["Auth"],"operationId":"authSession","summary":"Current session","responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"$ref":"#/components/schemas/Session"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"429":{"description":"Rate limited (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/auth/logout":{"post":{"tags":["Auth"],"operationId":"authLogout","summary":"End the session","responses":{"200":{"description":"Logged out","content":{"application/json":{"schema":{"type":"object","required":["apiVersion","data","meta"],"properties":{"apiVersion":{"type":"string","const":"1"},"data":{"type":"object","properties":{"authenticated":{"type":"boolean","const":false}},"required":[]},"meta":{"$ref":"#/components/schemas/ApiMeta"}}}}}},"403":{"description":"Forbidden (origin check or signer not authorized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"ApiMeta":{"type":"object","properties":{"source":{"type":"array","items":{"type":"string"},"description":"Data sources, e.g. [\"indexer\"], [\"rpc:46630\"]"},"generatedAt":{"type":"string","format":"date-time"},"chainId":{"type":"integer"},"indexedBlock":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"freshnessSeconds":{"anyOf":[{"type":"integer"},{"type":"null"}]},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["page","pageSize","total","hasMore"]}},"required":["source","generatedAt"]},"ApiError":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_INPUT","NOT_FOUND","UNAUTHORIZED","FORBIDDEN","RATE_LIMITED","CONFLICT","DUPLICATE_RECORD","INVALID_SIGNATURE","SIGNER_NOT_AUTHORIZED","TIMESTAMP_OUT_OF_RANGE","PAYLOAD_HASH_MISMATCH","UNSUPPORTED_NETWORK","UNSUPPORTED_REGISTRY","CHAIN_UNAVAILABLE","NOT_CONFIGURED","PAYLOAD_TOO_LARGE","INTERNAL"]},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["apiVersion","error"],"examples":[{"apiVersion":"1","error":{"code":"NOT_FOUND","message":"Agent #999999 is not in the AgentID index for chain 46630","requestId":"4f0c2a8e-…"}}]},"AgentRef":{"type":"object","properties":{"chainId":{"type":"integer"},"registry":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"agentId":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"}},"required":["chainId","registry","agentId"]},"AgentService":{"type":"object","properties":{"name":{"type":"string"},"endpoint":{"type":"string"},"version":{"type":"string"}},"required":["name","endpoint"]},"MetadataState":{"type":"object","properties":{"status":{"type":"string","enum":["ok","pending","empty","unsupported","unavailable","invalid"]},"source":{"type":"string","enum":["onchain-data-uri","https","ipfs","none"]},"contentHash":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"version":{"type":"integer"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["status","source","contentHash","version","error","resolvedAt"]},"SigningKey":{"type":"object","properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"status":{"type":"string","enum":["active","revoked","inactive_owner_changed","inactive_epoch"]},"authorizedBy":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"authorizedTx":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"authorizedBlock":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"authorizedAt":{"type":"string","format":"date-time"},"revokedTx":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"revokedBlock":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["address","status","authorizedBy","epoch","authorizedTx","authorizedBlock","authorizedAt","revokedTx","revokedBlock","revokedAt"]},"AgentSummary":{"type":"object","properties":{"chainId":{"type":"integer"},"registry":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"agentId":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"agentRegistry":{"type":"string","examples":["eip155:46630:0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"owner":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string","description":"Safe-to-render image URL (https, AgentID asset or data:image)"},{"type":"null"}]},"category":{"anyOf":[{"type":"string","enum":["research","finance","productivity","development","data","infrastructure","creative","security","general"]},{"type":"null"}]},"capabilities":{"type":"array","items":{"type":"string"},"description":"Self-declared; not independently verified"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"activeSigningKey":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},{"type":"null"}]},"lastActivityAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"agentIdProfile":{"type":"boolean"},"metadataStatus":{"type":"string","enum":["ok","pending","empty","unsupported","unavailable","invalid"]},"registeredAt":{"type":"string","format":"date-time"},"registrationTx":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"}},"required":["chainId","registry","agentId","agentRegistry","owner","metadataStatus","registeredAt","registrationTx"]},"AgentProfile":{"allOf":[{"$ref":"#/components/schemas/AgentSummary"},{"type":"object","properties":{"agentWallet":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},{"type":"null"}]},"agentURI":{"anyOf":[{"type":"string"},{"type":"null"}]},"services":{"type":"array","items":{"$ref":"#/components/schemas/AgentService"}},"links":{"type":"object","properties":{"website":{"type":"string"},"github":{"type":"string"},"docs":{"type":"string"}},"required":[]},"metadata":{"$ref":"#/components/schemas/MetadataState"},"registration":{"type":"object","properties":{"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"blockNumber":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"logIndex":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"}},"required":["txHash","blockNumber","logIndex","timestamp"]},"signingKeys":{"type":"array","items":{"$ref":"#/components/schemas/SigningKey"}},"activityCount":{"type":"integer"},"lastMetadataUpdateAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastIndexedBlock":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"}},"required":["agentWallet","agentURI","services","links","metadata","registration","signingKeys","activityCount","lastIndexedBlock"]}]},"MetadataVersion":{"type":"object","properties":{"version":{"type":"integer"},"agentURI":{"type":"string"},"source":{"type":"string","enum":["onchain-data-uri","https","ipfs","none"]},"status":{"type":"string","enum":["ok","pending","empty","unsupported","unavailable","invalid"]},"contentHash":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"bytes":{"anyOf":[{"type":"integer"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"setTx":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"setBlock":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"setLogIndex":{"type":"integer"},"setAt":{"type":"string","format":"date-time"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["version","agentURI","source","status","contentHash","setTx","setBlock","setLogIndex","setAt","resolvedAt"]},"ChainEventView":{"type":"object","properties":{"chainId":{"type":"integer"},"contract":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"blockNumber":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"logIndex":{"type":"integer"},"eventType":{"type":"string","enum":["Registered","URIUpdated","MetadataSet","Transfer","Upgraded","OwnerSynced","KeyAuthorized","KeyRevoked","AllKeysRevoked","ActivityAnchored"]},"agentId":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"data":{"type":"object","description":"Decoded event args (bigint → decimal string)"}},"required":["chainId","contract","txHash","blockNumber","logIndex","eventType","agentId","timestamp","data"]},"SignedActivityRecord":{"type":"object","properties":{"version":{"type":"integer","const":1},"chainId":{"type":"integer"},"registry":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"agentId":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"activityType":{"type":"string","enum":["TASK_COMPLETED","API_REQUEST","REPORT_GENERATED","SERVICE_AVAILABLE","DATA_PROCESSED","HEARTBEAT","CUSTOM"]},"payloadHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"timestamp":{"type":"integer","description":"Unix seconds"},"nonce":{"type":"string","pattern":"^[A-Za-z0-9._:-]{8,128}$"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$"}},"required":["version","chainId","registry","agentId","signer","activityType","payloadHash","timestamp","nonce","signature"],"description":"EIP-712 typed data: domain {name: 'AgentID Activity', version: '1', chainId, verifyingContract: registry}.","examples":[{"version":1,"chainId":46630,"registry":"0x8004A818BFB912233c491871b3d84c89A494BD9e","agentId":"42","signer":"0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF","activityType":"REPORT_GENERATED","payloadHash":"0x6f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0","timestamp":1795000000,"nonce":"6b3f0e2a9c1d4e5f8a7b6c5d4e3f2a1b","signature":"0x…65-byte EIP-712 signature…"}]},"VerificationCheck":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["PASS","FAIL","WARN","INFO","UNKNOWN","UNAVAILABLE","NOT_CHECKED"]},"detail":{"type":"string"},"source":{"type":"string"},"required":{"type":"boolean"},"data":{"type":"object"}},"required":["id","label","status","detail","required"]},"ReportBase":{"type":"object","properties":{"overall":{"type":"string","enum":["PASS","FAIL","INCOMPLETE"]},"verifiedAt":{"type":"string","format":"date-time"},"chainId":{"type":"integer"},"blockNumber":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"checks":{"type":"array","items":{"$ref":"#/components/schemas/VerificationCheck"}},"raw":{"type":"object"},"sources":{"type":"array","items":{"type":"string"}}},"required":["overall","verifiedAt","chainId","blockNumber","checks","raw","sources"]},"IdentityReport":{"allOf":[{"$ref":"#/components/schemas/ReportBase"},{"type":"object","properties":{"kind":{"type":"string","const":"identity"},"registry":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"agentId":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"agentRegistry":{"type":"string"}},"required":["kind","registry","agentId","agentRegistry"]}]},"ActivityReport":{"allOf":[{"$ref":"#/components/schemas/ReportBase"},{"type":"object","properties":{"kind":{"type":"string","const":"activity"},"recordId":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"registry":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},{"type":"null"}]},"signer":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},{"type":"null"}]},"disclaimer":{"type":"string","const":"A valid signature proves that an authorized signing key signed this record. It does not prove that the underlying task actually occurred."}},"required":["kind","recordId","agentId","registry","signer","disclaimer"]}]},"SignerReport":{"allOf":[{"$ref":"#/components/schemas/ReportBase"},{"type":"object","properties":{"kind":{"type":"string","const":"signer"},"signer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"agents":{"type":"array","items":{"type":"object","properties":{"agentId":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"status":{"type":"string","enum":["active","revoked","inactive_owner_changed","inactive_epoch"]}},"required":["agentId","status"]}}},"required":["kind","signer","agents"]}]},"ActivityRecordView":{"allOf":[{"$ref":"#/components/schemas/SignedActivityRecord"},{"type":"object","properties":{"id":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"receivedAt":{"type":"string","format":"date-time"},"payload":{"description":"Publisher-disclosed payload (hash-bound; never executed or trusted)"},"payloadDisclosed":{"type":"boolean"},"verification":{"type":"object","properties":{"state":{"type":"string","enum":["valid","invalid","unverified"]},"checks":{"type":"array","items":{"$ref":"#/components/schemas/VerificationCheck"}},"acceptedAtBlock":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]}},"required":["state","checks","acceptedAtBlock"]},"anchor":{"anyOf":[{"type":"object","properties":{"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"blockNumber":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},"timestamp":{"type":"string","format":"date-time"},"submitter":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]}},"required":["txHash","blockNumber","timestamp","submitter"]},{"type":"null"}]}},"required":["id","receivedAt","payload","payloadDisclosed","verification","anchor"]}]},"FeedAgent":{"allOf":[{"$ref":"#/components/schemas/AgentRef"},{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"handle":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","handle"]}]},"FeedItem":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"onchain"},"at":{"type":"string","format":"date-time"},"agent":{"$ref":"#/components/schemas/FeedAgent"},"event":{"$ref":"#/components/schemas/ChainEventView"}},"required":["kind","at","agent","event"]},{"type":"object","properties":{"kind":{"type":"string","const":"signed"},"at":{"type":"string","format":"date-time"},"agent":{"$ref":"#/components/schemas/FeedAgent"},"record":{"$ref":"#/components/schemas/ActivityRecordView"}},"required":["kind","at","agent","record"]}],"discriminator":{"propertyName":"kind"}},"ContractStatus":{"type":"object","properties":{"address":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},{"type":"null"}]},"configured":{"type":"boolean"},"hasCode":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"implementation":{"anyOf":[{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},{"type":"null"}]},"matchesOfficialBuild":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["address","configured","hasCode"]},"IndexerStatus":{"type":"object","properties":{"status":{"type":"string","enum":["idle","syncing","behind","error","never_run"]},"lastProcessedBlock":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"lagBlocks":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"lastSuccessfulSync":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","lastProcessedBlock","lagBlocks","lastSuccessfulSync","error"]},"NetworkStatus":{"type":"object","properties":{"chainId":{"type":"integer"},"name":{"type":"string"},"isTestnet":{"type":"boolean"},"enabled":{"type":"boolean"},"rpc":{"type":"object","properties":{"ok":{"type":"boolean"},"latencyMs":{"anyOf":[{"type":"integer"},{"type":"null"}]},"latestBlock":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ok","latencyMs","latestBlock","error"]},"contracts":{"type":"object","properties":{"identityRegistry":{"$ref":"#/components/schemas/ContractStatus"},"keyRegistry":{"$ref":"#/components/schemas/ContractStatus"},"activityAnchor":{"$ref":"#/components/schemas/ContractStatus"}},"required":["identityRegistry","keyRegistry","activityAnchor"]},"indexer":{"$ref":"#/components/schemas/IndexerStatus"},"checkedAt":{"type":"string","format":"date-time"}},"required":["chainId","name","isTestnet","enabled","rpc","contracts","indexer","checkedAt"]},"ProtocolStats":{"type":"object","properties":{"chainId":{"type":"integer"},"registeredAgents":{"type":"integer"},"uniqueOwners":{"type":"integer"},"agentIdProfiles":{"type":"integer"},"signedActivityRecords":{"type":"integer"},"anchoredRecords":{"type":"integer"},"activeSigningKeys":{"type":"integer"},"latestIndexedBlock":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]},"indexerUpdatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["chainId","registeredAgents","uniqueOwners","agentIdProfiles","signedActivityRecords","anchoredRecords","activeSigningKeys","latestIndexedBlock","indexerUpdatedAt"]},"HandleAvailability":{"type":"object","properties":{"handle":{"type":"string"},"available":{"type":"boolean"},"reason":{"type":"string","enum":["invalid","reserved","claimed"]},"message":{"type":"string"},"claimedBy":{"allOf":[{"$ref":"#/components/schemas/AgentRef"},{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":[]}]}},"required":["handle","available"]},"PublishActivityResult":{"type":"object","properties":{"accepted":{"type":"boolean","const":true},"record":{"$ref":"#/components/schemas/ActivityRecordView"},"report":{"$ref":"#/components/schemas/ActivityReport"}},"required":["accepted","record","report"]},"AssetResult":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer"},"height":{"type":"integer"},"bytes":{"type":"integer"}},"required":["url","sha256","contentType","width","height","bytes"]},"IndexTxResult":{"type":"object","properties":{"processed":{"type":"boolean"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/AgentRef"}},"events":{"type":"integer"},"blockNumber":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"uint256 as a decimal string"},{"type":"null"}]}},"required":["processed","agents"]},"Session":{"type":"object","properties":{"authenticated":{"type":"boolean"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","examples":["0x8004A818BFB912233c491871b3d84c89A494BD9e"]},"chainId":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["authenticated"]}},"securitySchemes":{"session":{"type":"apiKey","in":"cookie","name":"aid_session","description":"SIWE session cookie; writes also require Origin = app origin"},"cronSecret":{"type":"http","scheme":"bearer","description":"CRON_SECRET"}}},"x-examples":{"recordId":"0x3e8a1f4c2b9d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f","agent":{"chainId":46630,"registry":"0x8004A818BFB912233c491871b3d84c89A494BD9e","agentId":"42","name":"Atlas"}}}