The WebSocket interface provides real-time bidirectional communication between clients and agents using JSON messages.Documentation Index
Fetch the complete documentation index at: https://docs.definable.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
ws://localhost:8000/ws and exchange JSON messages.
Wire Protocol
Client to Server
Server to Client
Heartbeat
The interface sends periodic heartbeat pings. Clients should respond with pong messages to keep the connection alive.Constructor Reference
WebSocket endpoint path.
Require authentication during the WebSocket handshake.
FastAPI Integration
Usecreate_router() to mount the WebSocket endpoint on an existing FastAPI app: