reading-livekit-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReading LiveKit documentation
阅读LiveKit文档
LiveKit's SDKs change faster than model training data, so anything you remember about a LiveKit
API, CLI flag, or default is a guess. Wrong guesses cost time: a wrong flag wastes a run, a wrong
signature wastes a build.
Every LiveKit-specific fact you state or put in code should come from a lookup in this
session. That includes facts you're confident about and patterns you've seen in other repos.
LiveKit的SDK更新速度比模型训练数据还快,所以你对LiveKit API、CLI标志或默认值的任何记忆都只是猜测。错误的猜测会浪费时间:错误的标志浪费一次运行,错误的签名浪费一次构建。
你陈述或写入代码的每个LiveKit具体事实都应来自本次会话中的查找。 这包括你确信的事实和你在其他仓库中见过的模式。
Where to look, in order of preference
查找位置,按优先级排序
1. The LiveKit Docs MCP server. If its tools are in your session, use them. They're the same
source the CLI uses, with less friction.
2. . Available wherever the LiveKit CLI is installed, with no MCP setup. Use it when
the MCP tools aren't there; don't stop to ask the user to install anything first. It can search the
docs, fetch pages, search code across LiveKit's repositories, show an SDK's recent changelog, report
pricing, and submit feedback. Start with:
lk docsbash
lk docs --help
lk docs search "agent simulations"Once search has shown you the right page, fetch it. There's machine-readable output if you'd
rather parse than read.
3. Web search against . Only when neither of the above is available. Tell the
user you fell back to it, and mark generated code as unverified.
docs.livekit.io1. LiveKit Docs MCP服务器。 如果它的工具在你的会话中,请使用它们。它们与CLI使用的来源相同,但更易用。
2. 。 在安装LiveKit CLI的任何地方都可用,无需MCP设置。当MCP工具不可用时使用它;不要停下来先要求用户安装任何东西。它可以搜索文档、获取页面、在LiveKit的仓库中搜索代码、显示SDK最近的变更日志、报告定价以及提交反馈。从以下命令开始:
lk docsbash
lk docs --help
lk docs search "agent simulations"一旦搜索显示了正确的页面,就获取它。如果你更愿意解析而不是阅读,有机器可读的输出。
3. 针对的网页搜索。 仅当上述两者都不可用时。告诉用户你使用了回退方案,并将生成的代码标记为未验证。
docs.livekit.ioHow to research
如何研究
- Search before you read. Search returns per-page excerpts, which is usually enough to pick the right page. Fetch full pages only once you know which one you need, or you'll fill the context window with pages you don't use.
- Use code search for how, docs for what. Docs tell you a parameter exists. LiveKit's own examples show how it's called. When a docs page and a working example disagree, go with the example and mention the discrepancy.
- Use the changelog for version questions. "Is X available yet", "when did Y change", and "why doesn't this argument exist" are answered by the changelog, not search.
- Check the version you're on. The installed SDK and CLI determine what works, and a documented
feature may not exist in the installed version. For any CLI command, on the installed binary outranks every other source.
--help
- 先搜索再阅读。 搜索返回逐页摘录,这通常足以选择正确的页面。只有确定了需要哪个页面后才获取完整页面,否则你会用不使用的页面填满上下文窗口。
- 用代码搜索了解如何,用文档了解是什么。 文档告诉你参数存在。LiveKit自己的示例展示如何调用它。当文档页面和可运行示例不一致时,以示例为准并提及差异。
- 用变更日志回答版本问题。 "X是否已可用"、"Y何时更改"以及"为什么这个参数不存在"由变更日志回答,而不是搜索。
- 检查你使用的版本。 已安装的SDK和CLI决定了什么有效,文档中的功能可能在你安装的版本中不存在。对于任何CLI命令,已安装二进制文件的优先于所有其他来源。
--help
Reporting what you found
报告你的发现
- Cite the page when a decision rests on it, so the user can check you.
- Say when you couldn't verify something. "I could not confirm this signature against the docs" is useful to the user. A silent guess isn't.
- Mark unverified code. If you had to write LiveKit code without a lookup, add a comment at the call site saying it's unverified, and say so in your reply.
- Don't invent a flag or parameter to make an example look complete. An incomplete example with a note is better than a plausible fabrication.
- 引用页面,当决策依赖于它时,以便用户可以核实。
- 说明你无法验证的内容。 "我无法根据文档确认这个签名"对用户很有用。沉默的猜测则不然。
- 标记未验证的代码。 如果你必须在没有查找的情况下编写LiveKit代码,在调用点添加注释说明它未验证,并在回复中说明。
- 不要为了示例看起来完整而编造标志或参数。 带有注释的不完整示例比貌似合理的虚构更好。
When the docs are wrong
当文档错误时
Sometimes a page contradicts the SDK source or the CLI's . When that happens:
--help- Go with what runs. , the installed SDK's source, and a working example outrank a prose page. Tell the user which one you followed and why.
--help - Report it with the docs feedback command, and tell the user you did, so the next person doesn't hit the same error.
lk docslk有时页面与SDK源码或CLI的相矛盾。发生这种情况时:
--help- 以实际运行为准。 、已安装SDK的源码和可运行的示例优先于文字页面。告诉用户你遵循了哪个以及为什么。
--help - 报告它,使用文档反馈命令,并告诉用户你已经报告,这样下一个人不会遇到同样的错误。
lk docslkRelated skills
相关技能
- Building an agent:
building-livekit-agents - Live-testing one during development:
debugging-livekit-agents - Unit tests:
testing-livekit-agents - Simulations: ,
writing-livekit-scenariosrunning-livekit-simulations
- 构建agent:
building-livekit-agents - 开发期间进行实时测试:
debugging-livekit-agents - 单元测试:
testing-livekit-agents - 模拟:、
writing-livekit-scenariosrunning-livekit-simulations