Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

agents

> AI 编程
Open source

A framework for building realtime voice AI agents ️

11.6K stars0 likes3 views
WebsiteGitHub

About

A framework for building realtime voice AI agents ️



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.

    bash
    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


…

You'll need the following environment variables for this example:

  • LIVEKIT_URL
  • LIVEKIT_API_KEY
  • LIVEKIT_API_SECRET

Multi-agent handoff


This code snippet is abbreviated. For the full example, see the LiveKit docs

…

Testing

Automated tests are essential for building reliable agents, especially with the non-deterministic behavior of LLMs. LiveKit Agents include native test integration to help you create dependable agents.

…

Examples

For more examples and detailed setup instructions, see the examples directory. For even more examples, see the python-agents-examples repository.

️ Starter Agent

A starter agent optimized for voice conversations.

Code

☎️ Outbound caller

Agent that makes outbound phone calls

Code

MCP support

Use tools from MCP servers

Code

Multi-user transcriber

Produce transcriptions from all users in the room

Code

Video avatars

Add an AI avatar with Tavus, Bithuman, LemonSlice, and more

Code

️ Gemini Live vision

Full example (including iOS app) of Gemini Live agent that can see.

Code

Running your agent

Testing in terminal

bash
python myagent.py console

Runs your agent in terminal mode, enabling local audio input and output for testing. This mode doesn't require external servers or dependencies and is useful for quickly validating behavior.

Developing with LiveKit clients

bash
python myagent.py dev

Starts the agent server and enables hot reloading when files change. This mode allows each process to host multiple concurrent agents efficiently.

The agent connects to LiveKit Cloud or your self-hosted server. Set the following environment variables:

  • LIVEKIT_URL
  • LIVEKIT_API_KEY
  • LIVEKIT_API_SECRET

You can connect using any LiveKit client SDK or telephony integration. To get started quickly, try the Agents Playground.

Running for production

bash
python myagent.py start

Runs the agent with production-ready optimizations.

License

The Agents framework is licensed under Apache-2.0. The LiveKit turn detection models are licensed under the LiveKit Model License.

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 the LiveKit community.

Development setup

This project uses uv for package management. To install dependencies for development:

bash
uv sync --all-extras --dev

Examples

This project includes many examples in the examples directory. To run them, create the file examples/.env with credentials for LiveKit Server and any necessary model providers (see examples/.env.example), then run:

bash
uv run examples/voice_agents/basic_agent.py dev

For more information, see the examples README.

Tests

Unit tests are in the tests directory and can be run with:

bash
uv run pytest --unit

Integration tests for each plugin require various API credentials and run automatically in GitHub CI for PRs submitted by project maintainers. See the tests workflow for details.

Formatting

This project uses ruff for formatting and linting:

bash
uv run ruff format
uv run ruff check --fix

Documentation

To generate docs locally with pdoc:

bash
uv sync --all-extras --group docs
uv run --active pdoc --skip-errors --html --output-dir=docs livekit


LiveKit Ecosystem
Agents SDKsPython · Node.js
LiveKit SDKsBrowser · Swift · Android · Flutter · React Native · Rust · Node.js · Python · Unity · Unity (WebGL) · ESP32 · C++
Starter AppsPython Agent · TypeScript Agent · React App · SwiftUI App · Android App · Flutter App · React Native App · Web Embed
UI ComponentsReact · Android Compose · SwiftUI · Flutter
Server APIsNode.js · Golang · Ruby · Java/Kotlin · Python · Rust · PHP (community) · .NET (community)
ResourcesDocs · Docs MCP Server · CLI · LiveKit Cloud
LiveKit Server OSSLiveKit server · Egress · Ingress · SIP
CommunityDeveloper Community · Slack · X · YouTube

Issues· 907 open

View all issuesOpen on GitHub
  • #5420

    Dependency Dashboard

    Updated Sep 28, 2026
  • #7514

    Opt-in serialization of response.create to prevent conversation_already_has_active_response (follow-up to the fast-fail)

    enhancementUpdated Sep 28, 2026
  • #7517

    `commit_user_turn` waits the full `transcript_timeout` after STT already finalized (manual turns)

    bugUpdated Sep 28, 2026
  • #7481

    google realtime: hardcoded 5s generate_reply timeout fires on realistic prompts, raising RealtimeError for turns that succeed

    Updated Sep 28, 2026
  • #7513

    RoomIO: no jitter prebuffer for duplex models (GPT-Live) – audio breaks mid-word on calls

    bugUpdated Sep 28, 2026
  • #7508

    Sentence tokenizers don't split on ؟ ۔ । ॥, so TTS for Arabic, Urdu, Hindi and Bengali starts late

    Updated Sep 28, 2026
  • #7506

    Preemptive generation is discarded when the final transcript only adds Arabic, CJK or Devanagari punctuation

    Updated Sep 28, 2026
  • #7291

    GPTLiveModel: image input and backend-turn typed input parity with RealtimeModel

    Updated Sep 26, 2026
  • #7499

    bithuman: 4xx errors are retried and the provider's status is replaced by a generic error

    Updated Sep 26, 2026
  • #7497

    simli: start() crashes with UnboundLocalError when the second request fails, and never retries

    Updated Sep 26, 2026

> Tags

Pythonagentsaiopenaireal-time

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.