mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Add comprehensive file-level DOX documentation across the repo and update directory AGENTS.md indexes. Many new `*.py.dox.md` files were added under api, helpers, tools, plugins, extensions, webui, and other dirs to document endpoint purpose, ownership, runtime contracts, work guidance, and verification. Several AGENTS.md files were created or updated (agents profiles, api, docker, extensions, helpers, plugins, skills, webui components, etc.) to list child DOX files and clarify documentation/work guidance. Also add example and bundled profile DOX files (agent0, default, developer, hacker, researcher) and minor updates to helpers/dirty_json.py and its tests. These changes improve on-disk documentation coverage and establish the convention that each direct runtime file should have a matching `*.dox.md` describing its contracts and verification steps. |
||
|---|---|---|
| .. | ||
| api | ||
| extensions/python | ||
| helpers | ||
| prompts | ||
| webui | ||
| whatsapp-bridge | ||
| AGENTS.md | ||
| default_config.yaml | ||
| plugin.yaml | ||
| README.md | ||
WhatsApp Integration Plugin
Communicate with Agent Zero via WhatsApp using a Baileys-based Node.js bridge.
Requirements
- Node.js (v18+) and npm installed on the system
- A WhatsApp account on a phone (for QR code pairing)
Setup
Install bridge dependencies
cd plugins/_whatsapp_integration/whatsapp-bridge
npm install --production
Dependencies are auto-installed on first bridge start if missing.
Configure and pair
- Enable the plugin in Settings > External > WhatsApp Integration
- Configure allowed phone numbers
- Click Show QR Code and scan with WhatsApp on your phone
- Send a message from an allowed number to start a chat
- Use
/project <name>,/config <preset>, or/sendin WhatsApp to control the active chat directly
The WhatsApp session persists across restarts in tmp/whatsapp/session/. No re-pairing needed unless you disconnect via settings.
Be careful: if you use your personal number and leave allowed_numbers open, other people could misuse your Agent Zero.
Configuration
| Setting | Description | Default |
|---|---|---|
enabled |
Enable bridge and polling | false |
mode |
self-chat (personal number) or dedicated (separate number) |
self-chat |
allow_group |
Respond in group chats when mentioned or replied to | false |
bridge_port |
Local HTTP port for bridge | 3100 |
poll_interval_seconds |
Poll frequency (min 2) | 3 |
allowed_numbers |
Phone numbers without + prefix | [] (all) |
project |
Activate project for WA chats | "" |
agent_instructions |
Extra agent instructions | "" |
How It Works
- The bridge connects to WhatsApp via Baileys and exposes HTTP endpoints on localhost
- In personal-number mode, you can message your own WhatsApp number to talk to the agent, and the agent can also handle messages that other people send to that number
- The plugin polls the bridge for new messages every few seconds
- Incoming messages are routed to existing chats by WhatsApp chat ID or new chats are created
- Agent responses are sent back via the bridge as WhatsApp messages
- Media (images, documents) is supported in both directions
Architecture
WhatsApp Phone
↕ (WhatsApp protocol via Baileys)
whatsapp-bridge/bridge.js (Node.js subprocess)
↕ (HTTP API on localhost)
Python helpers (wa_client, handler, bridge_manager)
↕ (Framework extensions)
Agent Zero