PostableMessage
PostableMessage is the union of all message formats accepted by thread.post() and sent.edit().
PostableObject covers Plan (mutable task lists) and StreamingPlan (streams with platform-specific options). Both are documented below.
String
Raw text passed through as-is to the platform.
PostableRaw
Explicit raw text. Behaves the same as a plain string.
| Prop | Type | Description |
|---|---|---|
raw? | string | Text passed through as-is to the platform. |
attachments? | Attachment[] | Typed media attachments for adapters that support outgoing attachments. |
files? | FileUpload[] | Files to upload. |
aiGenerated? | boolean | undefined | Mark the message as AI-generated. Adapters with a native AI label (currently Teams) show it; others ignore it. |
PostableMarkdown
Markdown converted to each platform's native format.
| Prop | Type | Description |
|---|---|---|
markdown? | string | Markdown text, converted to platform format via mdast. |
attachments? | Attachment[] | Typed media attachments for adapters that support outgoing attachments. |
files? | FileUpload[] | Files to upload. |
aiGenerated? | boolean | undefined | Mark the message as AI-generated. Adapters with a native AI label (currently Teams) show it; others ignore it. |
PostableAst
mdast AST converted to each platform's native format. See Markdown for builder functions.
| Prop | Type | Description |
|---|---|---|
ast? | Root | mdast AST root node. |
attachments? | Attachment[] | Typed media attachments for adapters that support outgoing attachments. |
files? | FileUpload[] | Files to upload. |
aiGenerated? | boolean | undefined | Mark the message as AI-generated. Adapters with a native AI label (currently Teams) show it; others ignore it. |
PostableCard
Rich card with interactive elements. See Cards for components.
You can also pass a card with explicit fallback text:
| Prop | Type | Description |
|---|---|---|
card? | CardElement | Rich card element. |
fallbackText? | string | undefined | Plain text fallback for clients that cannot render cards. |
files? | FileUpload[] | Files to upload. |
aiGenerated? | boolean | undefined | Mark the message as AI-generated. Adapters with a native AI label (currently Teams) show it; others ignore it. |
Plan
A Plan is a step-by-step task list that mutates after posting. Each addTask / updateTask / complete call re-renders the same message in place. See Plan API for full usage.
Adapters that don't support PostableObject editing render the plan as fallback text and ignore subsequent mutations.
StreamingPlan
Wraps an async iterable with platform-specific streaming options. Use this when you need to pass options like task grouping or stop blocks through thread.post(). See Streaming with options.
| Prop | Type | Default | Description |
|---|---|---|---|
groupTasks? | "plan" | "timeline" | undefined | Slack: render task_update chunks as `"plan"` (single grouped block) or `"timeline"` (inline cards, default). | |
endWith? | unknown[] | undefined | Slack: Block Kit elements appended when the stream stops (e.g. retry / feedback buttons). | |
updateIntervalMs? | number | undefined | 500 | Post+edit adapters: minimum interval between update cycles in ms. |
AsyncIterable (streaming)
An async iterable of strings, StreamChunk objects, or stream events. The SDK streams the message in real time using platform-native APIs where available.
You can yield structured StreamChunk objects for rich content like task progress cards on platforms that support it (Slack). See Streaming for details.
Both AI SDK stream types and TanStack AI streams are supported:
When using fullStream, the SDK auto-detects text-delta and finish-step events, extracting text and inserting paragraph breaks between agent steps. AG-UI TEXT_MESSAGE_CONTENT and TEXT_MESSAGE_END events from TanStack AI are handled the same way: deltas become text and each message end becomes a paragraph break between tool-loop turns.
FileUpload
Used in the files field of any structured message format.
| Prop | Type | Description |
|---|---|---|
data? | Buffer | Blob | ArrayBuffer | Binary file data. |
filename? | string | Filename. |
mimeType? | string | undefined | MIME type (inferred from filename if not provided). |
Read more
Posting Messages
Different ways to render and send messages with thread.post().
Streaming
Stream real-time text responses from AI models and other async sources to chat platforms.
Cards
Send rich interactive cards with buttons, fields, and images across all platforms.
Transcripts (deprecated)
Configuration, methods, and entry shape for the deprecated cross-platform per-user transcript API.