Skip to main content

Overview

LiveKit is an open-source real-time communication platform built on WebRTC and distributed media servers. In BrokerOS, the LiveKit integration is implemented in integrations/voice/agents/livekit/src/index.ts under the Turborepo workspace package @brokeros/int-agent-livekit. BrokerOS administrators configure LiveKit directly inside the Web UI at Dashboard -> Marketing -> Voice -> Settings. All API credentials and server endpoints are encrypted using AES-256-GCM and stored in PostgreSQL (VoiceAgentIntegration).

Architecture and Dispatch Sequence

The LiveKit integration implements the IVoiceAgentProvider contract from @brokeros/types.

Step 1: Obtain Credentials from LiveKit

  1. Log into your account at cloud.livekit.io (or your self-hosted LiveKit instance).
  2. Open your project dashboard.
  3. Under Project Settings -> Keys, generate and copy your API Key and API Secret.
  4. Copy your project WebSocket Server URL (e.g. wss://yourproject.livekit.cloud).

Step 2: Connect in the BrokerOS Web Dashboard

In your BrokerOS dashboard:
  1. Navigate to Dashboard -> Marketing -> Voice -> Settings.
  2. Select the Gateways & Voice Platforms tab (/dashboard/marketing/voice/settings?tab=providers).
  3. Click the AI Voice Platforms sub-tab.
  4. Click Add Platform and select LiveKit Agents.
  5. Fill in the modal connection fields:
  1. Click Save & Verify Engine. BrokerOS verifies connectivity, encrypts credentials via AES-256-GCM, and saves them in VoiceAgentIntegration.

Integration Implementation Details

The LiveKit integration logic is located in integrations/voice/agents/livekit/src/index.ts and integrations/voice/agents/livekit/src/livekit-dispatcher.ts.

Live Verification Engine

The client validates connectivity and configuration options:

SIP Participant Call Dispatch

When an outbound call is dispatched, LiveKit creates a room, assigns an agent participant, and instructs the SIP participant dispatcher to dial the target PSTN line: