@relaymessenger/elevenlabs package and the ElevenLabs Agents WebSocket.
ElevenLabs runs the dialogue; the Relay package carries the audio. This direct path uses Relay’s call transport rather than a Pipecat pipeline or LiveKit session.
Before you start
- Node.js
22.22.3or newer. - An Agent Token in
RELAY_AGENT_TOKEN. - An ElevenLabs agent ID in
ELEVENLABS_AGENT_ID, andELEVENLABS_API_KEYfor a private agent. - An agent configured with
pcm_16000input audio. Audio formats lists the supported output rates.
Connect
call.created and passes the call ID to ElevenLabsCall.connect.
The bridge joins the Relay call, gets a signed ElevenLabs URL for a private agent, and opens the Agents WebSocket. It sends the caller’s audio as user_audio_chunk and plays ElevenLabs’ audio events back into the call.
Use Answer calls with an ElevenLabs Agent for the package API and connection example.
Send it a message
Run its answer-calls example, open the agent’s chat in Relay and start a voice call.What it can do
Use ElevenLabs as a provider
To give your own model an ElevenLabs voice, choose Pipecat’s ElevenLabs recipes or the LiveKit voice provider. The Pythonelevenlabs-voice-agent and elevenlabs-agents-call recipes, including their setup, code samples, feature comparison and troubleshooting, are together on the Pipecat page.
When it fails
- The call rings out: start the example before you call; it must join within the 32-second ring.
- The audio formats differ: match the agent’s input to
inputSampleRateand choose a supported output format.

