{"endpoint":"/api/demo/chat","method":"POST","description":"AI Agent Chat demo. Proxies your query to a LangChain-powered AI agent that verifies your on-chain identity before engaging in conversation. Supports both signed (verified) and unsigned (anonymous) requests.","authentication":{"required":true,"protocol":"Self Agent ID signed headers","requiredHeaders":{"x-self-agent-signature":"HMAC signature (optional — unsigned requests treated as anonymous)","x-self-agent-timestamp":"ISO 8601 timestamp (required if signature is present)"},"optionalHeaders":{"x-self-agent-keytype":"Key type: 'ed25519' or omit for ECDSA","x-self-agent-key":"Agent public key (required for Ed25519)"},"howToSign":"Use agent.fetch() from @selfxyz/agent-sdk, or manually sign with agent.signRequest() and attach headers."},"bodySchema":{"query?":"string — your message to the AI agent","session_id?":"string — session ID for conversation continuity","?network":"Query param: 'celo-sepolia' (default) or 'celo-mainnet'"},"exampleBody":{"query":"Hello, I am a verified agent. What can you tell me?","session_id":"my-session-123"},"notes":["Requires LANGCHAIN_URL server env var pointing to the LangChain agent service.","Unsigned requests are treated as anonymous — the AI may refuse to engage.","Signed requests are cryptographically verified on-chain before the AI responds."],"sdkExample":"const res = await agent.fetch(\"https://app.ai.self.xyz/api/demo/chat?network=celo-sepolia\", { method: \"POST\", headers: { \"Content-Type\": \"application/json\" }, body: JSON.stringify({}) });"}