# Chat SDK Documentation

> A unified TypeScript SDK for building chat bots and agents across Slack, Microsoft Teams, Google Chat, Discord, Telegram, WhatsApp, and more — with type-safe handlers, JSX cards, and AI streaming.

This index lists the documentation pages in plain markdown. Each link points to the markdown version of a page. For the full text of every page concatenated into a single file, see the llms-full.txt link under Optional.

## Documentation

- [Introduction](https://chat-sdk.dev/docs.md): A unified SDK for building chat bots across Slack, Microsoft Teams, Google Chat, Discord, Telegram, and more.
- [Getting Started](https://chat-sdk.dev/docs/getting-started.md): Pick a guide to start building with Chat SDK.
- [CLI](https://chat-sdk.dev/docs/create-chat-sdk.md): Scaffold a Chat SDK bot app with a single command.

## Usage

- [Creating a Chat Instance](https://chat-sdk.dev/docs/usage.md): Initialize the Chat class with adapters, state, and configuration options.
- [Threads, Messages, and Channels](https://chat-sdk.dev/docs/threads-messages-channels.md): Work with threads, messages, and channels across platforms.
- [Handling Events](https://chat-sdk.dev/docs/handling-events.md): Register handlers for mentions, messages, reactions, member joins, and platform-specific events.
- [Posting Messages](https://chat-sdk.dev/docs/posting-messages.md): Different ways to render and send messages with thread.post().
- [Error Handling](https://chat-sdk.dev/docs/error-handling.md): Handle rate limits, unsupported features, and other errors from adapters.
- [Testing](https://chat-sdk.dev/docs/testing.md): Test your bot handlers and custom adapters with @chat-adapter/tests — Vitest factories, custom matchers, and a setup file.

## AI

- [Overview](https://chat-sdk.dev/docs/ai.md): AI utilities that ship with Chat SDK — agent tools, message conversion, and supporting types.
- [AI SDK Tools](https://chat-sdk.dev/docs/ai/ai-sdk-tools.md): Give an AI agent the ability to operate inside your workspace. Post messages, send DMs, react, edit, delete; all with built-in approval gates.
- [toAiMessages](https://chat-sdk.dev/docs/ai/to-ai-messages.md): Convert Chat SDK messages to AI SDK conversation format.
- [Types](https://chat-sdk.dev/docs/ai/types.md): TypeScript types exported from the chat/ai subpath.

## Adapters

- [Overview](https://chat-sdk.dev/docs/adapters.md): Overview of Chat SDK adapters and the static adapter catalog.
- [Platform Adapters](https://chat-sdk.dev/docs/platform-adapters.md): Platform-specific adapters that connect your bot to any messaging platform.
- [Slack Low-Level APIs](https://chat-sdk.dev/docs/slack-primitives.md): Use Slack request verification, formatting, Web API, and Block Kit helpers without the full Chat runtime.
- [Teams Low-Level APIs](https://chat-sdk.dev/docs/teams-primitives.md): Use Teams Activity parsing, Bot Connector calls, Graph reads, formatting, Adaptive Cards, and Task Module helpers without the full Chat runtime.
- [State Adapters](https://chat-sdk.dev/docs/state-adapters.md): Pluggable state adapters for thread subscriptions, distributed locking, and caching.

## Messaging

- [Streaming](https://chat-sdk.dev/docs/streaming.md): Stream real-time text responses from AI models and other async sources to chat platforms.
- [Direct Messages](https://chat-sdk.dev/docs/direct-messages.md): Initiate DM conversations with users programmatically.
- [Ephemeral Messages](https://chat-sdk.dev/docs/ephemeral-messages.md): Send messages visible only to a specific user.
- [File Uploads](https://chat-sdk.dev/docs/files.md): Send and receive files across chat platforms.
- [Conversation History](https://chat-sdk.dev/docs/conversation-history.md): Persist messages per user across every platform — for LLM context, audit, or compliance.
- [Message Subject](https://chat-sdk.dev/docs/subject.md): Fetch the parent resource that a message is about.
- [Overlapping Messages](https://chat-sdk.dev/docs/concurrency.md): Control how overlapping messages on the same thread are handled - burst, queue, debounce, drop, or process concurrently.

## Interactivity

- [Cards](https://chat-sdk.dev/docs/cards.md): Send rich interactive cards with buttons, fields, and images across all platforms.
- [Modals](https://chat-sdk.dev/docs/modals.md): Collect structured user input through modal dialogs with text fields, dropdowns, and validation.
- [Actions](https://chat-sdk.dev/docs/actions.md): Handle button clicks and interactive card events across platforms.
- [Slash Commands](https://chat-sdk.dev/docs/slash-commands.md): Handle slash command invocations and respond with messages or modals.
- [Emoji](https://chat-sdk.dev/docs/emoji.md): Type-safe, cross-platform emoji that automatically convert to each platform's format.

## API Reference

- [Overview](https://chat-sdk.dev/docs/api.md): API reference for the Chat SDK core package.
- [Chat](https://chat-sdk.dev/docs/api/chat.md): The main entry point for creating a multi-platform chat bot.
- [Thread](https://chat-sdk.dev/docs/api/thread.md): Represents a conversation thread with methods for posting, subscribing, and state management.
- [Channel](https://chat-sdk.dev/docs/api/channel.md): Channel container that holds threads, with methods for listing, posting, and iteration.
- [Message](https://chat-sdk.dev/docs/api/message.md): Normalized message format with text, AST, author, and metadata.
- [PostableMessage](https://chat-sdk.dev/docs/api/postable-message.md): The union type accepted by thread.post() for sending messages.
- [Transcripts](https://chat-sdk.dev/docs/api/transcripts.md): Cross-platform per-user transcript persistence — configuration, methods, and entry shape.
- [Cards](https://chat-sdk.dev/docs/api/cards.md): Rich card components for cross-platform interactive messages.
- [Markdown](https://chat-sdk.dev/docs/api/markdown.md): AST builder functions and utilities for programmatic message formatting.
- [Modals](https://chat-sdk.dev/docs/api/modals.md): Modal form components for collecting user input.

## Contributing

- [Building a community adapter](https://chat-sdk.dev/docs/contributing/building.md): Learn how to build, package, and publish your own Chat SDK adapter for any messaging platform.
- [Testing adapters](https://chat-sdk.dev/docs/contributing/testing.md): Write unit tests, integration tests, and replay tests for community Chat SDK adapters.
- [Documenting your adapter](https://chat-sdk.dev/docs/contributing/documenting.md): Write a README, configuration reference, and usage examples for your community adapter.
- [Publishing your adapter](https://chat-sdk.dev/docs/contributing/publishing.md): Package, version, and publish your community Chat SDK adapter to npm.

## Official Adapters

- [Slack](https://chat-sdk.dev/adapters/official/slack.md): Slack adapter with single-workspace and multi-workspace OAuth support.
- [Microsoft Teams](https://chat-sdk.dev/adapters/official/teams.md): Microsoft Teams adapter with Adaptive Cards and modal support.
- [Google Chat](https://chat-sdk.dev/adapters/official/gchat.md): Google Chat adapter with service account auth and optional Pub/Sub.
- [Discord](https://chat-sdk.dev/adapters/official/discord.md): Discord adapter with HTTP Interactions and Gateway WebSocket support.
- [Telegram](https://chat-sdk.dev/adapters/official/telegram.md): Telegram adapter for Chat SDK with webhook and polling modes.
- [GitHub](https://chat-sdk.dev/adapters/official/github.md): Respond to @mentions in PR and issue comment threads.
- [Linear](https://chat-sdk.dev/adapters/official/linear.md): Respond to @mentions in Linear issue comment threads and agent sessions.
- [WhatsApp Business Cloud](https://chat-sdk.dev/adapters/official/whatsapp.md): WhatsApp Business Cloud adapter for Chat SDK.
- [Twilio](https://chat-sdk.dev/adapters/official/twilio.md): Twilio SMS and MMS adapter for Chat SDK.
- [Messenger](https://chat-sdk.dev/adapters/official/messenger.md): Facebook Messenger adapter using the Messenger Platform API.
- [Web](https://chat-sdk.dev/adapters/official/web.md): Web chat adapter that speaks the AI SDK useChat protocol.
- [Memory](https://chat-sdk.dev/adapters/official/memory.md): In-memory state adapter for development and testing.
- [Redis](https://chat-sdk.dev/adapters/official/redis.md): Production state adapter using the official `redis` package.
- [ioredis](https://chat-sdk.dev/adapters/official/ioredis.md): Redis state adapter using ioredis with Cluster and Sentinel support.
- [PostgreSQL](https://chat-sdk.dev/adapters/official/postgres.md): Production state adapter using PostgreSQL via node-postgres.

## Vendor-Official Adapters

- [Liveblocks](https://chat-sdk.dev/adapters/vendor-official/liveblocks.md): Chat SDK adapter backed by Liveblocks Comments. Build bots that read and post in Liveblocks comment threads using the Chat SDK Channel/Thread/Message model.
- [Resend](https://chat-sdk.dev/adapters/vendor-official/resend.md): Bidirectional email adapter for Chat SDK. Receive emails via Resend webhooks and send rich HTML emails via the Resend API.
- [Novu](https://chat-sdk.dev/adapters/vendor-official/novu.md): Multi-channel adapter for Chat SDK backed by Novu. Put your agent in front of customers on Slack, Microsoft Teams, WhatsApp, Telegram, and email with one handler set, while Novu manages credentials, identity, and delivery.
- [Sendblue](https://chat-sdk.dev/adapters/vendor-official/sendblue.md): Sendblue adapter for Chat SDK. Send and receive iMessage, SMS, and RCS through Sendblue's hosted gateway.
- [Zernio](https://chat-sdk.dev/adapters/vendor-official/zernio.md): Multi-platform messaging adapter for Chat SDK. Build chatbots that work across Instagram, Facebook, Twitter/X, Telegram, WhatsApp, Bluesky, and Reddit through a single integration.
- [Beeper Matrix](https://chat-sdk.dev/adapters/vendor-official/matrix.md): Matrix adapter for Chat SDK that runs over Matrix sync, with first-class support for E2EE, Beeper conversations, and bridged networks like WhatsApp, Telegram, Instagram, and Signal.
- [AgentPhone](https://chat-sdk.dev/adapters/vendor-official/agentphone.md): Unified SMS, MMS, iMessage, and voice adapter for Chat SDK. Send and receive messages across all channels with a single integration.
- [Lark / Feishu](https://chat-sdk.dev/adapters/vendor-official/lark.md): Chat SDK adapter for Lark / Feishu. WebSocket long-connection event subscription, native cardkit typewriter streaming, interactive cards, and reactions.
- [Velt](https://chat-sdk.dev/adapters/vendor-official/velt.md): Chat SDK adapter backed by Velt Comments. Build bots that read, reply, mention, and start threads in anchored comments across documents, rich-text editors, canvases, PDFs, and video. Includes per-comment document context and a streaming AI reply flow.
- [Kapso](https://chat-sdk.dev/adapters/vendor-official/kapso.md): Kapso-first WhatsApp adapter for Chat SDK. Receive Kapso platform webhooks, reply through Chat SDK threads, send cards/buttons and media, and fetch Kapso conversation history.
- [Linq](https://chat-sdk.dev/adapters/vendor-official/linq.md): iMessage and SMS adapter for Chat SDK, built and maintained by Linq. Send and receive texts, media, and tapback reactions over Apple Messages and SMS, with HMAC-verified webhooks and stable threading.

## Community Adapters

- [Webex](https://chat-sdk.dev/adapters/community/webex.md): Community Webex adapter for Chat SDK with support for spaces, threads, adaptive cards, and modals.
- [Baileys (WhatsApp)](https://chat-sdk.dev/adapters/community/baileys.md): Community WhatsApp adapter for Chat SDK using Baileys, the unofficial WhatsApp Web API. Self-hosted via WebSocket, with QR / pairing-code auth, multi-account support, and WhatsApp-specific extensions.
- [Blooio](https://chat-sdk.dev/adapters/community/blooio.md): Community Blooio adapter for Chat SDK. Send and receive iMessage, RCS, and SMS through Blooio's hosted gateway.
- [Zalo](https://chat-sdk.dev/adapters/community/zalo.md): Community Zalo Bot adapter for Chat SDK using the Zalo Bot Platform API.
- [Mattermost](https://chat-sdk.dev/adapters/community/mattermost.md): Community Mattermost adapter for Chat SDK with support for posts, edits, reactions, ephemeral messages, typing indicators, file uploads, and interactive actions.
- [Weixin](https://chat-sdk.dev/adapters/community/weixin.md): Community Weixin (WeChat) iLink bot adapter for Chat SDK with long polling, QR login, media, and typing indicators.
- [Cloudflare Durable Objects](https://chat-sdk.dev/adapters/community/cloudflare-do.md): Community state adapter for Chat SDK backed by a SQLite-powered Cloudflare Durable Object. Persistent subscriptions, distributed locking, queues, lists, and caching with zero external dependencies.
- [MySQL](https://chat-sdk.dev/adapters/community/mysql.md): Community MySQL state adapter for Chat SDK built on mysql2. Persistence, distributed locking, caching, lists, and queues without a separate Redis dependency.

## Optional

- [Full documentation](https://chat-sdk.dev/llms-full.txt): Every documentation page concatenated into a single file.
- [Documentation sitemap](https://chat-sdk.dev/sitemap.md): Semantic index of every documentation page.
