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

> BotConfig: Configuration for messaging bots.

# BotConfig

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

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

Configuration for messaging bots.

Attributes:
token: Bot authentication token
webhook\_url: URL for webhook mode (optional)
webhook\_path: Path for webhook endpoint
polling\_interval: Interval for polling mode (seconds)
allowed\_users: List of explicitly-allowed user IDs. When empty,
inbound access is not automatically granted — it defers to
`unknown_user_policy` (default `deny`). To open the bot to
everyone, set `unknown_user_policy="allow"`.
allowed\_channels: List of allowed channel IDs (empty = all allowed)
command\_prefix: Prefix for commands (default: "/")
mention\_required: Whether bot mention is required in groups
typing\_indicator: Whether to show typing indicator
max\_message\_length: Maximum message length before splitting
retry\_attempts: Number of retry attempts for failed operations
timeout: Request timeout in seconds
metadata: Additional platform-specific configuration

## Properties

<ResponseField name="token" type="str">
  No description available.
</ResponseField>

<ResponseField name="mode" type="str">
  No description available.
</ResponseField>

<ResponseField name="webhook_url" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="webhook_path" type="str">
  No description available.
</ResponseField>

<ResponseField name="webhook_port" type="int">
  No description available.
</ResponseField>

<ResponseField name="polling_interval" type="float">
  No description available.
</ResponseField>

<ResponseField name="allowed_users" type="List[str]">
  No description available.
</ResponseField>

<ResponseField name="allowed_channels" type="List[str]">
  No description available.
</ResponseField>

<ResponseField name="command_prefix" type="str">
  No description available.
</ResponseField>

<ResponseField name="mention_required" type="bool">
  No description available.
</ResponseField>

<ResponseField name="typing_indicator" type="bool">
  No description available.
</ResponseField>

<ResponseField name="max_message_length" type="int">
  No description available.
</ResponseField>

<ResponseField name="retry_attempts" type="int">
  No description available.
</ResponseField>

<ResponseField name="timeout" type="int">
  No description available.
</ResponseField>

<ResponseField name="reply_in_thread" type="bool">
  No description available.
</ResponseField>

<ResponseField name="thread_threshold" type="int">
  No description available.
</ResponseField>

<ResponseField name="group_policy" type="str">
  No description available.
</ResponseField>

<ResponseField name="default_tools" type="List[str]">
  No description available.
</ResponseField>

<ResponseField name="auto_approve_tools" type="bool">
  No description available.
</ResponseField>

<ResponseField name="debounce_ms" type="int">
  No description available.
</ResponseField>

<ResponseField name="ack_emoji" type="str">
  No description available.
</ResponseField>

<ResponseField name="done_emoji" type="str">
  No description available.
</ResponseField>

<ResponseField name="ack_scope" type="str">
  No description available.
</ResponseField>

<ResponseField name="session_ttl" type="int">
  No description available.
</ResponseField>

<ResponseField name="busy_mode" type="str">
  No description available.
</ResponseField>

<ResponseField name="busy_ack" type="str">
  No description available.
</ResponseField>

<ResponseField name="workspace_dir" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="workspace_access" type="str">
  No description available.
</ResponseField>

<ResponseField name="workspace_scope" type="str">
  No description available.
</ResponseField>

<ResponseField name="unknown_user_policy" type="UnknownUserPolicy">
  No description available.
</ResponseField>

<ResponseField name="owner_user_id" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="streaming" type="bool">
  No description available.
</ResponseField>

<ResponseField name="stream_edit_interval_ms" type="int">
  No description available.
</ResponseField>

<ResponseField name="allow_silence" type="bool">
  No description available.
</ResponseField>

<ResponseField name="silence_token" type="Optional[str]">
  No description available.
</ResponseField>

<ResponseField name="metadata" type="Dict[str, Any]">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="is_webhook_mode()" icon="function" href="../functions/BotConfig-is_webhook_mode">
    Whether bot is configured for webhook mode.
  </Card>

  <Card title="is_ws_mode()" icon="function" href="../functions/BotConfig-is_ws_mode">
    Whether bot is configured for WebSocket mode.
  </Card>

  <Card title="is_hybrid_mode()" icon="function" href="../functions/BotConfig-is_hybrid_mode">
    Whether bot is configured for hybrid mode (WS + slow poll).
  </Card>

  <Card title="is_user_allowed()" icon="function" href="../functions/BotConfig-is_user_allowed">
    Check if a user is allowed to interact with the bot.
  </Card>

  <Card title="is_explicitly_allowed()" icon="function" href="../functions/BotConfig-is_explicitly_allowed">
    Whether a user is explicitly allow-listed.
  </Card>

  <Card title="is_channel_allowed()" icon="function" href="../functions/BotConfig-is_channel_allowed">
    Check if a channel is allowed for bot interaction.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Convert to dictionary (hides sensitive data).
</Accordion>

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Configuration Overview" icon="gear" href="/docs/docs/configuration/index" />

  <Card title="Agent Config" icon="robot" href="/docs/docs/configuration/agent-config" />
</CardGroup>
