Hey everyone!
If you’ve been building WhatsApp automations with Agent Zero, you probably know the pain of having to re-scan that WhatsApp Web QR code every time your system restarts or your Docker container reboots.
Say goodbye to that problem! We're excited to share the WhatsApp Persistence - Chrome Headless skill.
This skill sets up Google Chrome in headless mode with a permanent profile directory, meaning your WhatsApp session stays active 24/7. It saves your cookies, session storage, and local databases so your bot never loses access. Why this is a game-changer:
- True Persistence: Survives system reboots, Docker container restarts, and browser closures.
- Zero Interruptions: You only scan the QR code the very first time. After that, it's plug-and-play.
- Seamless Integration: Fully optimized to work with Agent Zero's chrome_devtools MCP.
🛠️ How to use it in 3 simple steps:
- Start it up: Run the startup script (./scripts/start_whatsapp_persistent.sh). This launches headless Chrome with a persistent user data directory.
- Scan (Just Once!): Open your phone, scan the QR code to log in, and let the script save your session permanently.
- Automate: Use Agent Zero to take over! You can use tools like chrome_devtools.take_snapshot, chrome_devtools.click, and chrome_devtools.fill to read chats and send messages continuously.
You can also run the included ./scripts/check_persistence.sh to verify your session files are safely stored, or set up ./scripts/monitor_chrome.sh to keep an eye on your bot's health. Check out the full documentation and scripts in the repository to get started.