Back to browse
GitHub Repository

Framework for building autonomous AI agents on WhatsApp

9 starsTypeScript

Wa-agent – Framework for building AI agents on WhatsApp

by ibrahimwithi·Mar 8, 2026·1 point·0 comments

AI Analysis

●●SolidNiche GemShip It

WhatsApp + Vercel AI SDK + Baileys = production agent plumbing without template boilerplate.

Strengths
  • Addresses real WhatsApp bot friction: per-chat serialization prevents race conditions, conversation summarization scales memory, multi-agent routing enables complex workflows
  • Comprehensive rate limiting, user profile extraction, and scheduled message support differentiate from basic chatbot repos
Weaknesses
  • Depends on Baileys (reverse-engineered WhatsApp API) which carries suspension risk vs. official WhatsApp Business API
  • Small GitHub footprint (4 stars) and minimal usage signal relative to established WhatsApp frameworks
Target Audience

Developers building WhatsApp bots, AI product builders integrating WhatsApp as a channel, and teams needing production-grade agent infrastructure.

Similar To

Twilio WhatsApp API · Botpress WhatsApp channel · n8n WhatsApp integration

Post Description

I built a Node.js framework for running autonomous AI agents on WhatsApp. You define an agent in YAML (personality, tools, routing rules) and wa-agent handles the WhatsApp connection, message queuing, conversation memory, tool execution, and rate limiting.

It uses the Vercel AI SDK for the agent loop (generateText with multi-step tool use) and Baileys under the hood for WhatsApp. Supports Anthropic, OpenAI, or Ollama for local models.

Some things it handles that I couldn't find in existing WhatsApp bot repos:

- Per-chat message serialization (no race conditions when multiple messages arrive) - Conversation summaries so the agent remembers context without stuffing full history into every call - User profile extraction over time ("prefers Arabic", "lives in Dubai") - Multi-agent routing — different agents for different groups/contacts/keywords - Rate limiting and cooldowns per chat so a noisy group doesn't drain your API budget - Cron triggers and human handoff

npx wa-agent init my-bot to get started.

GitHub: https://github.com/ibrahimhajjaj/wa-agent npm: https://www.npmjs.com/package/wa-agent

Similar Projects