Chat SDK
Open-source TypeScript SDK for building chat bots and agents once and deploying them across Slack, Teams, Google Chat, Discord, WhatsApp and more.
At a Glance
About Chat SDK
Chat SDK is an open-source TypeScript library from Vercel for building chat bots and agents that run on multiple messaging platforms from one codebase. Developers write handlers once and connect them to platforms through adapters. It is distributed on npm as chat and released under the MIT license.
What It Is
Chat SDK is a unified chat layer that hides the differences between platform APIs, webhook formats and message formats behind adapters. A Chat instance coordinates adapters and routes incoming events to typed handlers. A pluggable state layer persists thread subscriptions and distributed locks. Redis, Postgres and in-memory state are mentioned on the homepage.
Handlers cover mentions, messages, reactions, button clicks, slash commands and modals. Cards, buttons and modals are written in JSX and rendered natively on each platform, for example as Block Kit, Adaptive Cards or Google Chat Cards.
Adapters and Platforms
The adapter catalog lists official adapters for Slack, Teams, Google Chat, Gmail, Discord, WhatsApp, Twilio, Messenger, Instagram, X, Twitch, GitHub, GitLab, Linear, Notion and Telegram. Vendor-official and community adapters are also supported, and the docs explain how to build a new adapter. A dependency-free @chat-adapter/catalog package lists adapters with their capabilities, peer dependencies and environment variables.
Building AI Agents
The SDK can stream LLM responses into a thread, using native Slack streaming, Telegram private chat draft previews, or a post-and-edit fallback. It ships AI utilities, including agent tools, and works with Vercel's AI SDK, AI Gateway, Sandbox and Workflows. Guides cover authenticating a Slack bot with Vercel Connect, a knowledge agent template and an eve integration.
Setup Path
Install with npm i chat plus the adapters you need. Alternatively, run npx create-chat-sdk@latest to scaffold a Next.js bot app with a Chat configuration, webhook route and .env.example. Adapter credentials are read from environment variables. For AI coding agents, a Chat SDK skill can be installed with npx skills add vercel/chat, and the docs are available as llms.txt.
Community Discussions
Be the first to start a conversation about Chat SDK
Share your experience with Chat SDK, ask questions, or help others learn from your insights.
Pricing
Open Source
Chat SDK core TypeScript SDK released under the MIT License, free to use, copy, modify and distribute.
- MIT License
- Unified TypeScript SDK for Slack, Teams, Google Chat, Discord, WhatsApp, Telegram and more
- Event handlers, JSX cards, AI streaming, modals, slash commands
- Install via npm i chat
Capabilities
Key Features
- Multi-platform bots from one codebase via adapters
- Typed event handlers for mentions, messages, reactions, actions, slash commands and modals
- JSX cards, buttons and modals rendered natively per platform
- Streaming LLM responses into threads
- Thread subscriptions with pluggable state (Redis, Postgres, memory)
- File uploads, direct messages and ephemeral messages
- Concurrency handling for overlapping messages
- create-chat-sdk CLI scaffolding for Next.js bots
- Adapter catalog package
- Chat SDK skill for AI coding agents
