Overview
API reference for the Chat SDK core package.
Complete API reference for the chat package. All exports are available from the top-level import:
import { Chat, root, paragraph, text, Card, Button, emoji } from "chat";Core
| Export | Description |
|---|---|
Chat | Main class — registers adapters, event handlers, and webhook routing |
Thread | Conversation thread with methods for posting, subscribing, and state |
Channel | Channel/conversation container that holds threads |
Message | Normalized message with text, AST, author, and metadata |
ScheduledMessage | Returned by thread.schedule() / channel.schedule() with cancel() |
Message formats
| Export | Description |
|---|---|
PostableMessage | Union type accepted by thread.post() |
Plan | Step-by-step task list that mutates after posting |
StreamingPlan | Wraps an async iterable with platform-specific streaming options |
Cards | Rich card components — Card, Text, Button, Actions, etc. |
Markdown | AST builder functions — root, paragraph, text, strong, etc. |
Modals | Modal form components — Modal, TextInput, Select, etc. |
AI utilities
toAiMessages, createChatTools, and the supporting types live in the chat/ai subpath — see the AI section for the full reference.
Read more
Chat
The main entry point for creating a multi-platform chat bot.
Thread
Represents a conversation thread with methods for posting, subscribing, and state management.
Channel
Channel container that holds threads, with methods for listing, posting, and iteration.
Message
Normalized message format with text, AST, author, and metadata.