GitPedia

Chat

A unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, and more.

From vercel·Updated June 22, 2026·View on GitHub·

A unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. Write your bot logic once, deploy everywhere. The project is written primarily in TypeScript, distributed under the MIT License license, first published in 2025. It has gained significant community traction with 2,112 stars and 237 forks on GitHub. Key topics include: ai, chat, discord, google-chat, slack.

Latest release: create-chat-sdk@0.1.0
June 16, 2026View Changelog →

Chat SDK

npm version
npm downloads
License: MIT

A unified TypeScript SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. Write your bot logic once, deploy everywhere.

Installation

bash
npm install chat

Install adapters for your platforms:

bash
npm install @chat-adapter/slack @chat-adapter/teams @chat-adapter/gchat @chat-adapter/discord @chat-adapter/telegram

CLI

Scaffold a minimal Next.js bot app with create-chat-sdk:

bash
npx create-chat-sdk@latest my-bot

The CLI generates your Chat configuration, webhook route, .env.example file, dependencies, and optional Web adapter route from the adapter catalog. See the CLI docs for options and non-interactive usage.

Usage

typescript
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(), }); 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}`); });

See the Getting Started guide for a full walkthrough.

Adapters

Browse official, vendor-official, and community adapters on chat-sdk.dev/adapters. A cross-platform feature matrix is available at chat-sdk.dev/docs/adapters.

Features

  • Event handlers — mentions, messages, reactions, button clicks, slash commands, modals
  • AI streaming — stream LLM responses with native Slack streaming, Telegram private chat draft previews, and post+edit fallback
  • Cards — JSX-based interactive cards (Block Kit, Adaptive Cards, Google Chat Cards)
  • Actions — handle button clicks and dropdown selections
  • Modals — form dialogs with text inputs, dropdowns, and validation
  • Slash commands — handle /command invocations
  • Emoji — type-safe, cross-platform emoji with custom emoji support
  • File uploads — send and receive file attachments
  • Direct messages — initiate DMs programmatically
  • Ephemeral messages — user-only visible messages with DM fallback
  • Overlapping messages - burst, queue, debounce, drop, or process concurrent messages on the same thread

AI Coding Agents

If you use an AI coding agent such as OpenAI Codex, Claude Code, or Cursor, install the Chat SDK skill so it knows the SDK APIs, adapter patterns, and project conventions before writing code.

bash
npx skills add vercel/chat

The skill references bundled documentation in node_modules/chat/docs, plus adapter guides and starter templates in the published package.

You can also install the Vercel Plugin for a broader agent toolkit — it includes the Chat SDK skill alongside specialist agents, agent slash commands, and more:

bash
npx plugins add vercel/vercel-plugin

The plugin is optional; the skill alone is enough to build with Chat SDK.

For agent-readable documentation, see chat-sdk.dev/llms.txt (page index) or chat-sdk.dev/llms-full.txt (full text).

Documentation

Full documentation is available at chat-sdk.dev/docs.

Contributing

See CONTRIBUTING.md for development setup and the release process.

Support

For help or questions, see SUPPORT.md. To report a security vulnerability, see SECURITY.md.

License

MIT

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from vercel/chat via the GitHub API.Last fetched: 6/22/2026