# Chat SDK 101

> Unified TypeScript SDK overview for multi-platform chat bot development

This reference outlines the core architecture and usage patterns of Vercel's Chat SDK for TypeScript. It covers how to route events and build bots across Slack, Microsoft Teams, Google Chat, and Discord using unified adapters and handlers. It also details native streaming support alongside the Vercel AI SDK and pluggable state management.

## How it works

Main entry: Chat class that coordinates adapters and routes events. Adapters: Slack, Teams, Google Chat, Discord — createSlackAdapter etc. State: pluggable layer, createRedisState. Handlers: bot.onNewMention, bot.onSubscribedMessage, bot.onReaction, thread.subscribe/post/startTyping, channel.post. Posting formats: plain string, Markdown, structured AST (root/paragraph/text/strong/link), and JSX (Card, Text, Actions, Button). Streaming: pass AI SDK textStream to thread.post; supports ToolLoopAgent from 'ai' (anthropic/claude-4.5-sonnet). Guides: Slack bot with Next.js + Redis, Discord support bot with Nuxt + AI SDK, code review bot with Hono + Vercel Sandbox. Install the Chat SDK skill: npx skills add vercel/chat.

## What it is for

- Build cross-platform conversational bots for Slack, Teams, Google Chat, and Discord with a single codebase
- Stream LLM completions into chat threads using Vercel AI SDK integration
- Persist bot conversational context across channels using pluggable state adapters like Redis

## Key points

- Core Chat coordinator class for unified adapter routing
- Prebuilt adapters for Slack, Discord, Google Chat, and Microsoft Teams
- Pluggable state persistence layer including Redis support
- Unified event handlers for mentions, subscribed messages, and reactions
- Flexible output rendering via plain text, Markdown, structured ASTs, or JSX components
- Native stream handling for AI SDK text streams and ToolLoopAgent

## Pricing

Open source

## Details

- Type: Tip
- Category: [Development](https://xiry.app/topics/development.md)
- Open source: yes
- Platforms: Code library
- For: TypeScript developers building AI agents and chat bots across team messaging platforms
- Alternative to: Botpress, Microsoft Bot Framework
- Tags: typescript, bots, slack, discord, ai sdk, vercel

## Why it was saved

- [@haydenbleasel, 24 February 2026](https://x.com/haydenbleasel/status/2026359649499492395): Codebase for building bots across Slack, Teams, Google Chat, Discord — reusable patterns and guides

## Compare

- [Alternatives to Botpress](https://xiry.app/alternatives/botpress.md)

## Related

- [Vercel Chat SDK Patterns and Code Snippets](https://xiry.app/resources/vercel-chat-sdk-patterns-and-code-snippets): Code patterns for building cross-platform chat bots with Vercel Chat SDK (Tip, Open source)
- [Chat SDK](https://xiry.app/resources/chat-sdk): Universal TypeScript layer for building bots and agents across chat platforms (GitHub repo, Open source)
- [@json-render/react-pdf](https://xiry.app/resources/json-render-react-pdf): Render structured JSON specifications into PDFs using React PDF (GitHub repo, Open source)
- [Domain SDK](https://xiry.app/resources/domain-sdk): TypeScript SDK for adding and managing custom customer domains across platforms (GitHub repo, Open source)
- [Natural Language Postgres](https://xiry.app/resources/natural-language-postgres): Query a Postgres database with natural language and visualize results. (Web app, Open source)
- [json-render](https://xiry.app/resources/json-render): Generative UI framework rendering LLM JSON streams into predefined components safely (Web app, Open source)

Updated 11 October 2026. Page: https://xiry.app/resources/chat-sdk-101

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
