> ## 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.

# Send Message • AI Agent SDK

> send_message: Send a message to a channel.

# send\_message

<div className="flex items-center gap-2">
  <Badge color="blue">Async</Badge>
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**BotProtocol**](../classes/BotProtocol) class in the [**protocols**](../modules/protocols) module.

Send a message to a channel.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def send_message(channel_id: str, content: Union[str, Dict[str, Any]], reply_to: Optional[str], thread_id: Optional[str]) -> Union[BotMessage, 'SendResult']
```

## Parameters

<ParamField query="channel_id" type="str" required={true}>
  Target channel ID
</ParamField>

<ParamField query="content" type="Union" required={true}>
  Message content
</ParamField>

<ParamField query="reply_to" type="Optional[str]" required={false}>
  Optional message ID to reply to
</ParamField>

<ParamField query="thread_id" type="Optional[str]" required={false}>
  Optional thread ID for threaded replies
</ParamField>

### Returns

<ResponseField name="Returns" type="Union[BotMessage, 'SendResult']">
  class:`~praisonaiagents.bots.SendResult` — the transport-neutral
  receipt that carries a closed, branchable `status`
  (`"sent"` / `"failed"` / `"queued"` / `"duplicate"`), the
  platform `message_id`/`message_ids` (for edit-in-place, delete
  and threading), and a classified `error`/`error_kind` on
  failure. This makes a silent drop *unrepresentable*: a caller can
  branch on `result.status` instead of relying on an exception that
  may be swallowed.

  A legacy :class:`BotMessage` remains an accepted return for
  backward compatibility — treat a returned `BotMessage` as a
  successful send (`status == "sent"`).
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/bots/protocols.py#L927">
  `praisonaiagents/bots/protocols.py` at line 927
</Card>
