@copilotkit/bot-teams
v0.0.1
Published
Reusable Microsoft Teams ↔ CopilotKit bridge — Adaptive Card primitives and an experimental bot factory.
Downloads
187
Maintainers
Readme
@copilotkit/bot-teams
Reusable Microsoft Teams ↔ CopilotKit bridge — Adaptive Card primitives and an experimental bot factory.
It turns a CopilotKit agent run into Microsoft Teams Adaptive Cards: it translates streamed AG-UI
messages into card intents, renders them as create/update Adaptive Cards, bridges human-in-the-loop
(HITL) approvals, and drives the agent through a CopilotKitCore runtime client — with a typing
indicator while the agent works.
Install
npm install @copilotkit/bot-teamsBuilt for the Teams SDK v2 (@microsoft/teams.apps).
Two entry points
@copilotkit/bot-teams — primitives (stable surface)
Compose the bridge yourself from focused, independently testable pieces:
messagesToCardIntents— pure AG-UI messages → ordered card intentsbuildCardForIntent/buildApprovalCard— card intent → Adaptive CardCardRenderer— diffs intents against what's been shown and creates/updates cardsApprovalBridge— parks an agent tool call until a human approves/rejectsRuntimeClient— drives a beam/CopilotKit agent throughCopilotKitCore, one thread per conversationstartTypingPulse— keeps the Teams typing indicator alive during a run
@copilotkit/bot-teams/bot — createTeamsAgentBot factory (experimental)
A batteries-included factory that wires the primitives onto a Teams App:
import { createTeamsAgentBot } from '@copilotkit/bot-teams/bot';
const bot = createTeamsAgentBot({
core, // a CopilotKitCore wired to your runtime
agentId: 'beamBasicAgent',
approvalTimeoutMs: 300_000,
reviewerName: 'jordan',
});
await bot.start();Experimental: the
/botfactory's option surface may change while the wiring stabilizes. The root primitives are the stable contract — drop to them if the factory doesn't fit.
License
MIT
