Chat SDK
A unified TypeScript SDK for building chat bots across multiple platforms. Write your bot logic once, deploy everywhere.Why Chat SDK?
Write Once, Deploy Everywhere
Build your bot logic once with a unified API. Deploy to Slack, Teams, Google Chat, Discord, Telegram, GitHub, and Linear without platform-specific code.
Type-Safe & Modern
Built with TypeScript for full type safety. Async/await throughout. IntelliSense for all platform features.
AI-Ready Streaming
Native support for streaming AI responses. Works with any LLM provider. Platform-native streaming on Slack, fallback post+edit on others.
Rich Interactive Components
JSX-based cards with buttons, modals, and forms. Automatically adapted to each platform’s native format (Block Kit, Adaptive Cards, etc).
Supported Platforms
Chat SDK supports 7 major chat platforms with a consistent API:| Platform | Package | Mentions | Reactions | Cards | Modals | Streaming | DMs |
|---|---|---|---|---|---|---|---|
| Slack | @chat-adapter/slack | ✓ | ✓ | ✓ | ✓ | Native | ✓ |
| Microsoft Teams | @chat-adapter/teams | ✓ | Read-only | ✓ | ✗ | Post+Edit | ✓ |
| Google Chat | @chat-adapter/gchat | ✓ | ✓ | ✓ | ✗ | Post+Edit | ✓ |
| Discord | @chat-adapter/discord | ✓ | ✓ | ✓ | ✗ | Post+Edit | ✓ |
| Telegram | @chat-adapter/telegram | ✓ | ✓ | Partial | ✗ | Post+Edit | ✓ |
| GitHub | @chat-adapter/github | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ |
| Linear | @chat-adapter/linear | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ |
Quick Example
Key Features
Getting Started
Install the SDK and create your first bot in minutes
Basic Usage
Learn core concepts: event handlers, threads, messages, and state management
Event Handlers
Respond to mentions, messages, reactions, button clicks, slash commands, and modals
AI Streaming
Stream LLM responses with native Slack streaming and automatic fallback for other platforms
Interactive Cards
Build rich UI with JSX cards, buttons, and form modals
Cross-Platform Emoji
Type-safe emoji that work consistently across all platforms
Architecture
Chat SDK uses a clean adapter pattern:- Core SDK (
chat) - Platform-agnostic bot logic, types, and utilities - Adapters - Platform-specific implementations (Slack, Teams, etc)
- State Adapters - Persistence layer for subscriptions and locking (Redis, in-memory)
The SDK uses mdast (Markdown AST) as the canonical message format. Each adapter converts to/from platform-specific formats automatically.