Bot Config • AI Agent SDK
BotConfig: Configuration for messaging bots.
BotConfig
Defined in the config module.
AI Agent
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
strNo description available.
strNo description available.
Optional[str]No description available.
strNo description available.
intNo description available.
floatNo description available.
List[str]No description available.
List[str]No description available.
strNo description available.
boolNo description available.
boolNo description available.
intNo description available.
intNo description available.
intNo description available.
boolNo description available.
intNo description available.
strNo description available.
List[str]No description available.
boolNo description available.
intNo description available.
strNo description available.
strNo description available.
strNo description available.
intNo description available.
strNo description available.
strNo description available.
Optional[str]No description available.
strNo description available.
strNo description available.
UnknownUserPolicyNo description available.
Optional[str]No description available.
boolNo description available.
intNo description available.
boolNo description available.
boolNo description available.
Optional[str]No description available.
boolNo description available.
OptionalNo description available.
Dict[str, Any]No description available.
Methods
Whether bot is configured for webhook mode.
is_ws_mode()Whether bot is configured for WebSocket mode.
is_hybrid_mode()Whether bot is configured for hybrid mode (WS + slow poll).
is_user_allowed()Check if a user is allowed to interact with the bot.
is_explicitly_allowed()Whether a user is explicitly allow-listed.
is_channel_allowed()Check if a channel is allowed for bot interaction.
Internal & Generic Methods
- to_dict: Convert to dictionary (hides sensitive data).
Source
View on GitHubpraisonaiagents/bots/config.py at line 14