Chat API

Synchronous chat, SSE streaming, and conversation management.

POST/api/chatX-Agent-Access-Token

Complete a chat turn; returns response, conversation_id, chain_calls, tokens_used.

{
  "agent_id": "uuid",
  "message": "string",
  "conversation_id": "uuid | null",
  "connected_wallet_address": "0x... | null"
}
POST/api/chat/streamX-Agent-Access-Token

Same request body as /api/chat. Response is text/event-stream with typed JSON events.

Conversations

GET/api/conversations?agent_id={id}X-Agent-Access-Token

List conversation summaries for an agent.

GET/api/conversations/{id}/messagesX-Agent-Access-Token

Up to 500 messages with role, content, chain_calls.

DELETE/api/conversations/{id}X-Agent-Access-Token

Delete conversation and messages (204).

GET/api/conversations/{id}/streamX-Agent-Access-Token

SSE stream of transaction confirmations for the conversation. Accepts access_token query param for EventSource clients.

See the Chat guide for SSE event types and streaming behavior.