> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Bot Message • AI Agent SDK

> BotMessage: Represents a message in a messaging platform.

# BotMessage

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) 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

**message\_id** `str`

No description available.

**content** `Union`

No description available.

**message\_type** `MessageType`

No description available.

**sender** `Optional[BotUser]`

No description available.

**channel** `Optional[BotChannel]`

No description available.

**timestamp** `float`

No description available.

**reply\_to** `Optional[str]`

No description available.

**thread\_id** `Optional[str]`

No description available.

**attachments** `List`

No description available.

**quoted** `Optional[QuotedRef]`

No description available.

**metadata** `Dict[str, Any]`

No description available.

**allow\_control** `bool`

No description available.

## Methods

> [card] [text()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/BotMessage-text.md)
>
> Get message text content.

> [card] [prompt\_text()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/BotMessage-prompt_text.md)
>
> Text for the agent turn, with any resolved quote rendered inline.

> [card] [is\_command()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/BotMessage-is_command.md)
>
> Check if message is a gateway control command.

> [card] [command()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/BotMessage-command.md)
>
> Extract command name if this is a command message.

> [card] [command\_args()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/BotMessage-command_args.md)
>
> Extract command arguments if this is a command message.

> [accordion] Internal & Generic Methods
>
> * **from\_dict**: Create from dictionary.
> * **to\_dict**: Convert to dictionary.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/bots/protocols.py#L551)
>
> `praisonaiagents/bots/protocols.py` at line 551


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.