From fba3ed2ecccd7e43ec5c39d275e87f3c7106aa22 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Mon, 2 Feb 2026 15:58:00 -0800 Subject: [PATCH 1/4] Use deepgram --- README.md | 2 +- src/agent.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 01e9562..acffaa9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A complete starter project for building voice AI apps with [LiveKit Agents for P The starter project includes: - A simple voice AI assistant, ready for extension and customization -- A voice AI pipeline with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and AssemblyAI served through LiveKit Cloud +- A voice AI pipeline with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and Deepgram served through LiveKit Cloud - Easily integrate your preferred [LLM](https://docs.livekit.io/agents/models/llm/), [STT](https://docs.livekit.io/agents/models/stt/), and [TTS](https://docs.livekit.io/agents/models/tts/) instead, or swap to a realtime model like the [OpenAI Realtime API](https://docs.livekit.io/agents/models/realtime/openai) - Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/build/testing/) - [LiveKit Turn Detector](https://docs.livekit.io/agents/build/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support diff --git a/src/agent.py b/src/agent.py index aab4ded..b386d49 100644 --- a/src/agent.py +++ b/src/agent.py @@ -65,11 +65,11 @@ async def my_agent(ctx: JobContext): "room": ctx.room.name, } - # Set up a voice AI pipeline using OpenAI, Cartesia, AssemblyAI, and the LiveKit turn detector + # Set up a voice AI pipeline using OpenAI, Cartesia, Deepgram, and the LiveKit turn detector session = AgentSession( # Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand # See all available models at https://docs.livekit.io/agents/models/stt/ - stt=inference.STT(model="assemblyai/universal-streaming", language="en"), + stt=inference.STT(model="deepgram/flux-general", language="en"), # A Large Language Model (LLM) is your agent's brain, processing user input and generating a response # See all available models at https://docs.livekit.io/agents/models/llm/ llm=inference.LLM(model="openai/gpt-4.1-mini"), From 66c79a613ce45760769b37cbc2c15f2874188b5b Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 3 Feb 2026 15:55:03 -0800 Subject: [PATCH 2/4] Switch Deepgram STT to nova-3 multi --- src/agent.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/agent.py b/src/agent.py index b386d49..4554073 100644 --- a/src/agent.py +++ b/src/agent.py @@ -69,7 +69,7 @@ async def my_agent(ctx: JobContext): session = AgentSession( # Speech-to-text (STT) is your agent's ears, turning the user's speech into text that the LLM can understand # See all available models at https://docs.livekit.io/agents/models/stt/ - stt=inference.STT(model="deepgram/flux-general", language="en"), + stt=inference.STT(model="deepgram/nova-3", language="multi"), # A Large Language Model (LLM) is your agent's brain, processing user input and generating a response # See all available models at https://docs.livekit.io/agents/models/llm/ llm=inference.LLM(model="openai/gpt-4.1-mini"), @@ -111,9 +111,12 @@ async def my_agent(ctx: JobContext): room=ctx.room, room_options=room_io.RoomOptions( audio_input=room_io.AudioInputOptions( - noise_cancellation=lambda params: noise_cancellation.BVCTelephony() - if params.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP - else noise_cancellation.BVC(), + noise_cancellation=lambda params: ( + noise_cancellation.BVCTelephony() + if params.participant.kind + == rtc.ParticipantKind.PARTICIPANT_KIND_SIP + else noise_cancellation.BVC() + ), ), ), ) From eccc77c1a367ee48c13b0d94946f820194a9ec51 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 5 Mar 2026 22:34:53 -0800 Subject: [PATCH 3/4] Replace MCP server recommendations with LiveKit CLI Rewrite AGENTS.md and README.md to lead with the LiveKit CLI (`lk docs`) as the primary way to give coding agents LiveKit documentation access. The MCP server is retained as a secondary option for deeper IDE integration. Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 35 +++++++++++++---------------------- README.md | 41 ++++++++++++++++++++++++----------------- 2 files changed, 37 insertions(+), 39 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 49128ab..71ed84e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,41 +14,32 @@ Be sure to maintain code formatting. You can use the ruff formatter/linter as ne ## LiveKit Documentation -LiveKit Agents is a fast-evolving project, and the documentation is updated frequently. You should always refer to the latest documentation when working with this project. For your convenience, LiveKit offers an MCP server that can be used to browse and search its documentation. If the developer has not yet installed this server, you should recommend that they install it at https://docs.livekit.io/mcp. +LiveKit Agents is a fast-evolving project, and the documentation is updated frequently. You should always refer to the latest documentation when working with this project. For your convenience, LiveKit offers both a CLI and an MCP server that can be used to browse and search its documentation. If the developer has not yet installed the CLI, you should recommend that they install it. -### LiveKit Docs MCP Server installation +### LiveKit CLI -If you are Cursor, give the user this link to install the server: +The [LiveKit CLI](https://docs.livekit.io/intro/basics/cli/) `lk docs` subcommand gives full access to LiveKit documentation from the terminal. Requires CLI version 2.15.0+. Check with `lk --version`. -[![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en-US/install-mcp?name=livekit-docs&config=eyJ1cmwiOiJodHRwczovL2RvY3MubGl2ZWtpdC5pby9tY3AifQ%3D%3D) +Install or update the CLI: -If you are Claude Code, run this command to install the server: +- **macOS:** `brew install livekit-cli` (update: `brew update && brew upgrade livekit-cli`) +- **Linux:** `curl -sSL https://get.livekit.io/cli | bash` +- **Windows:** `winget install LiveKit.LiveKitCLI` (update: `winget upgrade LiveKit.LiveKitCLI`) -``` -claude mcp add --transport http livekit-docs https://docs.livekit.io/mcp -``` +Run `lk docs --help` to see all available commands. Key commands: `lk docs overview`, `lk docs search`, `lk docs get-page`, `lk docs code-search`, `lk docs changelog`, `lk docs submit-feedback`. Run `lk docs --help` before using a command for the first time, as the help text includes advice on usage and interpreting results. Prefer browsing (`overview`, `get-page`) over search, and prefer `search` over `code-search`, as docs pages are more up-to-date and provide better context than raw code. -If you are Codex, use this command to install the server: +### LiveKit Docs MCP Server -``` -codex mcp add --url https://docs.livekit.io/mcp livekit-docs -``` +For deeper IDE integration, LiveKit also offers an [MCP server](https://docs.livekit.io/reference/other/docs-mcp/) with the same documentation access. It uses Streamable HTTP transport at `https://docs.livekit.io/mcp`. Refer to your IDE's documentation for how to add it. -If you are Gemini, use this command to install the server: -``` -gemini mcp add --transport http livekit-docs https://docs.livekit.io/mcp -``` +### Submit docs feedback to LiveKit -If you are another agentic IDE, refer to your own documentation for how to install it. +If you use the LiveKit CLI or MCP Server to search or browse documentation, also submit constructive feedback to LiveKit with `lk docs submit-feedback` or the MCP `submit_docs_feedback` tool. Add this to your to-do list when planning work, to ensure you file feedback after completing your other tasks. Useful feedback includes incomplete documentation, broken examples, missing steps or any other documentation gap or issue. ## Handoffs and tasks ("workflows") Voice AI agents are highly sensitive to excessive latency. For this reason, it's important to design complex agents in a structured manner that minimizes the amount of irrelevant context and unnecessary tools included in requests to the LLM. LiveKit Agents supports handoffs (one agent hands control to another) and tasks (tightly-scoped prompts to achieve a specific outcome) to support building reliable workflows. You should make use of these features, instead of writing long instruction prompts that cover multiple phases of a conversation. Refer to the [documentation](https://docs.livekit.io/agents/build/workflows/) for more information. -### Submit docs feedback to LiveKit - -If you use the LiveKit Docs MCP Server to search or browse documentation, also submit constructive feedback to LiveKit with the submit_docs_feedback tool. Add this to your to-do list when planning work, to ensure you file feedback after completing your other tasks. Useful feedback includes incomplete documentation, broken examples, missing steps or any other documentation gap or issue. - ## Testing When possible, add tests for agent behavior. Read the [documentation](https://docs.livekit.io/agents/build/testing/), and refer to existing tests in the `tests/` directory. Run tests with `uv run pytest`. @@ -57,6 +48,6 @@ Important: When modifying core agent behavior such as instructions, tool descrip ## LiveKit CLI -You can make use of the LiveKit CLI (`lk`) for various tasks, with user approval. Installation instructions are available at https://docs.livekit.io/home/cli if needed. +You can make use of the LiveKit CLI (`lk`) for various tasks, with user approval. Installation instructions are available at https://docs.livekit.io/intro/basics/cli/start/ if needed. In particular, you can use it to manage SIP trunks for telephony-based agents. Refer to `lk sip --help` for more information. diff --git a/README.md b/README.md index acffaa9..cc63e10 100644 --- a/README.md +++ b/README.md @@ -19,33 +19,40 @@ The starter project includes: This starter app is compatible with any [custom web/mobile frontend](https://docs.livekit.io/agents/start/frontend/) or [SIP-based telephony](https://docs.livekit.io/agents/start/telephony/). -## Coding agents and MCP +## Using coding agents -This project is designed to work with coding agents like [Cursor](https://www.cursor.com/) and [Claude Code](https://www.anthropic.com/claude-code). +This project is designed to work with coding agents like [Claude Code](https://claude.com/product/claude-code), [Cursor](https://www.cursor.com/), and [Codex](https://openai.com/codex/). -To get the most out of these tools, install the [LiveKit Docs MCP server](https://docs.livekit.io/mcp). +For your convenience, LiveKit offers both a CLI and an [MCP server](https://docs.livekit.io/reference/other/docs-mcp/) that can be used to browse and search its documentation. The [LiveKit CLI](https://docs.livekit.io/intro/basics/cli/) (`lk docs`) works with any coding agent that can run shell commands. Install it for your platform: -For Cursor, use this link: +**macOS:** -[![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en-US/install-mcp?name=livekit-docs&config=eyJ1cmwiOiJodHRwczovL2RvY3MubGl2ZWtpdC5pby9tY3AifQ%3D%3D) +```console +brew install livekit-cli +``` -For Claude Code, run this command: +**Linux:** -``` -claude mcp add --transport http livekit-docs https://docs.livekit.io/mcp +```console +curl -sSL https://get.livekit.io/cli | bash ``` -For Codex CLI, use this command to install the server: -``` -codex mcp add --url https://docs.livekit.io/mcp livekit-docs -``` +**Windows:** -For Gemini CLI, use this command to install the server: +```console +winget install LiveKit.LiveKitCLI ``` -gemini mcp add --transport http livekit-docs https://docs.livekit.io/mcp + +The `lk docs` subcommand requires version 2.15.0 or higher. Check your version with `lk --version` and update if needed. Once installed, your coding agent can search and browse LiveKit documentation directly from the terminal: + +```console +lk docs search "voice agents" +lk docs get-page /agents/start/voice-ai-quickstart ``` -The project includes a complete [AGENTS.md](AGENTS.md) file for these assistants. You can modify this file your needs. To learn more about this file, see [https://agents.md](https://agents.md). +See the [Using coding agents](https://docs.livekit.io/intro/coding-agents/) guide for more details, including MCP server setup. + +The project includes a complete [AGENTS.md](AGENTS.md) file for these assistants. You can modify this file to suit your needs. To learn more about this file, see [https://agents.md](https://agents.md). ## Dev Setup @@ -62,7 +69,7 @@ Sign up for [LiveKit Cloud](https://cloud.livekit.io/) then set up the environme - `LIVEKIT_API_KEY` - `LIVEKIT_API_SECRET` -You can load the LiveKit environment automatically using the [LiveKit CLI](https://docs.livekit.io/home/cli/cli-setup): +You can load the LiveKit environment automatically using the [LiveKit CLI](https://docs.livekit.io/intro/basics/cli/start/): ```bash lk cloud auth @@ -107,7 +114,7 @@ Get started quickly with our pre-built frontend starter apps, or add telephony s | **React Native** | [`livekit-examples/voice-assistant-react-native`](https://github.com/livekit-examples/voice-assistant-react-native) | Native mobile app with React Native & Expo | | **Android** | [`livekit-examples/agent-starter-android`](https://github.com/livekit-examples/agent-starter-android) | Native Android app with Kotlin & Jetpack Compose | | **Web Embed** | [`livekit-examples/agent-starter-embed`](https://github.com/livekit-examples/agent-starter-embed) | Voice AI widget for any website | -| **Telephony** | [📚 Documentation](https://docs.livekit.io/agents/start/telephony/) | Add inbound or outbound calling to your agent | +| **Telephony** | [Documentation](https://docs.livekit.io/agents/start/telephony/) | Add inbound or outbound calling to your agent | For advanced customization, see the [complete frontend guide](https://docs.livekit.io/agents/start/frontend/). From 2fb95c125c723a9a4772780a7d38f3ef646f2d60 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 5 Mar 2026 22:42:49 -0800 Subject: [PATCH 4/4] Consolidate bottom CLI section to match node starter Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 71ed84e..ec1899e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -48,6 +48,4 @@ Important: When modifying core agent behavior such as instructions, tool descrip ## LiveKit CLI -You can make use of the LiveKit CLI (`lk`) for various tasks, with user approval. Installation instructions are available at https://docs.livekit.io/intro/basics/cli/start/ if needed. - -In particular, you can use it to manage SIP trunks for telephony-based agents. Refer to `lk sip --help` for more information. +Beyond documentation access, the LiveKit CLI (`lk`) supports other tasks such as managing SIP trunks for telephony-based agents. Run `lk --help` to explore available commands.