Skip to main content
LiveKit Agents logo
LiveKit is a WebRTC-first platform for realtime video, voice, and data in your product. LiveKit Agents is its framework for conversational agents. Cartesia integrates in two ways: open source plugins and LiveKit Inference.

Quickstart

GitHub template for a basic LiveKit voice agent

Open source plugins

These are plugins that can be used with the open-source LiveKit Agents packages.
You can use Cartesia with Python LiveKit Agents by installing the livekit-plugins-cartesia package. If needed, you can the source code of the plugin in the /livekit-plugins/livekit-plugins-cartesia directory of the livekit/agents repo.
Ink 2 requires livekit-plugins-cartesia>=1.5.15.
Older versions will produce poor results without raising runtime errors.
Ink-2 natively handles turn detection, and the LiveKit plugin defaults to ink-2, which detects end-of-turn on its own; set turn_detection="stt" so the session uses those signals to know when the user stops speaking.

Setting up the Python plugin in your own agent

To get started, first install the main livekit-agents package as well as livekit-plugins-cartesia:
Then, use the Cartesia STT and TTS plugins when creating your agent:

Running a Python example

Check out /examples/other/cartesia.py in the livekit/agents repo for a fully working conversational agent.

LiveKit Inference

You can also use Cartesia’s models on LiveKit’s infrastructure. API keys and pricing are managed by LiveKit rather than Cartesia.
  1. LiveKit docs for Cartesia STT
  2. LiveKit docs for Cartesia TTS

Demo

LiveKit Cartesia Demo

Try out a simple voice assistant built with LiveKit Agents and Cartesia.
Simplified source code for the demo is available on GitHub in the cartesia-ai/livekit-agents-example repo.