A complete starter project for building voice AI apps with LiveKit Agents for Python.
The starter project includes:
- A simple voice AI assistant based on the Voice AI quickstart
- Voice AI pipeline based on OpenAI, Cartesia, and Deepgram
- Easily integrate your preferred LLM, STT, and TTS instead, or swap to a realtime model like the OpenAI Realtime API
- Eval suite based on the LiveKit Agents testing & evaluation framework
- LiveKit Turn Detector for contextually-aware speaker detection, with multilingual support
- LiveKit Cloud enhanced noise cancellation
- Integrated metrics and logging
This starter app is compatible with SIP-based telephony or any custom web/mobile frontend.
Clone the repository and install dependencies to a virtual environment:
cd agent-starter-python
uv syncSet up the environment by copying .env.example to .env and filling in the required values:
LIVEKIT_URL: Use LiveKit Cloud or run your ownLIVEKIT_API_KEYLIVEKIT_API_SECRETOPENAI_API_KEY: Get a key or use your preferred LLM providerDEEPGRAM_API_KEY: Get a key or use your preferred STT providerCARTESIA_API_KEY: Get a key or use your preferred TTS provider
You can load the LiveKit environment automatically using the LiveKit CLI:
lk app env -w .envRun this command to speak to your agent directly in your terminal:
uv run python src/agent.py consoleTo run the agent for use with a frontend or telephony, use the dev command:
uv run python src/agent.py devIn production, use the start command:
uv run python src/agent.py startTo use a prebuilt frontend or build your own, see the agents frontend guide.
To add a phone number, see the agents telephony guide.
This project includes a complete suite of evals, based on the LiveKit Agents testing & evaluation framework. To run them, use pytest.
uv run pytest evalsThis project is licensed under the MIT License - see the LICENSE file for details.