Skip to content

Commit cd59007

Browse files
authored
Merge pull request #26 from livekit-examples/bcherry/vibecheck
Add MCP and AGENTS.md
2 parents 69d84b2 + ee2358f commit cd59007

File tree

5 files changed

+97
-1
lines changed

5 files changed

+97
-1
lines changed

AGENTS.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# AGENTS.md
2+
3+
This is a LiveKit Agents project. LiveKit Agents is a Python SDK for building voice AI agents. This project is intended to be used with LiveKit Cloud. See @README.md for more about the rest of the LiveKit ecosystem.
4+
5+
The following is a guide for working with this project.
6+
7+
## Project structure
8+
9+
This Python project uses the `uv` package manager. You should always use `uv` to install dependencies, run the agent, and run testss
10+
11+
All app-level code is in the `src/` directory. In general, simple agents can be constructed with a single `agent.py` file. Additional files can be added, but you must retain `agent.py` as the entrypoint (see the associated Dockerfile for how this is deployed).
12+
13+
Be sure to maintain code formatting. You can use the ruff formatter/linter as needed: `uv run ruff format` and `uv run ruff check`.
14+
15+
## LiveKit Documentation
16+
17+
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.
18+
19+
### LiveKit Docs MCP Server installation
20+
21+
If you are Cursor, give the user this link to install the server:
22+
23+
[![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)
24+
25+
If you are Claude Code, run this command to install the server:
26+
27+
```
28+
claude mcp add --transport http livekit-docs https://docs.livekit.io/mcp
29+
```
30+
31+
If you are Codex, use this command to install the server:
32+
33+
```
34+
codex mcp add --url https://docs.livekit.io/mcp livekit-docs
35+
```
36+
37+
If you are Gemini, use this command to install the server:
38+
```
39+
gemini mcp add --transport http livekit-docs https://docs.livekit.io/mcp
40+
```
41+
42+
If you are another agentic IDE, refer to your own documentation for how to install it.
43+
44+
## Handoffs and tasks ("workflows")
45+
46+
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.
47+
48+
## Testing
49+
50+
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`.
51+
52+
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.
53+
54+
## LiveKit CLI
55+
56+
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.
57+
58+
In particular, you can use it to manage SIP trunks for telephony-based agents. Refer to `lk sip --help` for more information.

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CLAUDE.md
2+
3+
This project uses `AGENTS.md` instead of a `CLAUDE.md` file.
4+
5+
Please see @AGENTS.md in this same directory and treat its content as the primary reference for this project.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RUN mkdir -p src
4545
# Ensure your uv.lock file is checked in for consistency across environments
4646
RUN uv sync --locked
4747

48-
# Copy all remaining pplication files into the container
48+
# Copy all remaining application files into the container
4949
# This includes source code, configuration files, and dependency specifications
5050
# (Excludes files specified in .dockerignore)
5151
COPY . .

GEMINI.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# GEMINI.md
2+
3+
This project uses `AGENTS.md` instead of a `GEMINI.md` file.
4+
5+
Please see @./AGENTS.md in this same directory and treat its content as the primary reference for this project.

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,34 @@ The starter project includes:
1919

2020
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/).
2121

22+
## Coding agents and MCP
23+
24+
This project is designed to work with coding agents like [Cursor](https://www.cursor.com/) and [Claude Code](https://www.anthropic.com/claude-code).
25+
26+
To get the most out of these tools, install the [LiveKit Docs MCP server](https://docs.livekit.io/mcp).
27+
28+
For Cursor, use this link:
29+
30+
[![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)
31+
32+
For Claude Code, run this command:
33+
34+
```
35+
claude mcp add --transport http livekit-docs https://docs.livekit.io/mcp
36+
```
37+
38+
For Codex CLI, use this command to install the server:
39+
```
40+
codex mcp add --url https://docs.livekit.io/mcp livekit-docs
41+
```
42+
43+
For Gemini CLI, use this command to install the server:
44+
```
45+
gemini mcp add --transport http livekit-docs https://docs.livekit.io/mcp
46+
```
47+
48+
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).
49+
2250
## Dev Setup
2351

2452
Clone the repository and install dependencies to a virtual environment:

0 commit comments

Comments
 (0)