The Client SDKs are currently in transition to a new, simpler API design. The js and react libraries have already been deployed with these changes. Their corresponding documentation along with this top-level documentation has been updated to reflect the latest changes. For transitioning to the new API, please refer to the migration guide. Note that React Native, iOS, and Android SDKs are still in the process of being updated and their documentation will be updated once the new versions are released. If you have any questions or need assistance, please reach out to us on Discord.
Pipecat provides client SDKs for multiple platforms, all implementing the RTVI (Real-Time Voice and Video Inference) standard. These SDKs make it easy to build real-time AI applications that can handle voice, video, and text interactions.

Core Functionality

All Pipecat client SDKs provide:

Media Management

Handle device inputs and media streams for audio and video

Bot Integration

Configure and communicate with your Pipecat bot

Session Management

Manage connection state and error handling

Core Types

PipecatClient

The main class for interacting with Pipecat bots. It is the primary type you will interact with.

Transport

The PipecatClient wraps a Transport, which defines and provides the underlying connection mechanism (e.g., WebSocket, WebRTC). Your Pipecat pipeline will contain a corresponding transport.

RTVIMessage

Represents a message sent to or received from a Pipecat bot.

Simple Usage Examples

Establish ongoing connections via WebSocket or WebRTC for:
  • Live voice conversations
  • Real-time video processing
  • Continuous interactions
// Example: Establishing a real-time connection
import { RTVIEvent, RTVIMessage, PipecatClient } from "@pipecat-ai/client-js";
import { DailyTransport } from "@pipecat-ai/daily-transport";

const pcClient = new PipecatClient({
  transport: new DailyTransport(),
  enableMic: true,
  enableCam: false,
  enableScreenShare: false,
  callbacks: {
    onBotConnected: () => {
      console.log("[CALLBACK] Bot connected");
    },
    onBotDisconnected: () => {
      console.log("[CALLBACK] Bot disconnected");
    },
    onBotReady: () => {
      console.log("[CALLBACK] Bot ready to chat!");
    },
  },
});

try {
  // Below, we use a REST endpoint to fetch connection credentials for our
  // Daily Transport. Alternatively, you could provide those credentials
  // directly to `connect()`.
  await pcClient.connect({
    endpoint: "https://your-connect-end-point-here/connect",
  });
} catch (e) {
  console.error(e.message);
}

// Events (alternative approach to constructor-provided callbacks)
pcClient.on(RTVIEvent.Connected, () => {
  console.log("[EVENT] User connected");
});
pcClient.on(RTVIEvent.Disconnected, () => {
  console.log("[EVENT] User disconnected");
});

About RTVI

Pipecat’s client SDKs implement the RTVI (Real-Time Voice and Video Inference) standard, an open specification for real-time AI inference. This means:
  • Your code can work with any RTVI-compatible inference service
  • You get battle-tested tooling for real-time multimedia handling
  • You can easily set up development and testing environments

Next Steps

Get started by trying out examples: