Skip to main content
The LiveKitTransport class provides a WebRTC transport layer using LiveKit’s infrastructure. It wraps a LiveKit client to handle audio/video device management, WebRTC connections, and real-time communication between clients and bots. For complete documentation on LiveKit’s API, see the LiveKit Client SDK Reference. This transport is designed for production use cases, leveraging LiveKit’s infrastructure for low-latency, high-quality audio and video streaming. It expects your Pipecat server to include the corresponding LiveKitTransport server-side implementation.

Installation

Usage

Basic Setup

API Reference

Constructor Options

The LiveKitTransportConstructorOptions extends the RoomOptions type from the livekit-client library. These options are passed directly through to the LiveKit Room constructor. See the LiveKit RoomOptions documentation for a complete list of options.

TransportConnectionParams

On connect(), the LiveKitTransport requires a url and token to connect to a LiveKit room. This can be provided directly to the PipecatClient’s connect() method or via a starting endpoint passed to the PipecatClient’s startBotAndConnect() method. If using an endpoint, your endpoint should return a JSON object with url, token, and optional roomConnectionOptions. See the client connect() documentation for more information.
string
required
The WebSocket URL of your LiveKit server (e.g., wss://your-server.livekit.cloud).
string
required
Authentication token for the LiveKit room. Generate this on your server using LiveKit’s access token API.
RoomConnectOptions
Optional LiveKit room connection options. See the LiveKit RoomConnectOptions documentation for available options.

Events

The transport implements the various PipecatClient event handlers. For LiveKit-specific events, you can attach listeners to the underlying LiveKit room. For a list of available events, see the LiveKit Events Reference.

More Information

LiveKit Docs

Official LiveKit Documentation

Source

LiveKitTransport

Package

@pipecat-ai/livekit-transport

Choosing a Transport

Transport Selection Guide