[Python] How to build a Python-based WhatsApp agent without whatsapp business's official api...

Discussão em 'Python' iniciado por Stack, Abril 18, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on a personal automation project for my company and want to create an AI agent that can interact with me via WhatsApp. The idea is to eventually have this agent generate invoices or perform other tasks based on the commands I send through WhatsApp (e.g., /generate_invoice), but for now, I'm just focused on receiving and responding to messages on WhatsApp via Python.

    Requirements: I want to build this from scratch without using any API or third-party APIs like Twilio, Gupshup, or other paid platforms.

    I'm using Python as the primary language.

    I want to be able to receive and send messages in real time on WhatsApp from my Python code.

    Ideally, I’d like a setup similar to venom-bot, which is a WhatsApp Web automation library in Node.js.

    ✅ What I’ve explored so far: yowsup: Seems outdated and not well-maintained. Also has risks like number bans.

    pywhatkit: Can send scheduled messages but can't receive or handle real-time conversations.

    venom-bot / whatsapp-web.js: Powerful Node.js libraries that I could possibly use alongside Python via a REST API, but I was hoping for a more native Python solution.

    ❓ What I want to know: Is there any actively maintained Python library that lets me automate WhatsApp Web (send/receive messages) similar to venom-bot?

    If not, what's the recommended architecture to build a Python-controlled WhatsApp agent (e.g., Python + Node.js + REST communication)?

    Has anyone implemented something similar or have example projects/repos to share?

    Thanks in advance for any suggestions, libraries, or architectural advice!

    Continue reading...

Compartilhe esta Página