chat-sdk
Skill5.8k starsChanged 10 months agoMITView on GitHub
Build multi-platform chat bots with Chat SDK (`chat` npm package). Use when developers want to (1) Build a Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, or WhatsApp bot, (2) Use Chat SDK to handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, modals, files, or AI streaming, (3) Set up webhook routes or multi-adapter bots, (4) Send rich cards or streamed AI responses to chat platforms, (5) Build or maintain a custom adapter or state adapter. Triggers on "chat sdk", "chat bot", "slack bot", "teams bot", "google chat bot", "discord bot", "telegram bot", "whatsapp bot", "@chat-adapter", "@chat-adapter/state-", "custom adapter", "state adapter", "build adapter", and building bots that work across multiple chat platforms.
9 other projects use a version of this, 5 of them edited.
Trending
Quiet since October.about the whole repository
Most recently taken up by
- lobehub/lobehubedited, first seen Oct 1, 2026
- vercel/chattheir own version, first seen Oct 1, 2026
- anthropics/claude-quickstartstheir own version, first seen Sep 22, 2026
- vercel/vercel-plugintheir own version, first seen Aug 12, 2026
- openai/pluginsedited, first seen May 13, 2026
- vercel-labs/workflow-workshopedited, first seen Apr 20, 2026
Who's talking about vercel-labs/open-agents
- @dailygithubtrends.bsky.social“今日のGitHubトレンド vercel-labs/open-agents Vercel上でバックグラウンドで動作するコーディングエージェントを構築・実行するためのオープンソースのリファレンスアプリです。 Web…”Bluesky · May 7, 2026 · 2 likes
- A Hacker News story“Open Agents from Vercel is now open source”Hacker News · May 6, 2026 · 2 points
- @github-trending.bsky.social“💎 Hidden Gem! 💎 (1000+ new stars) 📦 vercel-labs / open-agents ⭐ 2,227 (+1,020) 🗒 TypeScript An open …”Bluesky · Apr 15, 2026 · 2 likes
- dennisonbertram/fork-open-agents“fix(github): typed 4xx instead of 500 when GitHub rejects stored credentials”GitHub · Aug 2, 2026 · 1 reactions
- @postgresql.activitypub.awakari.com.ap.brid.gy“vercel-labs/open-agents An open source template for building cloud agents. Open Agents Open Agents is an …”Bluesky · May 8, 2026 · 1 likes
The biggest 5 of 21 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 21
Talked about on GitHub, Bluesky and Hacker News (21 times).
On GitHub · 12
- Aug 2, 2026fix(github): typed 4xx instead of 500 when GitHub rejects stored credentials — dennisonbertram/fork-open-agents1 reaction · 2 comments
- Oct 3, 2026agent-skills.github.vercel-labs.open-agents: init at 0-unstable-2026-04-20 — sudosubin/agents.nix0 reactions
- Aug 2, 2026POST /api/sandbox returns an uncaught 500 (HttpError: Bad credentials) when the GitHub token is stale — dennisonbertram/fork-open-agents0 reactions · 1 comment
- Jun 17, 2026feat(codemods): add codemods for v6 to v7 migration — vercel/ai0 reactions
- May 23, 2026Epic: Trusted dev/staging/prod pipeline and sandbox secret broker — dennisonbertram/fork-open-agents0 reactions · 4 comments
7 more on GitHub
- Apr 16, 2026📱 SNS 콘텐츠 - 2026-04-16 22:47 KST — leaf468/autothreads0 reactions
- Apr 16, 2026🤖 AI 트렌드 리포트 - 2026-04-16 22:47 KST — leaf468/autothreads0 reactions
- Apr 16, 2026📱 SNS 콘텐츠 - 2026-04-16 14:32 KST — leaf468/autothreads0 reactions
- Apr 16, 2026🤖 AI 트렌드 리포트 - 2026-04-16 14:32 KST — leaf468/autothreads0 reactions
- Apr 15, 20263 more links to add — joanmarcriera/Home-office-automations0 reactions · 2 comments
- Apr 14, 2026Cloud execution roadmap: evaluate Vercel Open Agents as reference architecture — hurttlocker/o80 reactions · 2 comments
- Apr 14, 2026[Resource] Vercel Open Agents — Open-Source Cloud Agent Template — nexu-io/harness-engineering-guide0 reactions
On Bluesky · 7
- May 7, 2026今日のGitHubトレンド vercel-labs/open-agents Vercel上でバックグラウンドで動作するコーディングエージェントを構築・実行するためのオープンソースのリファレンスアプリです。 Web… — @dailygithubtrends.bsky.social2 likes and reposts
- Apr 15, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 vercel-labs / open-agents ⭐ 2,227 (+1,020) 🗒 TypeScript An open source template for building cloud… — @github-trending.bsky.social2 likes and reposts · 1 reply
- May 8, 2026vercel-labs/open-agents An open source template for building cloud agents. Open Agents Open Agents is an open-source reference app for… — @postgresql.activitypub.awakari.com.ap.brid.gy1 likes and repost
- May 7, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 vercel-labs / open-agents ⭐ 4,889 (+406) 🗒 TypeScript An open source template for building cloud… — @github-trending.bsky.social1 likes and repost · 1 reply
- May 6, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 vercel-labs / open-agents ⭐ 4,760 (+366) 🗒 TypeScript An open source template for building cloud… — @github-trending-js.bsky.social1 likes and repost · 1 reply
2 more on Bluesky
- Apr 17, 2026vercel-labs/open-agents An open source template for building cloud agents. Open Agents Open Agents is an open-source reference app for… — @postgresql.activitypub.awakari.com.ap.brid.gy1 likes and repost
- Apr 15, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 vercel-labs / open-agents ⭐ 2,227 (+1,020) 🗒 TypeScript An open source template for building cloud… — @github-trending-js.bsky.social1 likes and repost · 1 reply
On Hacker News · 2
- May 6, 2026Open Agents from Vercel is now open source2 points
- Apr 15, 2026An open source template for building cloud agents1 point
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- lobehub/lobehub★ 83k23% same
- openai/plugins★ 7.3k75% same
- vercel-labs/workflow-workshop★ 698% same
- vercel-labs/chat-sdk-form-bot★ 393% same
- vercel-labs/chat-sdk-deploy-bot★ 193% same
Wrote their own version · 4
- anthropics/claude-quickstarts★ 18ksame name
- vercel/chat★ 2.4ksame name
- microsoft/skills-for-copilot-studio★ 459same name
- vercel/vercel-plugin★ 297same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- ai-sdkSkill
- baseline-uiSkill
- code-reviewSkill
- deploy-open-harnessSkill
- emil-design-engSkill
- frontend-designSkill
- plan-modeSkill
- remove-demo-limitsSkill
- vercel-react-best-practicesSkill
- web-animation-designSkill
- workflowSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
When Chat SDK is installed in a user project, inspect the published files that ship in node_modules:
- Distinctive: line 32
If one of the paths below does not exist, that package is not installed in the project yet.
- Distinctive: line 34
Read these before writing code:
- Very specific: line 109
Read node_modules/chat/docs/handling-events.mdx, node_modules/chat/docs/actions.mdx, node_modules/chat/docs/modals.mdx, and …
- Distinctive: line 195
Read these published docs first:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chat SDK
Unified TypeScript SDK for building chat bots across Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. Write bot logic once, deploy everywhere.
Start with published sources
When Chat SDK is installed in a user project, inspect the published files that ship in node_modules:
node_modules/chat/docs/ # bundled docs
node_modules/chat/dist/index.d.ts # core API types
node_modules/chat/dist/jsx-runtime.d.ts # JSX runtime types
node_modules/chat/docs/contributing/ # adapter-authoring docs
node_modules/chat/docs/guides/ # framework/platform guidesIf one of the paths below does not exist, that package is not installed in the project yet.
Read these before writing code:
node_modules/chat/docs/getting-started.mdx— install and setupnode_modules/chat/docs/usage.mdx—Chatconfig and lifecyclenode_modules/chat/docs/handling-events.mdx— event routing and handlersnode_modules/chat/docs/threads-messages-channels.mdx— thread/channel/message modelnode_modules/chat/docs/posting-messages.mdx— post, edit, delete, schedulenode_modules/chat/docs/streaming.mdx— AI SDK integration and streaming semanticsnode_modules/chat/docs/cards.mdx— JSX cardsnode_modules/chat/docs/actions.mdx— button/select interactionsnode_modules/chat/docs/modals.mdx— modal submit/close flowsnode_modules/chat/docs/slash-commands.mdx— slash command routingnode_modules/chat/docs/direct-messages.mdx— DM behavior andopenDM()node_modules/chat/docs/files.mdx— attachments/uploadsnode_modules/chat/docs/state.mdx— persistence, locking, dedupenode_modules/chat/docs/adapters.mdx— cross-platform feature matrixnode_modules/chat/docs/api/chat.mdx— exactChatAPInode_modules/chat/docs/api/thread.mdx— exactThreadAPInode_modules/chat/docs/api/message.mdx— exactMessageAPInode_modules/chat/docs/api/modals.mdx— modal element and event details
For the specific adapter or state package you are using, inspect that installed package's dist/index.d.ts export surface in node_modules.
Quick start
import { Chat } from "chat";
import { createSlackAdapter } from "@chat-adapter/slack";
import { createRedisState } from "@chat-adapter/state-redis";
const bot = new Chat({
userName: "mybot",
adapters: {
slack: createSlackAdapter(),
},
state: createRedisState(),
dedupeTtlMs: 600_000,
});
bot.onNewMention(async (thread) => {
await thread.subscribe();
await thread.post("Hello! I'm listening to this thread.");
});
bot.onSubscribedMessage(async (thread, message) => {
await thread.post(`You said: ${message.text}`);
});Core concepts
- Chat — main entry point; coordinates adapters, routing, locks, and state
- Adapters — platform-specific integrations for Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp
- State adapters — persistence for subscriptions, locks, dedupe, and thread state
- Thread — conversation context with
post(),stream(),subscribe(),setState(),startTyping() - Message — normalized content with
text,formatted, attachments, author info, and platformraw - Channel — container for threads and top-level posts
Event handlers
| Handler | Trigger |
onNewMention | Bot @-mentioned in an unsubscribed thread |
onDirectMessage | New DM in an unsubscribed DM thread |
onSubscribedMessage | Any message in a subscribed thread |
onNewMessage(regex) | Regex match in an unsubscribed thread |
onReaction(emojis?) | Emoji added or removed |
onAction(actionIds?) | Button clicks and select/radio interactions |
onModalSubmit(callbackId?) | Modal form submitted |
onModalClose(callbackId?) | Modal dismissed/cancelled |
onSlashCommand(commands?) | Slash command invocation |
onAssistantThreadStarted | Slack assistant thread opened |
onAssistantContextChanged | Slack assistant context changed |
onAppHomeOpened | Slack App Home opened |
onMemberJoinedChannel | Slack member joined channel event |
Read node_modules/chat/docs/handling-events.mdx, node_modules/chat/docs/actions.mdx, node_modules/chat/docs/modals.mdx, and node_modules/chat/docs/slash-commands.mdx before wiring handlers. onDirectMessage behavior is documented in node_modules/chat/docs/direct-messages.mdx.
Streaming
Pass any AsyncIterable<string> to thread.post() or thread.stream(). For AI SDK, prefer result.fullStream over result.textStream when available so step boundaries are preserved.
import { ToolLoopAgent } from "ai";
const agent = new ToolLoopAgent({ model: "anthropic/claude-4.5-sonnet" });
bot.onNewMention(async (thread, message) => {
const result = await agent.stream({ prompt: message.text });
await thread.post(result.fullStream);
});Key details:
streamingUpdateIntervalMscontrols post+edit fallback cadencefallbackStreamingPlaceholderTextdefaults to"..."; setnullto disable- Structured
StreamChunksupport is Slack-only; other adapters ignore non-text chunks
Cards and modals (JSX)
Set jsxImportSource: "chat" in tsconfig.json.
Card components:
Card,CardText,Section,Fields,Field,Button,CardLink,LinkButton,Actions,Select,SelectOption,RadioSelect,Table,Image,Divider
Modal components:
Modal,TextInput,Select,SelectOption,RadioSelect
await thread.post(
<Card title="Order #1234">
<CardText>Your order has been received.</CardText>
<Actions>
<Button id="approve" style="primary">Approve</Button>
<Button id="reject" style="danger">Reject</Button>
</Actions>
</Card>
);Adapter inventory
Official platform adapters
| Platform | Package | Factory |
| Slack | @chat-adapter/slack | createSlackAdapter |
| Microsoft Teams | @chat-adapter/teams | createTeamsAdapter |
| Google Chat | @chat-adapter/gchat | createGoogleChatAdapter |
| Discord | @chat-adapter/discord | createDiscordAdapter |
| GitHub | @chat-adapter/github | createGitHubAdapter |
| Linear | @chat-adapter/linear | createLinearAdapter |
| Telegram | @chat-adapter/telegram | createTelegramAdapter |
| WhatsApp Business Cloud | @chat-adapter/whatsapp | createWhatsAppAdapter |
Official state adapters
| State backend | Package | Factory |
| Redis | @chat-adapter/state-redis | createRedisState |
| ioredis | @chat-adapter/state-ioredis | createIoRedisState |
| PostgreSQL | @chat-adapter/state-pg | createPostgresState |
| Memory | @chat-adapter/state-memory | createMemoryState |
Community adapters
chat-state-cloudflare-do@beeper/chat-adapter-matrixchat-adapter-imessage@bitbasti/chat-adapter-webex@resend/chat-sdk-adapterchat-adapter-baileys
Coming-soon platform entries
- Signal
- X
- Messenger
Building a custom adapter
Read these published docs first:
node_modules/chat/docs/contributing/building.mdxnode_modules/chat/docs/contributing/testing.mdxnode_modules/chat/docs/contributing/publishing.mdx
Also inspect:
node_modules/chat/dist/index.d.ts—Adapterand related interfacesnode_modules/@chat-adapter/shared/dist/index.d.ts— shared errors and utilities- Installed official adapter
dist/index.d.tsfiles — reference implementations for config and APIs
A custom adapter needs request verification, webhook parsing, message/thread/channel operations, ID encoding/decoding, and a format converter. Use BaseFormatConverter from chat and shared utilities from @chat-adapter/shared.
Webhook setup
Each registered adapter exposes bot.webhooks.<name>. Wire those directly to your HTTP framework routes. See node_modules/chat/docs/guides/slack-nextjs.mdx and node_modules/chat/docs/guides/discord-nuxt.mdx for framework-specific route patterns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

