Channel
A Channel represents a channel or conversation container that holds threads. Thread and Channel both extend the Postable interface, so they share members such as post(), state, and messages.
Get a channel via thread.channel or chat.channel():
Properties
| Prop | Type | Description |
|---|---|---|
id? | string | Channel ID, such as "slack:C123ABC" or "gchat:spaces/ABC123". |
name? | string | null | Channel name, such as "#general". `null` until `fetchMetadata()` is called. |
adapter? | Adapter | The platform adapter this channel belongs to. |
isDM? | boolean | Whether this is a direct message conversation. |
Channel ID format
Channel IDs are derived from thread IDs by dropping the thread-specific part. By default, the channel ID is the first two colon-separated segments. Adapters can override this, as the Teams and Discord rows show:
| Platform | Thread ID | Channel ID |
|---|---|---|
| Slack | slack:C123ABC:1234567890.123456 | slack:C123ABC |
| Teams | teams:{base64(conversationId)}:{base64(serviceUrl)}[:{conversationType}] | teams:{base64(conversationId)}:{base64(serviceUrl)}[:{conversationType}] |
| Google Chat | gchat:spaces/ABC123:{base64} | gchat:spaces/ABC123 |
| Discord | discord:{guildId}:{channelId}[:{threadId}] | discord:{guildId}:{channelId} |
messages
Iterate top-level channel messages, newest first. Thread replies are not included. Pages are fetched lazily as you iterate.
threads
Iterate threads in the channel, most recently active first. Returns lightweight ThreadSummary objects.
ThreadSummary
| Prop | Type | Description |
|---|---|---|
id? | string | Full thread ID. |
rootMessage? | Message | The first message of the thread. |
replyCount? | number | undefined | Number of replies, when available. |
lastReplyAt? | Date | undefined | Timestamp of most recent reply. |
post
Post a top-level message to the channel, outside any thread.
Accepts the same message formats as thread.post(). See PostableMessage.
schedule
Schedule a top-level message to the channel for future delivery. Only the Slack adapter supports this. Other adapters throw NotImplementedError.
Accepts the same message formats as channel.post(), except streams. See ScheduledMessage for the return type.
fetchMetadata
Fetch channel metadata from the platform.
ChannelInfo
| Prop | Type | Description |
|---|---|---|
id? | string | Channel ID. |
name? | string | undefined | Channel name. |
isDM? | boolean | undefined | Whether this is a direct message. |
memberCount? | number | undefined | Number of members in the channel. |
metadata? | Record<string, unknown> | Platform-specific metadata. |
state
Store typed, per-channel state. Works the same as thread state, with a 30-day TTL.
postEphemeral
Post a message visible only to a specific user.
startTyping
Show a typing indicator. No-op on platforms that don't support it. On Slack, you can pass an optional status string to show a custom loading message. This requires the assistant:write scope.
mentionUser
Get a platform-specific @-mention string.
Read more
Threads, Messages, and Channels
Work with threads, messages, and channels across platforms.
Message
Normalized message format with text, AST, author, and metadata.
PostableMessage
The union type accepted by thread.post() for sending messages.
Transcripts (deprecated)
Configuration, methods, and entry shape for the deprecated cross-platform per-user transcript API.