> ## 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 Protocol • AI Agent SDK

> BotProtocol: Protocol for messaging bot implementations.

# BotProtocol

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Protocol for messaging bot implementations.

Bots connect agents to messaging platforms, handling:

* Message receiving and sending
* Command handling
* Webhook/polling management
* User and channel management

Example usage (implementation in praisonai wrapper):
from praisonai.bots import TelegramBot

bot = TelegramBot(token="...", agent=my\_agent)
await bot.start()

## Methods

<CardGroup cols={2}>
  <Card title="is_running()" icon="function" href="../functions/BotProtocol-is_running">
    Whether the bot is currently running.
  </Card>

  <Card title="platform()" icon="function" href="../functions/BotProtocol-platform">
    Platform name (telegram, discord, slack, etc.).
  </Card>

  <Card title="bot_user()" icon="function" href="../functions/BotProtocol-bot_user">
    The bot's user information.
  </Card>

  <Card title="start()" icon="function" href="../functions/BotProtocol-start">
    Start the bot (begin receiving messages).
  </Card>

  <Card title="stop()" icon="function" href="../functions/BotProtocol-stop">
    Stop the bot.
  </Card>

  <Card title="set_agent()" icon="function" href="../functions/BotProtocol-set_agent">
    Set the agent that handles messages.
  </Card>

  <Card title="get_agent()" icon="function" href="../functions/BotProtocol-get_agent">
    Get the current agent.
  </Card>

  <Card title="send_message()" icon="function" href="../functions/BotProtocol-send_message">
    Send a message to a channel.
  </Card>

  <Card title="edit_message()" icon="function" href="../functions/BotProtocol-edit_message">
    Edit an existing message.
  </Card>

  <Card title="delete_message()" icon="function" href="../functions/BotProtocol-delete_message">
    Delete a message.
  </Card>

  <Card title="on_message()" icon="function" href="../functions/BotProtocol-on_message">
    Register a message handler.
  </Card>

  <Card title="on_command()" icon="function" href="../functions/BotProtocol-on_command">
    Decorator to register a command handler.
  </Card>

  <Card title="send_typing()" icon="function" href="../functions/BotProtocol-send_typing">
    Send typing indicator to a channel.
  </Card>

  <Card title="get_user()" icon="function" href="../functions/BotProtocol-get_user">
    Get user information.
  </Card>

  <Card title="get_channel()" icon="function" href="../functions/BotProtocol-get_channel">
    Get channel information.
  </Card>
</CardGroup>

## Source

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