Home

Awesome

<!--BEGIN_BANNER_IMAGE--> <picture> <source media="(prefers-color-scheme: dark)" srcset="/.github/banner_dark.png"> <source media="(prefers-color-scheme: light)" srcset="/.github/banner_light.png"> <img style="width:100%;" alt="The LiveKit icon, the name of the repository and some sample code in the background." src="https://raw.githubusercontent.com/livekit/agents/main/.github/banner_light.png"> </picture> <!--END_BANNER_IMAGE--> <!--BEGIN_DESCRIPTION-->

<br /><br /> Looking for the JS/TS library? Check out AgentsJS

✨ NEW ✨

Google Gemini 2.0 support

Introducing support for the new Gemini 2.0 model. Here's an example voice agent running Google STT, TTS, and Gemini 2.0 Flash: code

In-house phrase endpointing model

We’ve trained a new, open weights phrase endpointing model that significantly improves end-of-turn detection and conversational flow between voice agents and users by reducing agent interruptions. Optimized to run on CPUs, it’s available via livekit-plugins-turn-detector package.

What is Agents?

The Agents framework enables you to build AI-driven server programs that can see, hear, and speak in realtime. It offers a fully open-source platform for creating realtime, agentic applications.

Features

<!--END_DESCRIPTION-->

Installation

To install the core Agents library:

pip install livekit-agents

Integrations

The framework includes a variety of plugins that make it easy to process streaming input or generate output. For example, there are plugins for converting text-to-speech or running inference with popular LLMs. Here's how you can install a plugin:

pip install livekit-plugins-openai

Realtime API

We've partnered with OpenAI on a new MultimodalAgent API in the Agents framework. This class completely wraps OpenAI’s Realtime API, abstracts away the raw wire protocol, and provide an ultra-low latency WebRTC transport between GPT-4o and your users’ devices. This same stack powers Advanced Voice in the ChatGPT app.

LLM

ProviderPackageUsage
OpenAIlivekit-plugins-openaiopenai.LLM()
Azure OpenAIlivekit-plugins-openaiopenai.LLM.with_azure()
Anthropiclivekit-plugins-anthropicanthropic.LLM()
Google (Gemini)livekit-plugins-openaiopenai.LLM.with_vertex()
Cerebraslivekit-plugins-openaiopenai.LLM.with_cerebras()
Groqlivekit-plugins-openaiopenai.LLM.with_groq()
Ollamalivekit-plugins-openaiopenai.LLM.with_ollama()
Perplexitylivekit-plugins-openaiopenai.LLM.with_perplexity()
Together.ailivekit-plugins-openaiopenai.LLM.with_together()
X.ai (Groq)livekit-plugins-openaiopenai.LLM.with_x_ai()

STT

ProviderPackageStreamingUsage
Azurelivekit-plugins-azureazure.STT()
Deepgramlivekit-plugins-deepgramdeepgram.STT()
OpenAI (Whisper)livekit-plugins-openaiopenai.STT()
Googlelivekit-plugins-googlegoogle.STT()
AssemblyAIlivekit-plugins-assemblyaiassemblyai.STT()
Groq (Whisper)livekit-plugins-openaiopenai.STT.with_groq()
FAL (Whizper)livekit-plugins-falfal.STT()

TTS

ProviderPackageStreamingVoice CloningUsage
Cartesialivekit-plugins-cartesiacartesia.TTS()
ElevenLabslivekit-plugins-elevenlabselevenlabs.TTS()
OpenAIlivekit-plugins-openaiopenai.TTS()
Azure OpenAIlivekit-plugins-openaiopenai.TTS.with_azure()
Googlelivekit-plugins-googlegoogle.TTS()
Deepgramlivekit-plugins-deepgramdeepgram.TTS()

Other plugins

PluginDescription
livekit-plugins-ragAnnoy based simple RAG
livekit-plugins-llama-indexRAG with LlamaIndex
livekit-plugins-nltkUtilities for working with text
livekit-plugins-vadVoice activity detection
livekit-plugins-turn-detectorConversational turn detection model

Documentation and guides

Documentation on the framework and how to use it can be found here

Example agents

DescriptionDemo LinkCode Link
A basic voice agent using a pipeline of STT, LLM, and TTSdemocode
Voice agent using the new OpenAI Realtime APIdemocode
Super fast voice agent using Cerebras hosted Llama 3.1democode
Voice agent using Cartesia's Sonic modeldemocode
Agent that looks up the current weather via function callN/Acode
Voice Agent using Gemini 2.0 FlashN/Acode
Voice agent with custom turn-detection modelN/Acode
Voice agent that performs a RAG-based lookupN/Acode
Video agent that publishes a stream of RGB framesN/Acode
Transcription agent that generates text captions from a user's speechN/Acode
A chat agent you can text who will respond back with generated speechN/Acode
Localhost multi-agent conference callN/Acode
Moderation agent that uses Hive to detect spam/abusive videoN/Acode

Contributing

The Agents framework is under active development in a rapidly evolving field. We welcome and appreciate contributions of any kind, be it feedback, bugfixes, features, new plugins and tools, or better documentation. You can file issues under this repo, open a PR, or chat with us in LiveKit's Slack community.

<!--BEGIN_REPO_NAV-->

<br/><table>

<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead> <tbody> <tr><td>Realtime SDKs</td><td><a href="https://github.com/livekit/client-sdk-js">Browser</a> · <a href="https://github.com/livekit/client-sdk-swift">iOS/macOS/visionOS</a> · <a href="https://github.com/livekit/client-sdk-android">Android</a> · <a href="https://github.com/livekit/client-sdk-flutter">Flutter</a> · <a href="https://github.com/livekit/client-sdk-react-native">React Native</a> · <a href="https://github.com/livekit/rust-sdks">Rust</a> · <a href="https://github.com/livekit/node-sdks">Node.js</a> · <a href="https://github.com/livekit/python-sdks">Python</a> · <a href="https://github.com/livekit/client-sdk-unity">Unity</a> · <a href="https://github.com/livekit/client-sdk-unity-web">Unity (WebGL)</a></td></tr><tr></tr> <tr><td>Server APIs</td><td><a href="https://github.com/livekit/node-sdks">Node.js</a> · <a href="https://github.com/livekit/server-sdk-go">Golang</a> · <a href="https://github.com/livekit/server-sdk-ruby">Ruby</a> · <a href="https://github.com/livekit/server-sdk-kotlin">Java/Kotlin</a> · <a href="https://github.com/livekit/python-sdks">Python</a> · <a href="https://github.com/livekit/rust-sdks">Rust</a> · <a href="https://github.com/agence104/livekit-server-sdk-php">PHP (community)</a></td></tr><tr></tr> <tr><td>UI Components</td><td><a href="https://github.com/livekit/components-js">React</a> · <a href="https://github.com/livekit/components-android">Android Compose</a> · <a href="https://github.com/livekit/components-swift">SwiftUI</a></td></tr><tr></tr> <tr><td>Agents Frameworks</td><td><b>Python</b> · <a href="https://github.com/livekit/agents-js">Node.js</a> · <a href="https://github.com/livekit/agent-playground">Playground</a></td></tr><tr></tr> <tr><td>Services</td><td><a href="https://github.com/livekit/livekit">LiveKit server</a> · <a href="https://github.com/livekit/egress">Egress</a> · <a href="https://github.com/livekit/ingress">Ingress</a> · <a href="https://github.com/livekit/sip">SIP</a></td></tr><tr></tr> <tr><td>Resources</td><td><a href="https://docs.livekit.io">Docs</a> · <a href="https://github.com/livekit-examples">Example apps</a> · <a href="https://livekit.io/cloud">Cloud</a> · <a href="https://docs.livekit.io/home/self-hosting/deployment">Self-hosting</a> · <a href="https://github.com/livekit/livekit-cli">CLI</a></td></tr> </tbody> </table> <!--END_REPO_NAV-->