LiveKit Server
LiveKit is a real-time communication server that powers the Avatar Agent's audio and video capabilities. It provides the infrastructure for WebRTC connections, handling media streaming, and managing real-time sessions between users and AI agents.
Overview
Before setting up the Avatar Agent, you need access to a LiveKit server and create credentials. There are two options:
-
LiveKit Cloud (Recommended for quick start) - Fully managed service with built-in monitoring and global edge network
-
Self-Hosted Server (Recommended privacy) - Complete control over infrastructure and data sovereignty
- LiveKit Cloud (Managed LiveKit-Server)
- Self-hosted LiveKit-Server
The Avatar Agent needs the following credentials to authenticate with your LiveKit server:
LIVEKIT_URL=<YOUR_LIVEKIT_URL>
LIVEKIT_API_KEY=<YOUR_LIVEKIT_API_KEY>
LIVEKIT_API_SECRET=<YOUR_LIVEKIT_API_SECRET>
Treat these credentials like passwords. Never commit them to version control or share them publicly.
Option 1: LiveKit Cloud
LiveKit Cloud is the fastest way to get started. It's a fully managed service that handles server maintenance and updates.
LiveKit Cloud offers a generous free tier perfect for development and testing.
Set Up Project
1. Create an Account
Visit https://livekit.io/ and sign up for a free account.
2. Create a Project
After logging in, create a new project and choose a project name.
Obtain LiveKit Credentials
Navigate to Settings → API Keys, click "Create New Key" or use the default key, and copy and save the following credentials:
LIVEKIT_URL(e.g.,wss://your-project.livekit.cloud)LIVEKIT_API_KEYLIVEKIT_API_SECRET
Option 2: Self-Hosted LiveKit Server
Self-hosting gives you complete control over your infrastructure and data, making it ideal for production environments with strict privacy requirements and no usage limit.
Set Up Server
1. Install LiveKit Server
Follow the official Self-Hosting Documentation.
Choose your deployment method:
- Docker/Docker Compose (easiest)
- Kubernetes (for production)
- Manual installation
2. Configure the Server
- Set up your
livekit.yamlconfiguration file - Configure networking and domains
- Set up SSL/TLS certificates
Obtain LiveKit Credentials
After installation, retrieve the credentials from your LiveKit server configuration. The credentials are typically found in /etc/livekit.yaml or your Docker Compose environment variables.
LIVEKIT_API_KEY and LIVEKIT_API_SECRET are defined in your livekit.yaml under the keys section.
...
keys:
API_KEY_1: YOUR_API_SECRET_1
API_KEY_2: YOUR_API_SECRET_2
...
In the example snippet above API_KEY_1 is the LIVEKIT_API_KEY and YOUR_API_SECRET_1 is the LIVEKIT_API_SECRET.
LIVEKIT_URL will be the server's WebSocket endpoint (e.g., wss://livekit.your-domain.com).
Next Steps
Once you have obtained your LiveKit credentials from either setup method, proceed to configure your Avatar Agent by adding them to your environment configuration file.
Check out the Avatar Agent Configuration guide to learn how to use these credentials.