Channels
Run one AG-UI agent in Slack, Microsoft Teams, and more through managed CopilotKit Intelligence connections.
Start building with your coding agent — copy this prompt
Copy and paste this prompt to your agent. Local agents are best so they can use your browser to set up Microsoft Teams.
Help me create a new CopilotKit app from scratch, then connect its agent to Microsoft Teams so it answers in a real channel.
Use these sources as your instructions, in this order:
- `copilotkit-setup` for creating the app and wiring managed Intelligence.
- `copilotkit-channels` for the CLI-scaffolded Channel and its long-running host.
- The current Microsoft Teams Channels documentation at https://docs.copilotkit.ai/teams for the provider setup and end-to-end verification.
Read both skills and the linked Teams documentation before you plan anything, and follow them rather than working from memory. If either skill is not installed, stop and tell me to run `npx copilotkit@latest skills install` in the directory where I want the project, then wait for me. Do not require a Teams-specific onboarding skill or substitute Slack setup instructions; use the linked Teams documentation as the provider source of truth.
Use the CopilotKit CLI through `npx copilotkit@latest`; do not assume or require a global CLI installation. Before you start, verify that Node.js 22 or newer is available. If it is not, stop and tell me what I need to install.
When you implement the plan:
- Run `npx copilotkit@latest create` to scaffold a brand-new project. Ask me for the project name and framework instead of choosing them for me.
- Choose managed Intelligence because Channels are not available in self-hosted SSE mode. Follow the CLI's current prompts rather than guessing undocumented flags.
- Treat the CLI-generated `channel-host.mts` and `channels.mts` as the code half. Do not add a second Channel declaration or move the Channel into a serverless route.
- Use the published Teams documentation as the provider half. Start at https://docs.copilotkit.ai/teams, select my agent backend in the docs, and follow the linked Intelligence configuration and Teams connection pages in order. Use the current documented steps instead of relying on memory of Azure Bot or Teams app setup.
Before your first step, tell me which mode you are in:
- You can drive a browser yourself. Then do so, and confirm with me before each consequential change in a live account — signing in, creating an Intelligence project, creating or changing an Azure Bot registration, attaching the Teams connection, issuing a key, or installing the app in Microsoft Teams.
- You cannot. Then say so plainly and walk me through the browser steps one at a time, waiting for me to confirm each before you continue.
Do not guess which one you are. Check what tools you actually have.
Rules for the whole run:
- Never ask me to paste a token, client secret, or API key into this conversation. They go into Azure, the Intelligence dashboard, and my `.env`, typed by me.
- Do not report success until the app is installed in the intended Teams scope, Intelligence reports the Channel as Online, and a real Teams message or mention receives the agent's reply. "The runtime started" is not success.
Start by reading the two skills and the Teams documentation, then tell me which skills are available, what you found in the current directory, which browser mode you are in, and what you plan to do.Channels brings your agent into the conversations where work already happens. Your agent still runs in your infrastructure. CopilotKit Intelligence owns the channel connection (Slack, Teams, Discord, etc.), delivers each turn to your Channels SDK listener, and sends the response back as native channel UI.
How Channels connects your agent#
Channels connects the agent and application logic you run to the provider connection managed by CopilotKit Intelligence. The diagram shows the boundaries between those systems and the path each message takes.
Each message moves through the same five stages:
- A person messages your app in Slack or Teams.
- CopilotKit Intelligence receives the platform event using the credentials configured for that Channel.
- A persistent Intelligence gateway connection delivers the turn to your long-running Channels SDK process.
- The SDK runs your agent over AG-UI, executes channel tools, and renders the response.
- Intelligence sends the result back as native Slack Block Kit or Teams Adaptive Card content.
This split keeps platform credentials out of your agent process without moving your agent, tools, or business logic into CopilotKit.
| You run | CopilotKit Intelligence manages |
|---|---|
| The agent and its model credentials | Slack and Teams platform credentials |
| A long-running Channels SDK listener | Platform ingress and credentialed delivery |
| Tools and approval business logic | Runtime registration, health, and reconnects |
| Deployment, logs, and application auth | Conversation-history delivery to the listener |
Production self-hosting: Run Enterprise Intelligence in your own infrastructure#
Production self-hosting keeps your Channels configuration, provider credentials, delivery state, and platform operations inside your network, giving your organization control over data residency, security, and infrastructure. CopilotKit Engineering helps your team deploy Enterprise Intelligence in your Kubernetes environment. Book time with a CopilotKit engineer to get started.
Next step#
Continue to Configure the Channel in Intelligence to create the managed Microsoft Teams connection.