@archastro/sdk
    Preparing search index...

    Interface Message

    A chat message posted in a thread, including its content, author, attachments, reactions, and optional reply metadata.

    interface Message {
        actors?: Actor[];
        agent?: string;
        agent_mode?: "cli" | "embedded";
        attachments?: Attachment[];
        branched_thread?: string;
        content?: string;
        created_at?: string;
        has_replies?: boolean;
        id: string;
        idempotency_key?: string;
        legacy_agent?: string;
        metadata?: Record<string, unknown>;
        org?: string;
        reactions?: MessageReaction[];
        rendering_mode?: string;
        replies?: Record<string, unknown>[];
        replies_after_cursor?: string;
        replies_before_cursor?: string;
        reply_count?: number;
        reply_to?: Record<string, unknown>;
        sandbox?: string;
        team?: string;
        thread?: string;
        user?: string;
    }
    Index

    Properties

    actors?: Actor[]

    Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.

    agent?: string

    ID of the agent user that sent this message (agi_...). null for messages sent by human users.

    agent_mode?: "cli" | "embedded"

    Local agent execution mode for this message. One of cli, embedded, or null when the message was not created by a local agent execution path.

    attachments?: Attachment[]

    Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.

    branched_thread?: string

    ID of the thread that was branched from this message (thr_...). null if this message has not spawned a branch thread.

    content?: string

    Text content of the message. null for messages that contain only attachments.

    created_at?: string

    When the message was posted (ISO 8601).

    has_replies?: boolean

    Whether this message has at least one reply. Only present when explicitly requested or computed by the server.

    id: string

    Message ID (msg_...).

    idempotency_key?: string

    Client-supplied idempotency key used to deduplicate message sends. null if the sender did not provide one.

    legacy_agent?: string

    Identifier of the legacy chat agent that sent this message, if applicable. null for messages sent by users or modern agent users.

    metadata?: Record<string, unknown>

    Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.

    org?: string

    ID of the organization that owns this message (org_...).

    reactions?: MessageReaction[]

    Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.

    rendering_mode?: string

    Display hint for how the message should be rendered. One of "reply", "direct", or "inline". null for user-authored messages, which are always rendered as standard replies.

    replies?: Record<string, unknown>[]

    Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.

    replies_after_cursor?: string

    Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.

    replies_before_cursor?: string

    Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.

    reply_count?: number

    Total number of direct replies to this message. Only present when explicitly requested or computed by the server.

    reply_to?: Record<string, unknown>

    The parent message this message is a reply to, expanded as a full message object when loaded. null if this is a top-level message or the association is not preloaded.

    sandbox?: string

    ID of the developer sandbox this message belongs to (dsb_...). null for non-sandbox messages.

    team?: string

    ID of the team this message is scoped to (tem_...). null if the message is not team-scoped.

    thread?: string

    ID of the thread this message belongs to (thr_...). null for messages not yet associated with a thread.

    user?: string

    The human user who sent this message. Returns a public ID string (usr_...) when the association is not preloaded, or an expanded user object when it is. null for messages sent by agents.