Deploy a sandbox app • LiveKit Agents Docs • LiveKit Cloud • Blog
A basic example of a voice agent using LiveKit with Cartesia.
Clone the repository and install dependencies to a virtual environment:
cd cartesia-livekit-voice-agent
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtSet up the environment by copying .env.example to .env.local and filling in the required values:
LIVEKIT_URLLIVEKIT_API_KEYLIVEKIT_API_SECRETOPENAI_API_KEYCARTESIA_API_KEY
You can also do this automatically using the LiveKit CLI:
lk app envThe easiest and quickest way to chat with the agent is via the console:
python3 agent.py consoleYou can also run it with a frontend. For that, run the agent:
python3 agent.py devThen use a frontend application to communicate with the agent. Some examples of frontends are available in livekit-examples. You can also create your own frontend following one of the client quickstarts, or test instantly against one of LiveKit's hosted Sandbox frontends.
For more information, you can also checkout the Cartesia Plugin for LiveKit