网页
综合
更新时间 2026-11-13 17:06:02
Introduction | Chat SDK
自动蜘蛛
chat-sdk.dev
正文约 2170 字
Chat SDK is a TypeScript library for building chat bots that run on multiple platforms from one codebase. You write the bot logic once and deploy it to any platform that has an adapter.
Each chat platform has its own API, webhook format, and quirks, so supporting several of them usually means maintaining separate code for each. Chat SDK puts those differences behind adapters and gives you one interface for:
Chat SDK has three core concepts:
Adapter and state factories read their credentials from environment variables such as SLACK_BOT_TOKEN, SLACK_SIGNING_SECRET, and REDIS_URL, so the example above passes no options. Pass explicit values to override them.
Install only the adapters you need. Browse the full catalog on the Adapters page, and compare official platform features on Platform Adapters.
List every adapter with its capabilities and setup requirements from one dependency-free package.
Connect your bot to messaging platforms with webhook verification, parsing, and native formatting.
Persist thread subscriptions, distributed locks, and caches across restarts.
If you use an AI coding agent such as OpenAI Codex, Claude Code, or Cursor, install the Chat SDK skill so it knows the SDK's APIs, adapter patterns, and project conventions before it writes code.
The skill references bundled documentation in node_modules/chat/docs, plus adapter guides and starter templates in the published package.
You can also install the Vercel Plugin for a broader agent toolkit. It includes the Chat SDK skill along with specialist agents and slash commands:
For agent-readable documentation, see llms.txt (page index) or llms-full.txt (full text).
Ship an adapter for a new platform, or list a vendor-maintained one in the catalog.
Implement the Adapter interface for any messaging platform or state backend.
How platform vendors qualify and list a maintained adapter in the Vendor Official tier.
Pick a guide to start building with Chat SDK.
Initialize the Chat class with adapters, state, and configuration options.
API reference for the Chat SDK core package.
AI utilities that ship with Chat SDK, including agent tools, message conversion, and supporting types.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。