A voice AI project built with LiveKit Agents for Python and LiveKit Cloud. This project is designed to work with coding agents like Claude Code, Cursor, and Codex — see Coding agent support for setup tips.
Important
This project was converted to code from the LiveKit Agent Builder. The code is identical to production deployments from the builder. Follow the steps below to make it your own and deploy it to LiveKit Cloud. once you do so, you can delete the version in the builder.
Get your agent running locally and in production:
- Run locally: Follow the Quickstart section below to set up your environment and test the agent
- Deploy to production: See the Deploy to production section for deployment options and best practices
Get up and running so you can start customizing:
-
Install dependencies:
uv sync -
Set up your LiveKit credentials:
Sign up for LiveKit Cloud, then configure your environment. You can either:
-
Manual setup: Copy
.env.exampleto.env.localand fill in:LIVEKIT_URLLIVEKIT_API_KEYLIVEKIT_API_SECRET
-
Automatic setup (recommended): Use the LiveKit CLI:
lk cloud auth lk app env -w -d .env.local
-
-
Download required models:
uv run python src/agent.py download-filesThis downloads Silero VAD and the LiveKit turn detector models.
-
Test your agent:
uv run python src/agent.py consoleThis lets you speak to your agent directly in your terminal.
-
Run for development:
uv run python src/agent.py devUse this when connecting to a frontend or telephony. This puts your agent into your LiveKit Cloud project, so use a different project if you don't want to affect production traffic.
Once your agent is running, enhance it for your use case:
-
Customize AI models: Your agent uses a voice AI pipeline built on LiveKit Inference. More than 50 model providers are supported, including Realtime models.
-
Add tests: You can add a full test suite to your agent. See the testing documentation for more information.
-
Build reliable workflows: For complex agents, use tasks and handoffs instead of long instruction prompts. This minimizes latency and improves reliability by structuring your agent into focused, reusable components.
Supercharge your development with AI coding assistants that understand LiveKit. This project works seamlessly with Claude Code, Cursor, Codex, and other AI coding tools.
For your convenience, LiveKit offers both a CLI and an MCP server that can be used to browse and search its documentation. The LiveKit CLI (lk docs) works with any coding agent that can run shell commands. Install it for your platform:
macOS:
brew install livekit-cliLinux:
curl -sSL https://get.livekit.io/cli | bashWindows:
winget install LiveKit.LiveKitCLIThe lk docs subcommand requires version 2.15.0 or higher. Check your version with lk --version and update if needed. Once installed, your coding agent can search and browse LiveKit documentation directly from the terminal:
lk docs search "voice agents"
lk docs get-page /agents/start/voice-ai-quickstartSee the Using coding agents guide for more details, including MCP server setup.
Customize the AI assistant context: The project includes an AGENTS.md file that guides AI assistants on how to work with this codebase. Edit this file to add your own project-specific context, patterns, and preferences. Learn more at https://agents.md.
If you don't alread have a frontend, use the following templates and guides to get started on one:
| Platform | Starter Template | What to customize |
|---|---|---|
| Web | livekit-examples/agent-starter-react |
React & Next.js—customize UI, add features, integrate with your backend |
| iOS/macOS | livekit-examples/agent-starter-swift |
Native apps for iOS, macOS, visionOS—add platform-specific features |
| Flutter | livekit-examples/agent-starter-flutter |
Cross-platform—customize for Android, iOS, web, desktop |
| React Native | livekit-examples/voice-assistant-react-native |
Mobile with Expo—add native modules, customize navigation |
| Android | livekit-examples/agent-starter-android |
Kotlin & Jetpack Compose—build Material Design UI |
| Web Embed | livekit-examples/agent-starter-embed |
Widget for any website—customize styling, add to your site |
| Telephony | Documentation | Add phone calling—configure SIP, add call routing, customize prompts |
LiveKit provides deep session insights for your agents through Agent Observability. Monitor conversation quality, track latency metrics, and debug agent behavior in production.
To deploy your agent to production, you can use the LiveKit CLI:
lk agent createSee the deploying to production guide for detailed instructions and optimization tips.
Do not copy key.json into the Docker image. LiveKit Cloud supports file-mounted
secrets and mounts them under /etc/secrets/<filename> at runtime. This project
sets GOOGLE_APPLICATION_CREDENTIALS=/etc/secrets/key.json in the Dockerfile.
For an existing LiveKit Cloud agent, mount the local service account file and set the matching environment variable:
./scripts/mount_google_credentials.sh ./key.jsonYou can also pass the same secret mount when deploying a new image:
lk agent deploy \
--secret-mount ./key.json \
--secrets "GOOGLE_APPLICATION_CREDENTIALS=/etc/secrets/key.json"For local Docker runs, mount the file read-only at the same path:
docker run --rm \
-v "$PWD/key.json:/etc/secrets/key.json:ro" \
your-agent-imageJoin the LiveKit Slack Community to get help from the LiveKit team and other developers.