chat-sdk

Build multi-platform chat bots for Slack, Teams, Discord, and Telegram with one TypeScript codebase.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/AarnavBaddam/skills --skill chat-sdk-aarnavbaddam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chat-sdk
Source: https://github.com/AarnavBaddam/skills/tree/main/chat-sdk
Command: npx skills add https://github.com/AarnavBaddam/skills --skill chat-sdk-aarnavbaddam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chat, @chat-adapter/slack, @chat-adapter/teams, @chat-adapter/gchat, @chat-adapter/discord, @chat-adapter/github, @chat-adapter/linear, @chat-adapter/telegram, @chat-adapter/whatsapp, @chat-adapter/state-redis, @chat-adapter/state-ioredis, @chat-adapter/state-pg, @chat-adapter/state-memory.

What problem does it solve? Building chat bots for multiple platforms normally requires learning each platform's API, webhook format, and message model separately. This Skill provides expert guidance for the Vercel Chat SDK, which unifies Slack, Microsoft Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp behind a single TypeScript API. ## Core Features & Use Cases - Unified Bot Logic: Write event handlers once (mentions, DMs, slash commands, reactions, modals) and deploy them across every supported platform via adapters. - Streaming and AI Integration: Stream LLM responses directly into threads using the AI SDK, with post-and-edit fallback for platforms without native streaming. - JSX Cards and Modals: Compose interactive cards, buttons, selects, and modal forms with a JSX component model that renders per-platform. - Use Case: A developer needs a support bot that answers questions in both Slack and Discord. Using this Skill's guidance, they configure two adapters on one Chat instance, subscribe to threads on first mention, and stream AI-generated replies to both platforms from a single codebase. ## Quick Start Ask the AI to scaffold a Chat SDK bot with a Slack adapter that responds to new mentions and streams an AI reply into the thread.

Frequently Asked Questions about chat-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Slack bot with the Vercel Chat SDK?

Create a Chat instance with createSlackAdapter from @chat-adapter/slack, register handlers like onNewMention, and route HTTP requests to bot.webhooks.slack in your framework. The same bot logic can later add Teams or Discord adapters without changes.

How do I stream AI responses into a chat thread?

Pass any AsyncIterable of strings to thread.post or thread.stream. With the AI SDK, prefer result.fullStream over result.textStream so step boundaries are preserved, and configure streamingUpdateIntervalMs for post-and-edit fallback cadence.

Which platforms does the Chat SDK support?

Official adapters cover Slack, Microsoft Teams, Google Chat, Discord, GitHub, Linear, Telegram, and WhatsApp Business Cloud. Community adapters add Matrix, iMessage, Webex, and others, with Instagram, Signal, X, and Messenger listed as coming soon.

What state backends can I use for thread subscriptions and dedupe?

Official state adapters include Redis, ioredis, PostgreSQL, and in-memory implementations. They handle persistence for subscriptions, locks, deduplication, and thread state, with dedupeTtlMs configurable on the Chat instance.

Does structured streaming work on every platform?

No. Structured StreamChunk support is Slack-only; other adapters ignore non-text chunks and fall back to plain text streaming. Text streaming via post-and-edit works across platforms, controlled by streamingUpdateIntervalMs.

How do I add interactive buttons and modals to chat messages?

Set jsxImportSource to chat in tsconfig.json, then compose Card, Button, Actions, Select, and Modal components in JSX. Handle interactions with onAction, onModalSubmit, and onModalClose handlers filtered by action or callback IDs.