Skip to content

API Reference parrot.integrations.whatsapp.bridge_config

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.integrations.whatsapp.bridge_config

View source

Configuration for WhatsApp Bridge integration.

Class WhatsAppBridgeConfig

Configuration for WhatsApp Bridge wrapper (whatsmeow-based).

Parameter Type Default Description
name str
chatbot_id str
bridge_url str 'http://localhost:8765'
webhook_path Optional[str] None
welcome_message Optional[str] None
system_prompt_override Optional[str] None
commands Dict[str, str] dict()
allowed_numbers Optional[List[str]] None
max_message_length int 4096

Fields:

Field Type Default Description
name str Wrapper name (used for logging and route generation).
chatbot_id str Agent name in BotManager / agent registry.
bridge_url str 'http://localhost:8765' URL of the Go whatsmeow bridge.
webhook_path Optional[str] None Path to register for incoming message callbacks.
welcome_message Optional[str] None Greeting sent on first interaction.
system_prompt_override Optional[str] None Override agent's default system prompt.
commands Dict[str, str] field(default_factory=dict) Custom slash-command map.
allowed_numbers Optional[List[str]] None Phone allowlist (digits only, no +). Empty = all. For an agent that exposes any financial-write (SUBMIT) operation, an empty allowlist is a fail-closed condition — see :class:~parrot.integrations.whatsapp.bridge_wrapper.WhatsAppBridgeWrapper.
max_message_length int 4096 Max chars before splitting.

Attributes:

Attribute Type Description
normalized_allowed_numbers Optional[List[str]] allowed_numbers normalized to digits-only for comparison. Returns None/empty exactly when allowed_numbers is None/empty (i.e. "allow all" is preserved), never an empty-vs- populated distinction introduced by normalization itself.

Method WhatsAppBridgeConfig.from_dict

Create config from dictionary (YAML parsed data).

from_dict(name: str, data: Dict[str, Any]) -> WhatsAppBridgeConfig

Parameter Type Default Description
name str
data Dict[str, Any]

Returns: WhatsAppBridgeConfig

Function normalize_phone_number

Normalize number to digits-only (no +, spaces, dashes, ...).

normalize_phone_number(number: str) -> str

Parameter Type Default Description
number str

Returns: str

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally