Skip to content

Commit 3a644eb

Browse files
bcherryclaudeu9g
authored
Trim the README and AGENTS.md, and cover skills and debugging (#105)
* Use `lk agent` for console, dev, and start The Python CLI's dev mode is deprecated and its in-process auto-reload has been removed, so `lk agent dev` is now the only way to get hot reload. Point the README, the taskfile help output, and the `dev` task at the LiveKit CLI for all three local modes, and move the CLI install instructions into Dev Setup so they come before the first command that needs them. The Dockerfile still starts the deployed agent with `uv run src/agent.py start`, since the container image doesn't include `lk`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv * Describe what dev mode adds, not just reload Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv * Trim the README and AGENTS.md, and apply the docs style guide Mirrors the Node starter's review round: drop guidance a coding agent can work out on its own, show the direct `uv run src/agent.py start` for production since that's what the Dockerfile runs, and collapse the CLI install block into a three-line list with a link to update instructions. Also a copy pass against the docs style guide: sentence-case headings, no "we", no hyphens standing in for dashes, bulleted rather than numbered non-sequential lists, and less filler throughout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv * Sell outcomes in the feature list, and cover skills and debugging The README feature list now says what each piece does for you and links the docs for how: Fish Audio as an expressive, cost-effective default, expressive mode, and adaptive interruption handling, which the starter enables but the list never mentioned. "Using coding agents" points at the bundled AGENTS.md and livekit-agents skill, and the testing section adds Agent Console and `lk agent logs` for debugging. AGENTS.md gains a section on the bundled skill (with a fallback path for tools that do not load skills on their own) and a debugging checklist. Links to the moved testing, observability, and workflows pages now point at their current paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv * Restore the get-page example alongside search Search returns short excerpts, so reading a result means fetching the full page. Show both commands in the README, and tell coding agents in AGENTS.md to fetch the page before acting on a search result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv * Add the agent debugger to the README and AGENTS.md `lk agent debugger` shipped in CLI 2.18.8: it runs the agent in text mode and lets a coding agent or script drive one turn at a time, printing the tool calls and handoffs behind each reply. README lists it under "Run the agent" and raises the CLI floor to 2.18.8. AGENTS.md adapts the snippet from the coding agents guide so the agent tries every change with the debugger, and the debugging checklist now starts from reproducing the problem there. Agent Console stays the answer for speech issues the text-only debugger cannot show. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv * Update AGENTS.md Co-authored-by: u9g <jason.lernerman@livekit.io> * Update AGENTS.md Co-authored-by: u9g <jason.lernerman@livekit.io> * Update AGENTS.md Co-authored-by: u9g <jason.lernerman@livekit.io> * Apply Jason's AGENTS.md review round, and point testing at the debugger - Say the starter, not the SDK, is designed to run in LiveKit Cloud. - Drop the lk docs intro, the command list, and the MCP transport details; running lk docs shows the help. - Widen docs feedback to any LiveKit problem, keeping the to-do-list timing that has worked well. - Stop advertising the unit testing framework. Scenarios are the tests, and the debugger is the loop for checking each change; the README testing section points there too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv * Describe the seven bundled agent skills, not livekit-agents The skills PR replaces the single livekit-agents skill with seven focused ones, so the fallback path to its SKILL.md would no longer exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U7yszNU7t5aCHJsKLmU4hv --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: u9g <jason.lernerman@livekit.io>
1 parent ec22151 commit 3a644eb

2 files changed

Lines changed: 93 additions & 107 deletions

File tree

‎AGENTS.md‎

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,62 @@
11
# AGENTS.md
22

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.
3+
This is a LiveKit Agents project. LiveKit Agents is a Python SDK for building voice AI agents. This starter is designed to run in LiveKit Cloud. See @README.md for more about the rest of the LiveKit ecosystem.
44

5-
The following is a guide for working with this project.
5+
## Tooling
66

7-
## Project structure
7+
This Python project uses the `uv` package manager.
88

9-
This Python project uses the `uv` package manager. You should always use `uv` to install dependencies and run tests. To run the agent itself, use the LiveKit CLI: `lk agent console` to talk to it in the terminal, `lk agent dev` for a reloading development server, and `lk agent start` for production mode. See the [agent commands reference](https://docs.livekit.io/reference/developer-tools/livekit-cli/agent/) for the options each one accepts.
9+
Be sure to maintain code formatting, using `uv run ruff format` and `uv run ruff check`.
1010

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 (the Dockerfile and the CLI's entrypoint detection both expect `src/agent.py`).
11+
## LiveKit documentation
1212

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 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.
13+
Always refer to the latest documentation when working with this project. LiveKit offers both a CLI (`lk docs`) and an MCP server for browsing and searching its documentation.
1814

1915
### LiveKit CLI
2016

21-
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`.
22-
2317
Install or update the CLI:
2418

2519
- **macOS:** `brew install livekit-cli` (update: `brew update && brew upgrade livekit-cli`)
2620
- **Linux:** `curl -sSL https://get.livekit.io/cli | bash`
2721
- **Windows:** `winget install LiveKit.LiveKitCLI` (update: `winget upgrade LiveKit.LiveKitCLI`)
2822

29-
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 <command> --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.
23+
Run `lk docs` before your first docs lookup. Its help text explains how to use each command and how to interpret results.
24+
25+
### LiveKit docs MCP server
3026

31-
### LiveKit Docs MCP Server
27+
For deeper coding agent integration, LiveKit also offers an [MCP server](https://docs.livekit.io/reference/developer-tools/docs-mcp/).
3228

33-
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.
29+
### Submit feedback to LiveKit
3430

35-
### Submit docs feedback to LiveKit
31+
When you run into any problem with LiveKit, add it to your to-do list, then submit it with `lk docs submit-feedback` or the MCP `submit_docs_feedback` tool once you finish your other tasks. Useful feedback includes incomplete documentation, broken examples, missing steps, broken features or implementations, and any other gap or issue in the LiveKit ecosystem.
3632

37-
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.
33+
## LiveKit agent skills
34+
35+
This project includes LiveKit's agent skills in `.claude/skills/` and `.agents/skills/`, one for each stage of the work: reading the docs, building, debugging, testing, writing scenarios, running simulations, and operating in production. They defer to the live documentation for API details. If your tool doesn't load skills automatically, read the matching `.agents/skills/<name>/SKILL.md` before you start that kind of task.
3836

3937
## Handoffs and tasks ("workflows")
4038

41-
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.
39+
Voice AI agents are highly sensitive to latency. Design complex agents in a structured way that keeps irrelevant context and unneeded tools out of each LLM request. LiveKit Agents supports handoffs, where one agent hands control to another, and tasks, which are tightly scoped prompts that achieve a specific outcome, for building reliable workflows. Use them instead of long instruction prompts that cover several phases of a conversation. See the [workflows documentation](https://docs.livekit.io/agents/logic/workflows/) for more information.
4240

4341
## Testing
4442

45-
When possible, add tests for agent behavior. Add a scenario to `scenarios.yaml` and run it with `lk agent simulate text --scenarios scenarios.yaml`. The scenarios run in CI on every merge to main; read the [simulations documentation](https://docs.livekit.io/agents/start/testing/simulations/) before editing them.
43+
To keep agent behavior from regressing, add a scenario to `scenarios.yaml` and run it with `lk agent simulate text --scenarios scenarios.yaml`. Make sure the scenarios run in CI on every merge to `main`. Read the [simulations documentation](https://docs.livekit.io/testing/simulations/) before editing them.
44+
45+
Important: when you modify core agent behavior such as instructions, tool descriptions, or tasks, workflows, and handoffs, never guess at what works. Start by writing a scenario for the desired behavior. For example, if you're adding a tool, write a scenario that exercises it, then iterate on the tool until the scenario passes. This is how you produce a working, reliable agent.
46+
47+
After changing the agent, try it with the [agent debugger](https://docs.livekit.io/testing/debugger/) (CLI 2.18.8 or later) before calling the change done. Start the agent with `lk agent debugger start`, send user turns with `lk agent debugger say "..."`, and read the tool calls in each turn as well as the reply. Run `lk agent debugger restart` after every code edit, since a running session keeps the old code, and `lk agent debugger stop` when you're done.
48+
49+
## Debugging
4650

47-
For turn-level checks that don't need a live session, use the in-process [testing framework](https://docs.livekit.io/agents/start/testing/); `tests/test_agent.py` has a commented-out example. Run those with `uv run pytest`.
51+
To investigate unexpected agent behavior:
4852

49-
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+
- Reproduce it with `lk agent debugger`: send the turns that trigger the problem and read the tool calls and errors in each one. Add `--logs` to `say` to see log lines, including tracebacks, next to the turn that produced them.
54+
- Add a simulation scenario once it's fixed, so a later change can't bring it back unnoticed.
55+
- Run `lk agent dev --log-level DEBUG` for verbose logs from a local agent connected to LiveKit Cloud.
56+
- Run `lk agent logs` to stream logs from a deployed agent.
57+
- Ask the developer to open the [Agent Console](https://docs.livekit.io/testing/agent-console/) for speech problems such as turn-taking, interruptions, or transcription, which the text-only debugger can't show. It shows events, tool calls, and model timing for a live session.
58+
- Check [Agent Observability](https://docs.livekit.io/testing/observability/) for transcripts, traces, logs, and recordings of sessions with real users.
5059

51-
## LiveKit CLI
60+
## Other CLI commands
5261

53-
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.
62+
Beyond documentation access, the LiveKit CLI (`lk`) handles tasks such as managing SIP trunks for telephony agents. Run `lk --help` to explore available commands.

0 commit comments

Comments
 (0)