copilotkit-channels
它能做什么
这项技能涵盖托管的 CopilotKit 频道(用于 Slack 或 Microsoft Teams)的代码部分。适合希望修改现有频道设置,或为不是由 CopilotKit CLI 创建的项目添加频道的开发者。
适用场景
- ✓当你想定制 CopilotKit 项目已包含的频道的时候。
- ✓当你希望智能体在 Slack 或 Teams 中工作,而该项目不是由 CopilotKit CLI 创建的时候。
- ✓当你在更改任何内容之前,想知道自己正在使用哪种频道产品的时候。
技能链接
https://github.com/CopilotKit/CopilotKit/blob/main/skills/copilotkit-channels/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在这个 CopilotKit 项目中定制 Slack 频道,让智能体只在某一个特定频道中回答问题。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先检查项目使用的是托管频道还是自托管的适配器包,因为两者的工作方式不同。然后它会编辑项目所需的频道声明、长期运行的主机程序以及激活调用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
CopilotKit Channels
Managed Channels let an agent answer in Slack or Microsoft Teams. Intelligence owns the provider edge — signed ingress, egress, credential storage — and delivers turns to your runtime over its realtime transport.
Scope
This skill covers managed Intelligence Channels: CopilotIntelligenceRuntime, app-api Channel resources, and the realtime gateway.
It does not cover the self-hosted @copilotkit/channels provider adapters (@copilotkit/channels-slack, -teams, -discord, -whatsapp). Those hold provider credentials in your process and talk to the provider directly. Both products use the words "channels" and "Slack", so confirm which one the user means before wiring anything. If they want to hold their own Slack tokens and run their own ingress, they want the adapter packages, not this skill.
Decide which path you are on first
Everything below depends on this, and getting it wrong produces a project with two Channel declarations that fight over one Channel.
Look for channel-host.mts at the project root.
| It is there | It is not |
|---|---|
The project was scaffolded by npx copilotkit init. The code half is already done — go to "Customising a scaffolded Channel". Do not write a new host or a second createChannel. |
The project predates the Channel, or was not made by the CLI. Go to "Wiring a project the CLI did not generate", at the end. |
The scaffolded path is the one exercised end to end. Wiring an existing project is supported and works, but it is less trodden: the CLI reads source it did not generate, so a project laid out unusually may get a status leg reported as undetermined rather than a confident answer. That is deliberate — an unsure answer beats a wrong one — but verify the wiring yourself there rather than trusting a green report.
A Channel has two halves
A Channel only works when both are correct, and each half is invisible from the other:
- The provider half — an app registered with Slack or Microsoft, credentials stored server-side, ingress pointed at Intelligence. Three entry points converge on it:
npx copilotkit initguides a new project,npx copilotkit channels addhandles an existing project or agent, and the dashboard wizard works in a browser. A new Teams app begins with the browser-created draft and uses one of the two paths below. - The code half — a long-running runtime that declares the Channel and awaits activation. A scaffolded project already has this; for anything else, it is what this skill writes.
The most confusing failure in this product is a correct provider half with a missing code half: the app serves HTTP normally, reports no error, shows an encouraging badge in the dashboard, and answers nothing. Nothing in the browser can diagnose it, because the missing piece is in the source tree.
Teams provider setup has two peer paths
For Teams, create the durable Channel draft in Intelligence before provisioning Microsoft resources. The browser then offers:
Fast CLI setup (recommended): copy the fully scoped command from the draft:
npx copilotkit@latest channels add --project-id <project-id> --channel-id <channel-id> --adapter teams --provision --via skill:copilotkit-channelsAdd
--via skill:copilotkit-channelsto the copied command, and keep it on every CLI command in this skill. It only tells CopilotKit's telemetry that the call came from this skill. If the CLI reportsUnknown option '--via', npx ran an old cached version: run the command again without the flag.It works outside a repository, reuses the CopilotKit login, confirms the Microsoft tenant, creates one single-tenant Teams-managed app, and sends the generated secret directly to encrypted Intelligence storage. It does not print the secret, write provider environment files, or modify runtime code.
**Guided manual
常见问题
这和自托管适配器一样吗?
不一样。托管频道会把服务商凭据保存在 CopilotKit 一侧,而适配器包则把凭据保存在你自己的进程中。
智能体如何判断我使用的是哪种设置?
它会在项目根目录下查找频道主机文件。
它会为我创建 Slack 应用吗?
首次创建 Slack 应用由单独的设置技能负责。
详情
作者的原始描述
Use for the CODE half of a managed Intelligence Channel with Slack or Microsoft Teams: customising the Channel a CLI-scaffolded project already ships, or — for a project the CLI did not generate — writing the Channel declaration, the long-running host, and the awaited activation call. Teams provider setup is in scope, because the CLI or dashboard wizard performs it. Creating a Slack app for the first time is not: if no Slack app exists yet, use setup-slack-channel for the provider half and return here for the code.
repo: CopilotKit/CopilotKit
热度
- GitHub 星标
- 38k
- 排名
- #7487
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
channels-setup
38k引导你的智能体使用 CopilotKit 的分步设置,让你从头到尾在 Slack 或 Microsoft Teams 中获得第一个能回答问题的智能体。
copilotkit-cli
38k帮你的智能体使用 CopilotKit 命令行工具检查项目设置、创建项目并管理托管设置。
copilotkit
38k帮你的智能体在编写代码之前查找最新的 CopilotKit 文档和源码,而不是依赖对一个不断变化的 API 的记忆。
setup-slack-channel
38k帮你的智能体把本地运行的 CopilotKit 智能体连接到 Slack,包括创建 Slack 应用、令牌和托管频道。