livekit /agents

A framework for building realtime voice AI agents 🤖🎙️📹

★ 15,161⑂ 4,113
PythonCreated 2023-10-19docs.livekit.io/agents
TA的项目
15,161
stars
+85+93
4,113
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions

README

!PyPI - Version








Looking for the JS/TS library? Check out AgentsJS

 What is Agents?



The Agent Framework is designed for building realtime, programmable participants
that run on servers. Use it to create conversational, multi-modal voice
agents that can see, hear, and understand.



 Features

- Flexible integrations: A comprehensive ecosystem to mix and match the right STT, LLM, TTS, and Realtime API to suit your use case.
- Integrated job scheduling: Built-in task scheduling and distribution with dispatch APIs to connect end users to agents.
- Extensive WebRTC clients: Build client applications using LiveKit's open-source SDK ecosystem, supporting all major platforms.
- Telephony integration: Works seamlessly with LiveKit's telephony stack, allowing your agent to make calls to or receive calls from phones.
- Exchange data with clients: Use RPCs and other Data APIs to seamlessly exchange data with clients.
- Semantic turn detection: Uses a transformer model to detect when a user is done with their turn, helps to reduce interruptions.
- MCP support: Native support for MCP. Integrate tools provided by MCP servers with one line of code.
- Builtin test framework: Write tests and use judges to ensure your agent is performing as expected.
- Open-source: Fully open-source, allowing you to run the entire stack on your own servers, including LiveKit server, one of the most widely used WebRTC media servers.

 Installation

To install the core Agents library, along with plugins for popular model providers:

bash
pip install "livekit-agents[openai,deepgram,cartesia]"


 Docs and guides

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

 Building with AI coding agents

If you're using an AI coding assistant to build with LiveKit Agents, we recommend the following setup for the best results:

1. Install the LiveKit Docs MCP server — Gives your coding agent access to up-to-date LiveKit documentation, code search across LiveKit repositories, and working examples.

2. Install the LiveKit Agent Skill — Provides your coding agent with architectural guidance and best practices for building voice AI applications, including workflow design, handoffs, tasks, and testing patterns.

   shell
   npx skills add livekit/agent-skills --skill livekit-agents
   

The Agent Skill works best alongside the MCP server: the skill teaches your agent how to approach building with LiveKit, while the MCP server provides the current API details to implement it correctly.

 Core concepts

- Agent: An LLM-based application with defined instructions.
- AgentSession: A container for agents that manages interactions with end users.
- entrypoint: The starting point for an interactive session, similar to a request handler in a web server.
- AgentServer: The main process that coordinates job scheduling and launches agents for user sessions.

 Usage

 Simple voice agent

---

python
from livekit.agents import (
    Agent,
    AgentServer,
    AgentSession,
    JobCon

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON