llms.txt
# 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().
- [Vercel Connect](https://chat-sdk.dev/docs/vercel-connect.md): Authenticate Slack, Microsoft Teams, GitHub, Linear, Discord, Notion, and Telegram adapters with Vercel Connect, using short-lived runtime tokens for outbound calls and OIDC-verified inbound webhooks where supported.
- [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, which provides Vitest factories, custom matchers, and a setup file.
## AI
- [Overview](https://chat-sdk.dev/docs/ai.md): AI utilities that ship with Chat SDK, including agent tools, message conversion, and supporting types.
- [AI SDK Tools](https://chat-sdk.dev/docs/ai/ai-sdk-tools.md): Let an AI agent post messages, send DMs, react, edit, and delete inside your workspace, with approval required for writes by default.
- [toAiMessages](https://chat-sdk.dev/docs/ai/to-ai-messages.md): Convert Chat SDK messages to AI SDK conversation format.
- [TanStack AI](https://chat-sdk.dev/docs/ai/tanstack-ai.md): Feed thread history into TanStack AI's chat() and give it Chat SDK tools, with no runtime dependency on @tanstack/ai.
- [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, adapter tiers, and where to find platform, state, and catalog guides.
- [Adapter Catalog](https://chat-sdk.dev/docs/adapter-catalog.md): Use @chat-adapter/catalog to list Chat SDK adapters, check their capabilities, and read setup requirements without importing adapter packages.
- [Platform Adapters](https://chat-sdk.dev/docs/platform-adapters.md): Platform adapters connect your bot to messaging platforms such as Slack, Teams, and Google Chat.
- [State Adapters](https://chat-sdk.dev/docs/state-adapters.md): State adapters store thread subscriptions, distributed locks, and cached data for your bot.
## 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.
- [History](https://chat-sdk.dev/docs/history.md): Store and retrieve message history across user, thread, and channel scopes.
- [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, with the burst, queue, debounce, drop, and concurrent strategies.
## 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.
- [Approvals](https://chat-sdk.dev/docs/approvals.md): Pause a durable workflow until a human approves it in chat.
- [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 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 class that coordinates adapters, state, and event handlers for 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 (deprecated)](https://chat-sdk.dev/docs/api/transcripts.md): Configuration, methods, and entry shape for the deprecated cross-platform per-user transcript API.
- [History](https://chat-sdk.dev/docs/api/history.md): API reference for bot.history, covering the user, thread, and channel scopes.
- [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 an adapter](https://chat-sdk.dev/docs/contributing/building.md): Learn how to build 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 adapter.
- [Publishing your adapter](https://chat-sdk.dev/docs/contributing/publishing.md): Package, version, and publish your community Chat SDK adapter to npm.
- [List a vendor-official adapter](https://chat-sdk.dev/docs/contributing/vendor-official.md): Qualify for the vendor-official tier and add your adapter to the Chat SDK docs, @chat-adapter/catalog, create-chat-sdk, and eve.dev/integrations.
## 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.
- [Gmail](https://chat-sdk.dev/adapters/official/gmail.md): Gmail adapter for Chat SDK with mailbox notifications and threaded email replies.
- [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.
- [Notion](https://chat-sdk.dev/adapters/official/notion.md): Respond to comments on Notion pages and discussion threads.
- [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, MMS, and RCS adapter for Chat SDK.
- [Messenger](https://chat-sdk.dev/adapters/official/messenger.md): Facebook Messenger adapter using the Messenger Platform API.
- [Instagram](https://chat-sdk.dev/adapters/official/instagram.md): Instagram Direct Messages adapter using Meta's Instagram Messaging API.
- [X](https://chat-sdk.dev/adapters/official/x.md): X (Twitter) adapter using the X API v2 and the X Activity API.
- [XChat](https://chat-sdk.dev/adapters/official/xchat.md): XChat (encrypted messaging) adapter using the X API v2 chat endpoints and the X Activity API.
- [Twitch](https://chat-sdk.dev/adapters/official/twitch.md): Twitch adapter using EventSub webhooks and the Helix Chat 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 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, and 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 bots 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 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 with 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): WhatsApp adapter for Chat SDK built on Kapso. 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.
- [Photon](https://chat-sdk.dev/adapters/vendor-official/photon.md): iMessage adapter for Chat SDK, built and maintained by Photon. Cloud, self-hosted, and on-device (local, macOS) iMessage over spectrum-ts, with HMAC-signed webhooks, tapback reactions, and DM sends that work from a cold webhook delivery.
- [Cloudflare Agents](https://chat-sdk.dev/adapters/vendor-official/cloudflare-agents.md): Vendor-official state adapter for Chat SDK backed by Cloudflare Agents. Stores subscriptions, locks, queues, dedupe keys, thread and channel state, transcripts, and message history in Durable Object SQLite via ChatSdkStateAgent sub-agents.
- [Dial](https://chat-sdk.dev/adapters/vendor-official/dial.md): SMS, MMS, iMessage, and inbound voice-call transcripts for Chat SDK, built and maintained by Dial. The same handlers that answer Slack, Teams, or Discord answer phone traffic, with signed webhooks, one thread per phone number pair, and replies sent through @getdial/sdk.
## 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.
- [LINE](https://chat-sdk.dev/adapters/community/line.md): Community LINE Messaging API adapter for Chat SDK with Flex Message cards, inbound media, action postbacks, and typing indicators.
- [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 over WebSocket, with QR or 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.
- [QQ Bot](https://chat-sdk.dev/adapters/community/qq.md): Community QQ Bot adapter for Chat SDK with WebSocket and webhook modes, multi-scene support (DM, group, text channel), rich media, and Ed25519 signature verification.
- [WeCom](https://chat-sdk.dev/adapters/community/wecom.md): Community WeCom (企业微信) adapter for Chat SDK covering group webhook bots, smart bots, and apps, with template cards, rich media, and AES-256-CBC encryption.
- [Zaileys (WhatsApp)](https://chat-sdk.dev/adapters/community/zaileys.md): Community WhatsApp adapter for Chat SDK built on Zaileys, a wrapper around the unofficial WhatsApp Web API. Self-hosted over WebSocket, with QR or pairing-code auth, stored message history, native buttons from Cards, decrypted poll votes, and scheduled messages.
- [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 no 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.