CopilotKit Open Sources Channels SDK: An MIT Licensed Library That Runs Any AG-UI Agent Inside Slack And Microsoft Teams
CopilotKit has simply launched the Channels SDK. It is an open supply library that places an present agent inside a messaging platform. The core assumption is concentrated and verifiable. You have already got an agent. It already has a mannequin, instruments and enterprise logic. Channels offers it a spot to work with folks, with out a rewrite per platform.
It runs on Slack and Microsoft Teams as early entry surfaces. Discord and Google Chat are named as deliberate.
Installation is 2 packages:
npm set up @copilotkit/channels @copilotkit/runtime
The connection to your agent is AG-UI, the agent-user interplay protocol CopilotKit maintains. Anything that speaks AG-UI works. That contains LangGraph, CrewAI, Mastra, Pydantic AI, Google ADK, and a plain HTTP agent you wrote your self. Your mannequin and orchestration layer keep the place they’re.

The distinction that issues is what a channel is not. It is just not a second agent. It is a transport together with a rendering goal. You write a message as soon as, and the adapter lowers it into every platform’s native format. That means Block Kit in Slack and Adaptive Cards in Teams. Not a textual content blob pushed by means of a webhook.
Is It Deployable?
Yes. The SDK is printed, MIT licensed, and has a documented runtime contract.
How One Turn Actually Flows
Here is the one path for each flip:
- An individual messages your app in Slack or Microsoft Teams.
- CopilotKit Intelligence receives the platform occasion and delivers it to your Channels course of.
- Channels runs your agent over AG-UI, executes instruments, and renders the end result.
- Intelligence sends native platform UI again into the dialog.
The break up of accountability follows from that. You run your agent, mannequin credentials, instruments and enterprise logic. You run the long-running Channels listener, plus utility state, deployment and logs. Intelligence manages the Slack and Teams platform credentials. It additionally owns platform ingress, credentialed supply, runtime registration, well being and reconnects.

Rendering is price yet one more sentence. Messages are authored as JSX and lowered to a serializable intermediate illustration. The adapter interprets that into the platform's native format, and interactive handlers are sure by means of an motion retailer.
The Runtime Contract
The lifecycle is the half price understanding. There is not any channel.begin(). The runtime owns activation.
import { createChannel } from "@copilotkit/channels";
import { CopilotRuntime, CopilotKitIntelligence } from "@copilotkit/runtime/v2";
import { createCopilotNodeListener } from "@copilotkit/runtime/v2/node";
const channel = createChannel({
identify: course of.env.CHANNEL_CODE,
supplier: "slack",
agent: makeAgent,
});
const runtime = new CopilotRuntime({
brokers: {},
intelligence: new CopilotKitIntelligence({ apiKey: course of.env.INTELLIGENCE_API_KEY }),
determineUser: () => ({ id: "channels-runtime", identify: "Channels Runtime" }),
channels: [channel],
});
const listener = createCopilotNodeListener({ runtime, basePath: "/api/copilotkit" });
await listener.channels.prepared({ timeoutMs: 30_000 });
Creating the listener begins the channel connection. Awaiting channels.prepared() makes a damaged configuration fail startup loudly as a substitute of silently. channels.standing() returns an general state you'll be able to gate on, and channels.cease() tears the channel down for sleek shutdown.
The runtime exposes listeners for Node, Hono and Express by means of the @copilotkit/runtime/v2/* subpaths.
createChannel takes greater than a reputation and an agent. The shipped choices embrace instruments, context, parts, instructions, retailer, sanitizeAgentOccasions, showToolStatus and replyContinuation. Registering named JSX parts is what lets a channel re-render and re-fire handlers after a restart. Without registration, a click on on a message posted earlier than the restart degrades to an expired motion.
What The Agent Can Do Inside The Channel
The function set targets work that occurs in a thread, not chat for its personal sake.
- Generative UI, so the agent renders interface when the duty requires it.
- Human within the loop, so an individual approves earlier than a essential motion runs.
- Tools, so the agent can file a difficulty, ebook a gathering or open a pull request.
- A persistence layer, plus transcripts that carry reminiscence throughout platforms.
- Slash instructions and mentions, mapped to the appropriate agent interplay.
OpenTag demonstrates the approval sample concretely. Every Linear and Notion mutation is intercepted in code earlier than the MCP request runs. The interceptor emits a confirm_write and proceeds solely after approval. Reads and rendering don't pause.
Key Takeaways
- @copilotkit/channels 0.5.0 is dwell on npm underneath MIT, with Slack and Microsoft Teams because the early entry surfaces.
- Every channel requires a CopilotKit Intelligence API key, on the managed path and the direct path.
- Slack is usually accessible as a managed supplier; Teams is listed as early entry however nonetheless carries a gating word within the shipped varieties.
- Discord, Telegram and WhatsApp adapters ship within the package deal as upcoming integrations.
- Deployment wants Node.js 22+, an ESM undertaking, and a long-running course of; serverless won't maintain the connection.
Thanks to the Copilotkit crew for the thought management / assets for this text. This article is sponsored by Copilokit.
The submit CopilotKit Open Sources Channels SDK: An MIT Licensed Library That Runs Any AG-UI Agent Inside Slack And Microsoft Teams appeared first on MarkTechPost.
