chat-sdk

Build multi-platform chat bots with the Chat SDK TypeScript library.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/sharad07072007/paras --skill chat-sdk-sharad07072007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chat-sdk
Source: https://github.com/sharad07072007/paras/tree/main/.agents/plugins/vercel/skills/chat-sdk/upstream
Command: npx skills add https://github.com/sharad07072007/paras --skill chat-sdk-sharad07072007

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building chat bots for platforms like Slack, Teams, Discord, or Telegram normally requires learning each platform's unique API, event model, and message format. This Skill provides guidance for the Chat SDK (chat npm package), which unifies bot logic across eight platforms so you write your bot once and deploy it everywhere. ## Core Features & Use Cases - Cross-Platform Bot Development: Handle mentions, direct messages, subscribed threads, reactions, slash commands, cards, and modals through one unified API with adapters for Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. - AI Streaming Responses: Stream LLM output (e.g., from the Vercel AI SDK) directly into chat threads with thread.post() and thread.stream(). - Rich Interactive UI: Build JSX-based cards, buttons, selects, and modals that render natively on each platform. - Custom Adapter Authoring: Create your own platform or state adapters (Redis, PostgreSQL, memory) using documented interfaces. - Use Case: A developer wants a support bot that answers questions in both Slack and Discord. Using this Skill, they configure two adapters on a single Chat instance, write one onNewMention handler, and stream AI responses to both platforms. ## Quick Start Ask the AI to scaffold a Chat SDK bot with a Slack adapter that responds to mentions with a streamed AI response.

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 Chat SDK?

Create a Chat instance with createSlackAdapter from @chat-adapter/slack, register handlers like onNewMention, and wire bot.webhooks.slack to your HTTP framework route. Add a state adapter such as createRedisState for subscriptions and deduplication.

How do I stream AI responses to a chat platform?

Pass any AsyncIterable<string> to thread.post() or thread.stream(). With the Vercel AI SDK, prefer result.fullStream over result.textStream so step boundaries are preserved during streaming.

Which chat 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.

Can I use the Chat SDK with Next.js or Nuxt?

Yes. Each registered adapter exposes bot.webhooks.<name>, which you wire directly to your framework's HTTP routes. The bundled docs include framework-specific guides for Slack with Next.js and Discord with Nuxt.

What state adapters are available for persistence?

Official state adapters include Redis (@chat-adapter/state-redis), ioredis, PostgreSQL (@chat-adapter/state-pg), and in-memory (@chat-adapter/state-memory). They handle subscriptions, locks, deduplication, and thread state.

How do I build a custom Chat SDK adapter?

Read the contributing docs bundled in node_modules/chat/docs/contributing, then implement request verification, webhook parsing, message and thread operations, ID encoding, and a format converter using BaseFormatConverter from the chat package.