copilotkit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCopilotKit
CopilotKit
CopilotKit's APIs move. Anything written down in a skill file is a copy that starts drifting
the day it is written, so this skill carries almost no API detail on purpose. It tells you
where the current answer lives and how to get it.
Look it up before you write code. Not because the docs are more convenient, but because
they are regenerated from the source and a recollection is not.
CopilotKit的API会持续迭代更新。技能文件中记录的任何内容都是副本,从编写之日起就会逐渐过时,因此本技能刻意几乎不包含API细节。它会告诉你最新答案的位置以及获取方式。
编写代码前请先查阅文档。 不是因为文档更方便,而是因为文档是基于源码重新生成的,而记忆中的内容并非如此。
The search tools
搜索工具
An MCP server, , is bundled with this plugin. It exposes four search tools
and two exploration tools over four separate corpora. Picking the wrong one is the most
common way to come up empty:
copilotkit-docs| Tool | Corpus | Use it for |
|---|---|---|
| docs.copilotkit.ai | Usage, configuration, guides, quickstarts, the generated API reference |
| CopilotKit library source | How something is implemented, and exact signatures. Library packages only — not examples or showcases |
| AG-UI protocol docs | The protocol itself: event types, transports, the SDKs |
| AG-UI protocol SDK source | Protocol implementation detail |
| either tree | Browsing structure when you do not yet know what to search for |
CopilotKit questions go to the first two. AG-UI protocol questions go to the second two —
they are a different repository, and will not find them.
search-docsThese are semantic searches. Several short, differently-phrased queries beat one long
one. If a query returns something off-target, rephrase rather than widen — and if you get a
plausible-looking page that does not actually contain the term you need, say so instead of
reasoning from the title.
本插件捆绑了一个MCP服务器 。它基于四个独立的语料库提供了四个搜索工具和两个浏览工具。选错工具是搜索无果的最常见原因:
copilotkit-docs| 工具 | 语料库 | 用途 |
|---|---|---|
| docs.copilotkit.ai | 用法、配置、指南、快速入门、生成的API参考 |
| CopilotKit 库源码 | 实现逻辑以及精确的签名。仅适用于库包——不包含示例或演示项目 |
| AG-UI 协议文档 | 协议本身:事件类型、传输方式、SDK |
| AG-UI 协议 SDK 源码 | 协议实现细节 |
| 任意目录树 | 当你还不确定要搜索什么时,用于浏览结构 |
CopilotKit相关问题使用前两个工具。AG-UI协议相关问题使用后两个——它们属于不同的代码仓库,无法找到相关内容。
search-docs这些是语义搜索。 多个表述不同的短查询效果优于一个长查询。如果查询结果偏离目标,请重新表述而非扩大搜索范围——如果你得到一个看起来合理但实际上不包含所需术语的页面,请如实说明,不要仅凭标题进行推断。
Setup
安装配置
The server is registered once per tool, and installing the skills does not register it.
Check first — if the search tools above are already available, skip this.
Claude Code — the CopilotKit plugin declares the server in its , so a
plugin install needs nothing. A skills-only install () does not carry
that file, so register it:
.mcp.jsonnpx skills addbash
claude mcp add --transport sse copilotkit-mcp https://mcp.copilotkit.ai/sseCodex:
bash
codex mcp add copilotkit --url https://mcp.copilotkit.ai/mcpAnything else — for streamable HTTP,
for SSE. Keep the path: the bare host returns 404.
Per-tool instructions cover Cursor, Windsurf, Cline, GitHub
Copilot and VS Code.
https://mcp.copilotkit.ai/mcphttps://mcp.copilotkit.ai/sseWithout the server, the documentation works as a plain
site, and appending to any docs URL returns that page as Markdown.
.md该服务器每个工具只需注册一次,安装技能并不会自动注册它。请先检查——如果上述搜索工具已可用,请跳过此步骤。
Claude Code —— CopilotKit插件在其中声明了该服务器,因此安装插件无需额外操作。仅安装技能的方式()不会携带该文件,因此需要手动注册:
.mcp.jsonnpx skills addbash
claude mcp add --transport sse copilotkit-mcp https://mcp.copilotkit.ai/sseCodex:
bash
codex mcp add copilotkit --url https://mcp.copilotkit.ai/mcp其他工具 —— 流式HTTP使用 ,SSE使用 。请保留路径:仅访问主机会返回404。各工具的具体说明涵盖了Cursor、Windsurf、Cline、GitHub Copilot和VS Code。
https://mcp.copilotkit.ai/mcphttps://mcp.copilotkit.ai/sse如果没有该服务器,文档站点可作为普通网站使用,在任意文档URL后添加即可返回该页面的Markdown格式内容。
.mdWhere the answers are
答案所在位置
Worth knowing so a search has somewhere to land:
- Getting started — quickstart, and the CLI for the CLI-driven path
- Frontend — frontend tools, human-in-the-loop, prebuilt components, styling, attachments, voice
- Runtime — the runtime, HTTP endpoints, runners, factory mode, server adapters, auth
- Agent frameworks — one quickstart per framework under
/integrations/ - Intelligence — overview and the pages under it
- Not working — common issues,
error reference, and the generated
for a code the app actually reported
CopilotKitCoreErrorCode - Protocol — AG-UI, and the AG-UI docs for the protocol itself
Before you debug anything
调试前须知
Run the CLI's wiring check first — . It settles up to
eleven things in one command and is almost always faster than reading the project. See the
skill.
npx copilotkit@latest verify --jsoncopilotkit-cli请先运行CLI的配置检查命令—— 。该命令可一次性检查多达11项内容,几乎总是比通读项目更快。详见技能。
npx copilotkit@latest verify --jsoncopilotkit-cliTwo versions exist
存在两个版本
v2 is current. Import from the subpath — ,
. The package root is the deprecated v1 surface and still resolves,
so mixing the two raises nothing at import time and surfaces later as a runtime mismatch.
Check which subpath a project imports before trusting anything else about it. v1 is
deprecated but supported; the migration guide covers moving off it.
/v2@copilotkit/react-core/v2@copilotkit/runtime/v2v2是当前版本。请从子路径导入——例如、。包根路径是已弃用的v1接口,仍然可以解析,因此混用两个版本在导入时不会报错,之后会以运行时不匹配的形式暴露出来。在确认项目的其他信息之前,请先检查项目导入的是哪个子路径。v1已弃用但仍受支持;迁移指南介绍了如何从v1迁移。
/v2@copilotkit/react-core/v2@copilotkit/runtime/v2