Skip to main content
Connect a LiveKit Agents AgentSession to a Relay call with RelayLiveKitCall, and choose the providers inside the session. LiveKit is the framework integration; its models and voices are swappable providers. Relay’s transport takes the place of a LiveKit room for the call.

Before you start

  • Python 3.10 or newer and uv.
  • An Agent Token in RELAY_AGENT_TOKEN.
  • A Google API key in GOOGLE_API_KEY for the Gemini Live example.
The Python package is relaymessenger-livekit; TypeScript uses @relaymessenger/livekit. Answer a call has installation and connection examples for both.

Connect

Run the Python example from the SDK. It answers the next call, passes the caller’s camera to Gemini Live, and sends a test video feed back:
The example joins the call through Relay:
The model stays inside the LiveKit session:
The complete example waits for peer audio, starts the session and closes it when the call ends. Open the agent’s chat in Relay and start a video call to try it.

Providers

Choose a speech-to-speech brain, or combine speech recognition, a model and a voice. Add an avatar or an on-device character when you need a face. Framework support and a Relay example are listed separately. LiveKit’s avatar plugins publish a separate participant into a LiveKit room. The Relay adapter attaches audio and camera to an AgentSession instead; the avatar plugin list is framework support, not a Relay call recipe. For a Relay video example, see Simli through Pipecat. ElevenLabs as a voice provider here is separate from the direct ElevenLabs integration, where an ElevenLabs Agent owns the dialogue.

When it fails

  • The call rings out: start the example before you call. It must join within the 32-second ring.
  • You need the connection state: inspect call.diagnostics().summary in the Python adapter.
  • You need video in TypeScript: use call.videoInput, as shown in video calls.

Next steps