chat-sdk

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

2|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zester4/zilmate --skill chat-sdk-zester4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chat-sdk
Source: https://github.com/zester4/zilmate/tree/main/.agents/skills/chat-sdk
Command: npx skills add https://github.com/zester4/zilmate --skill chat-sdk-zester4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires chat, @chat-adapter/slack, @chat-adapter/state-redis.

What problem does it solve? Building chat bots for platforms like Slack, Discord, Teams, or Telegram normally requires learning each platform's unique API, event model, and message format. This Skill provides unified guidance for the Chat SDK (chat npm package), letting you write bot logic once and deploy it across Slack, Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp. ## Core Features & Use Cases - Project Scaffolding: Generate a webhook-only Next.js bot project non-interactively with create-chat-sdk, choosing platform and state adapters via flags. - Unified Event Handling: Route mentions, direct messages, subscribed thread messages, reactions, slash commands, button actions, and modal submissions through normalized handlers. - Rich Interactions: Post JSX-based cards with buttons, selects, and tables, open modals, upload files, and stream AI responses from AI SDK agents directly into chat threads. - Use Case: A developer wants a Slack support bot that answers @-mentions with streamed AI responses and approval buttons. This Skill walks them through scaffolding the project, wiring webhook routes, and posting interactive cards. ## Quick Start Scaffold a new Slack bot by running npm create chat-sdk@latest with the slack adapter flag, then ask the assistant to wire an onNewMention handler that streams an AI reply.

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

Scaffold a project with npm create chat-sdk@latest -- my-bot --adapter slack memory -y, then register handlers like onNewMention and wire bot.webhooks.slack to a Next.js route. The generated project includes bot setup, webhook routes, and an .env.example.

How do I stream AI responses to a chat thread?

Pass any AsyncIterable of strings to thread.post(), such as result.fullStream from an AI SDK ToolLoopAgent. Prefer fullStream over textStream so step boundaries are preserved during streaming.

Which chat platforms does Chat SDK support?

Chat SDK supports Slack, Microsoft Teams, Google Chat, Discord, Telegram, GitHub, Linear, and WhatsApp through platform adapters. A static catalog of official and vendor-official adapters is available via the chat/adapters subpath.

Does Chat SDK support interactive cards and modals?

Yes, Chat SDK provides JSX components like Card, Button, Select, and Modal when jsxImportSource is set to chat in tsconfig.json. Button clicks and modal submissions are routed through onAction and onModalSubmit handlers.

What state adapter should I use for production bots?

Use a persistent state adapter such as @chat-adapter/state-redis instead of the default memory adapter. State adapters handle thread subscriptions, distributed locking, and message deduplication across restarts and multiple instances.