Skip to main content
Pass each decoded WebSocket event, including the initial metadata, to the adapter. Keep your input, pong, and tool handlers.
Set ELEVENLABS_AGENT_ID. Private agents also need ELEVENLABS_API_KEY; the runnable examples request a signed URL on the backend.
The adapter supports PCM and μ-law, final audio flushes, and interruptions. If attaching after connection setup, pass the negotiated audio_format, such as "pcm_24000". The demo plays one response; microphone conversations require your input handler. Python example · Node example