
debugging-livekit-agents
Drives a live multi-turn conversation with a LiveKit agent running locally, using lk agent debugger. Use when the user says "test my agent", "try my agent", "does this work", or "why did it call that tool", after editing an agent to check how it behaves, or when an agent on a speech-to-speech model or one that mishears users needs checking. The default for a bare "test"; for regression tests use testing-livekit-agents, for graded runs running-livekit-simulations.
- Installs
- 412
- Last 24h
- +12
- Trending rank
- #7846
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/livekit/agent-skills --skill debugging-livekit-agents- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads debugging-livekit-agents automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Debugging a LiveKit agent live
lk agent debugger runs the user's agent locally as a background process and lets you drive a
conversation one turn at a time. It's built for coding agents: you play the user, choose each next
line based on the last reply, and inspect what the agent did in between.
By default the session is text: speech is off and nothing goes to a LiveKit room, so each turn is fast. When the bug lives in the audio path, start the session in audio mode instead (see Audio mode).
Before the first use, confirm the command exists and read its help:
lk agent debugger --help
The help is thorough and is the source of truth for subcommands and flags, so this skill doesn't
restate them. If the command is missing, the installed CLI predates it. Tell the user to update
lk and use testing-livekit-agents until then. Don't guess at an older command's shape.
The loop
Start the agent, say user turns, inspect what happened, edit the code, restart, repeat, and stop when you're done. Roughly:
lk agent debugger start
lk agent debugger say "Hi, what can you do?"
lk agent debugger say "Book me a table for two tonight"
lk agent debugger stop
Each say prints everything the agent did in response (tool calls with arguments and results,
handoffs, errors) followed by the reply. Between turns you can look at the agent's chat history, a
live event stream, the process logs, and status; --help lists the subcommands.
Restart after every code edit. A running session keeps the old code, and it's easy to lose time debugging behavior the file no longer has.
Debugging with it
- Read the tool calls as well as the reply. The reply shows what went wrong; the tool call and its arguments usually show why. A wrong argument points to the prompt or the tool description. No call at all usually means the tool description never says when to use it.
- Interleave the logs when a tool misbehaves. An option shows the agent's log lines under the turn they belong to, so a tool's traceback appears right below the sanitized error the user would have heard. That's the quickest way from symptom to cause.
- Check the agent's chat history instead of relying on your memory of the conversation. It records what the LLM saw, including instruction and tool changes across handoffs. When behavior seems impossible, the history usually shows the context isn't what you assumed.
- Reproduce before you fix, then re-run the same turns. Keep the sequence of
saylines that triggered the bug so you can compare before and after. - Drive whole conversations. Most bugs take several turns to show up: details collected early that get lost, a user changing their mind mid-flow, a handoff that drops context. A single turn won't find them.
- Script it if a program is deciding the turns. There's machine-readable output and meaningful
exit codes. Check
--helpfor the current format instead of assuming field names.
Audio mode
Text mode skips STT and TTS, so it can't show a name heard as a different spelling, digits the STT
spells out as words, a turn that ends too early, or anything from a realtime model that only takes
audio. Where the CLI supports it, starting the session with audio (check start --help) speaks
each say with LiveKit Inference TTS into the agent's microphone input, and the agent runs its full
audio pipeline.
- Use it when the symptom is about hearing, or when the agent uses a speech-to-speech model that can't run in text mode. Stay in text mode for logic, prompt, and tool bugs: it's faster, and the transcription noise only gets in the way.
- It needs a LiveKit Cloud project. The spoken turns run on LiveKit Inference, so
lkmust have project credentials. Text mode doesn't need them. - Compare what was heard with what you sent. Each turn shows the agent's transcript of your line, and the sent text when the words differ. That difference is often the whole bug: the agent answered correctly to what it heard.
- Write lines the way a caller would say them. Spell out numbers and codes when testing how the agent handles spoken input, and test both forms if the agent should accept either.
- The mode belongs to the session. Restart keeps it; stop and start again to switch.
- A long silent pause can end a turn early. A turn ends once the agent has answered and stayed quiet for a moment. If the agent pauses for a long time before finishing (for example, a realtime model waiting on a delegated answer), the rest of its reply shows up in the next turn. Check the chat history before concluding the agent never answered.
Audio mode still can't interrupt the agent mid-reply or tell you how the agent sounds. Use
lk agent console or audio simulations for those.
When to use something else
| Situation | Use |
|---|---|
| You want to hear it, or hand the user something to try | lk agent console (mic and speakers, a human at the keyboard) |
| The same failure keeps coming back | A turn-level regression test (testing-livekit-agents) |
| You need whole-conversation outcomes graded at scale | Simulations (running-livekit-simulations) |
| Transcription or endpointing on a turn you're investigating | The debugger in audio mode (above) |
| Interruptions, or speech behavior graded across many conversations | Audio simulations (running-livekit-simulations) |
The debugger is for finding bugs interactively. Once you've found one, write a test for it so a later change can't reintroduce it unnoticed.
Related skills
- Building the agent:
building-livekit-agents - Pinning a found bug as a test:
testing-livekit-agents - Whole-conversation checks:
writing-livekit-scenarios,running-livekit-simulations - Production-only failures (worker processes, providers, shutdown):
operating-livekit-agents - CLI flags and API facts:
reading-livekit-docs
FAQ
What does the debugging-livekit-agents skill do?
Drives a live multi-turn conversation with a LiveKit agent running locally, using lk agent debugger. Use when the user says "test my agent", "try my agent", "does this work", or "why did it call that tool", after editing an agent to check how it behaves, or when an agent on a speech-to-speech model or one that mishears users needs checking. The default for a bare "test"; for regression tests use testing-livekit-agents, for graded runs running-livekit-simulations.
How do I install debugging-livekit-agents?
Run npx skills add https://github.com/livekit/agent-skills --skill debugging-livekit-agents in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/debugging-livekit-agents/ (personal) or .claude/skills/debugging-livekit-agents/ (project).
Which AI agents can use debugging-livekit-agents?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is debugging-livekit-agents safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains debugging-livekit-agents?
It is published by livekit in livekit/agent-skills. It has 412 recorded installs.
More from livekit/agent-skills
livekit-agents
livekit/agent-skills
Build voice AI agents with LiveKit Cloud and the Agents SDK. Use when the user asks to "build a voice agent", "create a LiveKit agent", "add voice AI", "implement handoffs", "structure agent workflows", or is working with LiveKit Agents SDK. Provides opinionated guidance for the recommended path: LiveKit Cloud + LiveKit Inference. REQUIRES writing tests for all implementations.
livekit-simulations
livekit/agent-skills
Generate targeted test scenarios for a LiveKit voice or chat agent and run them as simulations — locally, from the agent's own code plus what the user wants stress-tested. Use whenever the user wants to "test my agent", "what should I test", "create/generate simulation scenarios", "make a sim test suite", "use lk agent simulate", "stress-test the X flow", "set up scenarios for my agent", or wants to probe edge cases / refusals / regressions before shipping. Generates scenarios on the user's machine (their code is never uploaded) and lets the user deeply steer what gets tested. Trigger even without the word "simulation" when the user clearly wants to decide what to test and verify how their agent behaves across realistic conversations. Not for building a new agent from scratch (use the livekit-agents skill), load-testing, or ordinary unit tests.
building-livekit-agents
livekit/agent-skills
Open the skill to read its SKILL.md instructions.
reading-livekit-docs
livekit/agent-skills
Open the skill to read its SKILL.md instructions.
testing-livekit-agents
livekit/agent-skills
Open the skill to read its SKILL.md instructions.
operating-livekit-agents
livekit/agent-skills
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.