Skip to content

Commit 978304d

Browse files
authored
Merge pull request #13 from livekit-examples/bcherry/agents-md
Add MCP and AGENTS.md
2 parents 33da670 + 47f2bc3 commit 978304d

File tree

6 files changed

+110
-13
lines changed

6 files changed

+110
-13
lines changed

AGENTS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# AGENTS.md
2+
3+
This is a LiveKit Agents project. LiveKit Agents is a Node.js 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 Node.js project uses the `pnpm` package manager. You should always use `pnpm` to install dependencies, run the agent, and run tests.
10+
11+
All app-level code is in the `src/` directory. In general, simple agents can be constructed with a single `agent.ts` file. Additional files can be added, but you must retain `agent.ts` as the entrypoint (see the associated Dockerfile for how this is deployed).
12+
13+
Be sure to maintain code formatting. You can use the prettier formatter and eslint to format and lint the code. Scripts are available in `package.json`, including `pnpm format` and `pnpm lint`.
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+
```
40+
gemini mcp add --transport http livekit-docs https://docs.livekit.io/mcp
41+
```
42+
43+
If you are another agentic IDE, refer to your own documentation for how to install it.
44+
45+
## Handoffs ("workflows")
46+
47+
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.
48+
49+
## Feature parity with Python SDK
50+
51+
The Node.js SDK for LiveKit Agents has most, but not all, of the same features available in Python SDK for LiveKit Agents. You should always check the documentation for feature availability, and avoid using features that are not available in the Node.js SDK.
52+
53+
## LiveKit CLI
54+
55+
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.
56+
57+
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
@@ -30,7 +30,7 @@ COPY package.json pnpm-lock.yaml ./
3030
# --frozen-lockfile ensures we use exact versions from pnpm-lock.yaml for reproducible builds
3131
RUN pnpm install --frozen-lockfile
3232

33-
# Copy all remaining pplication files into the container
33+
# Copy all remaining application files into the container
3434
# This includes source code, configuration files, and dependency specifications
3535
# (Excludes files specified in .dockerignore)
3636
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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,36 @@ The starter project includes:
1818

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

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

2353
This project uses [pnpm](https://pnpm.io/) as the package manager.

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@
2222
"pnpm": ">=10.0.0"
2323
},
2424
"devDependencies": {
25-
"@eslint/js": "^9.34.0",
25+
"@eslint/js": "^9.38.0",
2626
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
27-
"@types/node": "^22.18.0",
28-
"eslint": "^9.34.0",
29-
"globals": "^16.3.0",
30-
"jiti": "^2.5.1",
31-
"tsx": "^4.20.5",
32-
"typescript": "^5.9.2",
33-
"typescript-eslint": "^8.41.0"
27+
"@types/node": "^22.18.11",
28+
"eslint": "^9.38.0",
29+
"globals": "^16.4.0",
30+
"jiti": "^2.6.1",
31+
"tsx": "^4.20.6",
32+
"typescript": "^5.9.3",
33+
"typescript-eslint": "^8.46.2"
3434
},
3535
"dependencies": {
36-
"@livekit/agents": "^1.0.10",
37-
"@livekit/agents-plugin-livekit": "^1.0.10",
38-
"@livekit/agents-plugin-silero": "^1.0.10",
36+
"@livekit/agents": "^1.0.11",
37+
"@livekit/agents-plugin-livekit": "^1.0.11",
38+
"@livekit/agents-plugin-silero": "^1.0.11",
3939
"@livekit/noise-cancellation-node": "^0.1.9",
40-
"dotenv": "^17.2.1",
40+
"dotenv": "^17.2.3",
4141
"zod": "^3.25.76"
4242
}
4343
}

0 commit comments

Comments
 (0)