From 6d68d99a99807f3e00d382c3989e698e0df655a4 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 5 Mar 2026 22:12:49 -0800 Subject: [PATCH 01/12] Replace MCP-first docs with CLI-first approach in AGENTS.md and README.md Lead with LiveKit CLI (`lk docs`) as the primary way to access LiveKit documentation, with MCP server as a secondary option. Include CLI install and update instructions per-platform, version check (2.15.0+), and available commands. Simplify MCP section to just the Streamable HTTP URL. Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 90 +++++++++++++++++++++++++++++++++++++++++++++---------- README.md | 37 +++++++++++++---------- 2 files changed, 96 insertions(+), 31 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index db5fde4..3afaaf0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,41 +14,101 @@ Be sure to maintain code formatting. You can use the prettier formatter and esli ## 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/) includes a `lk docs` subcommand that gives you full access to LiveKit documentation from the terminal. This works with any coding agent that can run shell commands. The `lk docs` subcommand requires CLI version 2.15.0 or higher. -[![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) +Check if the CLI is installed and has the required version: -If you are Claude Code, run this command to install the server: +``` +lk --version +``` + +If the CLI is not installed, install it for the developer's platform: + +**macOS:** ``` -claude mcp add --transport http livekit-docs https://docs.livekit.io/mcp +brew install livekit-cli ``` -If you are Codex, use this command to install the server: +**Linux:** ``` -codex mcp add --url https://docs.livekit.io/mcp livekit-docs +curl -sSL https://get.livekit.io/cli | bash ``` -If you are Gemini, use this command to install the server: +**Windows:** ``` -gemini mcp add --transport http livekit-docs https://docs.livekit.io/mcp +winget install LiveKit.LiveKitCLI ``` -If you are another agentic IDE, refer to your own documentation for how to install it. +If the CLI is installed but the version is below 2.15.0, update it: -## Handoffs ("workflows") +**macOS:** -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 present on requests to the LLM. LiveKit Agents supports handoffs (one agent hands control to another) 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. +``` +brew update && brew upgrade livekit-cli +``` + +**Linux:** + +``` +curl -sSL https://get.livekit.io/cli | bash +``` + +**Windows:** + +``` +winget upgrade LiveKit.LiveKitCLI +``` + +#### Using `lk docs` + +Browse, search, and read LiveKit documentation directly from the terminal: + +``` +# Browse the docs table of contents +lk docs overview + +# Search the documentation +lk docs search "voice agents" + +# Read a specific page +lk docs get-page /agents/start/voice-ai-quickstart + +# Search code across LiveKit repositories +lk docs code-search "class AgentSession" --repo livekit/agents + +# Get recent changelog for a package +lk docs changelog npm:@livekit/agents + +# Submit feedback on docs +lk docs submit-feedback "Missing info about error handling" --page /agents/build/tools +``` + +Run `lk docs --help` to see all available commands, as more may be available than listed here. For detailed reference, see the [CLI docs search](https://docs.livekit.io/intro/basics/cli/docs/) documentation. + +### LiveKit Docs MCP Server + +For deeper IDE integration, LiveKit also offers an [MCP server](https://docs.livekit.io/reference/other/docs-mcp/) that provides the same documentation access. It uses Streamable HTTP transport at the following URL: + +``` +https://docs.livekit.io/mcp +``` + +Refer to your IDE's documentation for how to add a Streamable HTTP MCP server. ### 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. +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 ("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 present on requests to the LLM. LiveKit Agents supports handoffs (one agent hands control to another) 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. ## Testing @@ -62,6 +122,6 @@ The Node.js SDK for LiveKit Agents has most, but not all, of the same features a ## 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 dc5da2d..89f6da7 100644 --- a/README.md +++ b/README.md @@ -18,33 +18,38 @@ 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://www.anthropic.com/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: +**Windows:** -``` -codex mcp add --url https://docs.livekit.io/mcp livekit-docs +```console +winget install LiveKit.LiveKitCLI ``` -For Gemini CLI, use this command to install the server: +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 ``` -gemini mcp add --transport http livekit-docs https://docs.livekit.io/mcp -``` + +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). @@ -65,7 +70,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 @@ -104,7 +109,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 1ab2c2ac399f96a42f047165bf365224951397c1 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 5 Mar 2026 22:26:10 -0800 Subject: [PATCH 02/12] Move lk docs --help recommendation to top of commands list Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3afaaf0..690d6c2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -68,7 +68,7 @@ winget upgrade LiveKit.LiveKitCLI #### Using `lk docs` -Browse, search, and read LiveKit documentation directly from the terminal: +Run `lk docs --help` to see all available commands. Some common examples: ``` # Browse the docs table of contents @@ -90,7 +90,7 @@ lk docs changelog npm:@livekit/agents lk docs submit-feedback "Missing info about error handling" --page /agents/build/tools ``` -Run `lk docs --help` to see all available commands, as more may be available than listed here. For detailed reference, see the [CLI docs search](https://docs.livekit.io/intro/basics/cli/docs/) documentation. +For detailed reference, see the [CLI docs search](https://docs.livekit.io/intro/basics/cli/docs/) documentation. ### LiveKit Docs MCP Server From 32dd221f87fcaaa014decc882a2557b11248512e Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 5 Mar 2026 22:32:58 -0800 Subject: [PATCH 03/12] Condense CLI docs, add usage guidance, fix Claude Code URL - Condense install/update instructions to inline bullet points - Condense command examples to single-line list - Add lk docs --help recommendation before first use - Add prioritization: browse > search > code-search - Fix Claude Code URL to claude.com/product/claude-code Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 84 +++++-------------------------------------------------- README.md | 2 +- 2 files changed, 8 insertions(+), 78 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 690d6c2..6427936 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,89 +18,19 @@ LiveKit Agents is a fast-evolving project, and the documentation is updated freq ### LiveKit CLI -The [LiveKit CLI](https://docs.livekit.io/intro/basics/cli/) includes a `lk docs` subcommand that gives you full access to LiveKit documentation from the terminal. This works with any coding agent that can run shell commands. The `lk docs` subcommand requires CLI version 2.15.0 or higher. +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`. -Check if the CLI is installed and has the required version: +Install or update the CLI: -``` -lk --version -``` +- **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`) -If the CLI is not installed, install it for the developer's platform: - -**macOS:** - -``` -brew install livekit-cli -``` - -**Linux:** - -``` -curl -sSL https://get.livekit.io/cli | bash -``` - -**Windows:** - -``` -winget install LiveKit.LiveKitCLI -``` - -If the CLI is installed but the version is below 2.15.0, update it: - -**macOS:** - -``` -brew update && brew upgrade livekit-cli -``` - -**Linux:** - -``` -curl -sSL https://get.livekit.io/cli | bash -``` - -**Windows:** - -``` -winget upgrade LiveKit.LiveKitCLI -``` - -#### Using `lk docs` - -Run `lk docs --help` to see all available commands. Some common examples: - -``` -# Browse the docs table of contents -lk docs overview - -# Search the documentation -lk docs search "voice agents" - -# Read a specific page -lk docs get-page /agents/start/voice-ai-quickstart - -# Search code across LiveKit repositories -lk docs code-search "class AgentSession" --repo livekit/agents - -# Get recent changelog for a package -lk docs changelog npm:@livekit/agents - -# Submit feedback on docs -lk docs submit-feedback "Missing info about error handling" --page /agents/build/tools -``` - -For detailed reference, see the [CLI docs search](https://docs.livekit.io/intro/basics/cli/docs/) documentation. +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. ### LiveKit Docs MCP Server -For deeper IDE integration, LiveKit also offers an [MCP server](https://docs.livekit.io/reference/other/docs-mcp/) that provides the same documentation access. It uses Streamable HTTP transport at the following URL: - -``` -https://docs.livekit.io/mcp -``` - -Refer to your IDE's documentation for how to add a Streamable HTTP MCP server. +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. ### Submit docs feedback to LiveKit diff --git a/README.md b/README.md index 89f6da7..a7c21f5 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This starter app is compatible with any [custom web/mobile frontend](https://doc ## Using coding agents -This project is designed to work with coding agents like [Claude Code](https://www.anthropic.com/claude-code), [Cursor](https://www.cursor.com/), and [Codex](https://openai.com/codex/). +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/). 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: From 66f1c551d99eef14d990b7443f413d236c04be5f Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 5 Mar 2026 22:41:14 -0800 Subject: [PATCH 04/12] Trim redundant CLI section at bottom of AGENTS.md 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 6427936..de3d956 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,6 +52,4 @@ The Node.js SDK for LiveKit Agents has most, but not all, of the same features a ## 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. From 21551532865b4e36f9b442890b59d26abdc9d0cc Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 22:32:41 -0700 Subject: [PATCH 05/12] Update MCP server docs URL to new path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /reference/other/docs-mcp/ → /reference/developer-tools/docs-mcp/ per livekit/web#3409 Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index de3d956..25c7ed7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -30,7 +30,7 @@ Run `lk docs --help` to see all available commands. Key commands: `lk docs overv ### LiveKit Docs MCP Server -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. +For deeper IDE integration, LiveKit also offers an [MCP server](https://docs.livekit.io/reference/developer-tools/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. ### Submit docs feedback to LiveKit diff --git a/README.md b/README.md index a7c21f5..e2b27b8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This starter app is compatible with any [custom web/mobile frontend](https://doc 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/). -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 your convenience, LiveKit offers both a CLI and an [MCP server](https://docs.livekit.io/reference/developer-tools/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: **macOS:** From cf5c7ede0c07e480201bdcb3cc408b26dbb3c630 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 22:42:33 -0700 Subject: [PATCH 06/12] Update frontend and telephony docs URLs to new top-level paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /agents/start/frontend/ → /frontends/ /agents/start/telephony/ → /telephony/ Co-Authored-By: Claude Opus 4.6 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e2b27b8..7e9c6f9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The starter project includes: - Integrated [metrics and logging](https://docs.livekit.io/agents/build/metrics/) - A Dockerfile ready for [production deployment](https://docs.livekit.io/agents/ops/deployment/) -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/). +This starter app is compatible with any [custom web/mobile frontend](https://docs.livekit.io/frontends/) or [SIP-based telephony](https://docs.livekit.io/telephony/). ## Using coding agents @@ -109,9 +109,9 @@ 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/telephony/) | Add inbound or outbound calling to your agent | -For advanced customization, see the [complete frontend guide](https://docs.livekit.io/agents/start/frontend/). +For advanced customization, see the [complete frontend guide](https://docs.livekit.io/frontends/). ## Using this template repo for your own project From f6ce71f5e9f7e812f5cf2bd03e0f681cf1675cfb Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 22:44:46 -0700 Subject: [PATCH 07/12] update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e9c6f9..7fad250 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,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/intro/basics/cli/start/): +You can load the LiveKit environment automatically using the [LiveKit CLI](https://docs.livekit.io/intro/basics/cli/): ```bash lk cloud auth From 61cce4460919a11883e4321e76d6068dd0b04f6d Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 22:53:17 -0700 Subject: [PATCH 08/12] updates --- README.md | 20 ++++++++++---------- src/main.ts | 16 ---------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 7fad250..20416a2 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,14 @@ A complete starter project for building voice AI apps with [LiveKit Agents for N 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 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) -- [LiveKit Turn Detector](https://docs.livekit.io/agents/build/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support -- [Background voice cancellation](https://docs.livekit.io/home/cloud/noise-cancellation/) -- Integrated [metrics and logging](https://docs.livekit.io/agents/build/metrics/) -- A Dockerfile ready for [production deployment](https://docs.livekit.io/agents/ops/deployment/) +- A voice AI pipeline built on [LiveKit Inference](https://docs.livekit.io/agents/models/inference) + with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and Deepgram. More than 50 other model providers are supported, including [Realtime models](https://docs.livekit.io/agents/models/realtime) +- [LiveKit Turn Detector](https://docs.livekit.io/agents/logic/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support +- [Background voice cancellation](https://docs.livekit.io/transport/media/noise-cancellation/) +- Deep ession insights from LiveKit [Agent Observability](https://docs.livekit.io/deploy/observability/) +- A Dockerfile ready for [production deployment to LiveKit Cloud](https://docs.livekit.io/deploy/agents/) -This starter app is compatible with any [custom web/mobile frontend](https://docs.livekit.io/frontends/) or [SIP-based telephony](https://docs.livekit.io/telephony/). +This starter app is compatible with any [custom web/mobile frontend](https://docs.livekit.io/frontends/) or [telephony](https://docs.livekit.io/telephony/). ## Using coding agents @@ -79,7 +79,7 @@ lk app env -w -d .env.local ## Run the agent -Before your first run, you must download certain models such as [Silero VAD](https://docs.livekit.io/agents/build/turns/vad/) and the [LiveKit turn detector](https://docs.livekit.io/agents/build/turns/turn-detector/): +Before your first run, you must download certain models such as [Silero VAD](https://docs.livekit.io/agents/logic/turns/vad/) and the [LiveKit turn detector](https://docs.livekit.io/agents/logic/turns/turn-detector/): ```console pnpm run download-files @@ -123,11 +123,11 @@ Once you've started your own project based on this repo, you should: ## Deploying to production -This project is production-ready and includes a working `Dockerfile`. To deploy it to LiveKit Cloud or another environment, see the [deploying to production](https://docs.livekit.io/agents/ops/deployment/) guide. +This project is production-ready and includes a working `Dockerfile`. To deploy it to LiveKit Cloud or another environment, see the [deploying to production](https://docs.livekit.io/deploy/agents/) guide. ## Self-hosted LiveKit -You can also self-host LiveKit instead of using LiveKit Cloud. See the [self-hosting](https://docs.livekit.io/home/self-hosting/) guide for more information. If you choose to self-host, you'll need to also use [model plugins](https://docs.livekit.io/agents/models/#plugins) instead of LiveKit Inference and will need to remove the [LiveKit Cloud noise cancellation](https://docs.livekit.io/home/cloud/noise-cancellation/) plugin. +You can also self-host LiveKit instead of using LiveKit Cloud. See the [self-hosting](https://docs.livekit.io/transport/self-hosting/local/) guide for more information. If you choose to self-host, you'll need to also use [model plugins](https://docs.livekit.io/agents/models/#plugins) instead of LiveKit Inference and will need to remove the [LiveKit Cloud noise cancellation](https://docs.livekit.io/transport/media/noise-cancellation/) plugin. ## License diff --git a/src/main.ts b/src/main.ts index bffc964..c7462ef 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,7 +5,6 @@ import { cli, defineAgent, inference, - metrics, voice, } from '@livekit/agents'; import * as livekit from '@livekit/agents-plugin-livekit'; @@ -67,21 +66,6 @@ export default defineAgent({ // llm: new openai.realtime.RealtimeModel({ voice: 'marin' }), // }); - // Metrics collection, to measure pipeline performance - // For more information, see https://docs.livekit.io/agents/build/metrics/ - const usageCollector = new metrics.UsageCollector(); - session.on(voice.AgentSessionEventTypes.MetricsCollected, (ev) => { - metrics.logMetrics(ev.metrics); - usageCollector.collect(ev.metrics); - }); - - const logUsage = async () => { - const summary = usageCollector.getSummary(); - console.log(`Usage: ${JSON.stringify(summary)}`); - }; - - ctx.addShutdownCallback(logUsage); - // Start the session, which initializes the voice pipeline and warms up the models await session.start({ agent: new Agent(), From a9d17d543e1bb9212d6846bed6721dd2f59f947b Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 22:53:33 -0700 Subject: [PATCH 09/12] u --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 25c7ed7..b2f6801 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -42,7 +42,7 @@ Voice AI agents are highly sensitive to excessive latency. For this reason, it's ## Testing -When possible, add tests for agent behavior. Read the [documentation](https://docs.livekit.io/agents/build/testing/), and refer to existing test files with the `.test.ts` extension. Run tests with `pnpm test`. +When possible, add tests for agent behavior. Read the [documentation](https://docs.livekit.io/agents/start/testing/), and refer to existing test files with the `.test.ts` extension. Run tests with `pnpm test`. Important: When modifying core agent behavior such as instructions, tool descriptions, and tasks/workflows/handoffs, never just guess what will work. Always use test-driven development (TDD) and begin by writing tests for the desired behavior. For instance, if you're planning to add a new tool, write one or more tests for the tool's behavior, then iterate on the tool until the tests pass correctly. This will ensure you are able to produce a working, reliable agent for the user. From 02c89fa5bc2555b7f7d04bfa6d7418ec344cdc70 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 22:59:25 -0700 Subject: [PATCH 10/12] update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 20416a2..98cdf62 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ The starter project includes: - A simple voice AI assistant, ready for extension and customization - A voice AI pipeline built on [LiveKit Inference](https://docs.livekit.io/agents/models/inference) with [models](https://docs.livekit.io/agents/models) from OpenAI, Cartesia, and Deepgram. More than 50 other model providers are supported, including [Realtime models](https://docs.livekit.io/agents/models/realtime) +- Eval suite based on the LiveKit Agents [testing & evaluation framework](https://docs.livekit.io/agents/start/testing) - [LiveKit Turn Detector](https://docs.livekit.io/agents/logic/turns/turn-detector/) for contextually-aware speaker detection, with multilingual support - [Background voice cancellation](https://docs.livekit.io/transport/media/noise-cancellation/) - Deep ession insights from LiveKit [Agent Observability](https://docs.livekit.io/deploy/observability/) From 6b093247a524b5e41cdbc18b200ec82a46347fcb Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 23:05:24 -0700 Subject: [PATCH 11/12] fmt --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98cdf62..0fba9f2 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,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/telephony/) | Add inbound or outbound calling to your agent | +| **Telephony** | [Documentation](https://docs.livekit.io/telephony/) | Add inbound or outbound calling to your agent | For advanced customization, see the [complete frontend guide](https://docs.livekit.io/frontends/). From 4b3e9145f41f95e9029e9038c4380b739e3f2976 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Tue, 10 Mar 2026 23:19:35 -0700 Subject: [PATCH 12/12] Fix coding agents guide link title to match docs Co-Authored-By: Claude Opus 4.6 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fba9f2..52102aa 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ lk docs search "voice agents" lk docs get-page /agents/start/voice-ai-quickstart ``` -See the [Using coding agents](https://docs.livekit.io/intro/coding-agents/) guide for more details, including MCP server setup. +See the [Coding agent support](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).