Bot Message • AI Agent SDK

BotMessage: Represents a message in a messaging platform.

BotMessage

Defined in the protocols module.

AI Agent

Represents a message in a messaging platform.

Attributes: message_id: Platform-specific message identifier content: Message content (text or structured data) message_type: Type of message sender: User who sent the message channel: Channel where the message was sent timestamp: Message timestamp reply_to: ID of message being replied to thread_id: Thread identifier (for threaded conversations) attachments: List of attachment URLs or data quoted: Resolved reply/quote context (see :class:QuotedRef). When a user replies to or quotes an earlier message the adapter resolves the referenced content and attaches it here so the agent sees the referent instead of answering context-blind. Rendered into the prompt as a quoted block by :meth:prompt_text. metadata: Additional platform-specific metadata allow_control: Control-trust primitive. `True (the default) only for interactive human turns; producers set it False for content of untrusted or non-interactive provenance (generic webhook payloads, relayed/mirrored bot-authored content, proactive/wake/scheduler injects). When False the message is never classified as a gateway control command (is_command returns False), even if its text starts with /` and it is attributed to a privileged identity — it is handled as plain text instead.

Properties

ResponseField str

No description available.

ResponseField Union

No description available.

ResponseField MessageType

No description available.

ResponseField Optional[BotUser]

No description available.

ResponseField Optional[BotChannel]

No description available.

ResponseField float

No description available.

ResponseField Optional[str]

No description available.

ResponseField Optional[str]

No description available.

ResponseField List

No description available.

ResponseField Optional[QuotedRef]

No description available.

ResponseField Dict[str, Any]

No description available.

ResponseField bool

No description available.

Methods

Internal & Generic Methods
  • from_dict: Create from dictionary.
  • to_dict: Convert to dictionary.

Source

View on GitHub

praisonaiagents/bots/protocols.py at line 551