Skip to content
/ az-wap Public

AzWap - Multi-instance WhatsApp gateway with native Chatwoot & AI agents support

License

Notifications You must be signed in to change notification settings

AzielCF/az-wap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Az-Wap Logo

AZ-WAP Enterprise v2.0 BETA

High-Performance AI-Driven WhatsApp Orchestration Engine

Release Build Status License

[!WARNING] PRE-RELEASE / BETA STATUS: This version (v2.0 Beta) is currently in active development. As a pre-release, unexpected behaviors, bugs, or breaking changes may occur until the first stable version is officially published. Use in production environments with caution.

AZ-WAP is a next-generation, enterprise-grade WhatsApp Web API gateway engineered for massive scale, multi-tenant orchestration, and sovereign AI integration. Built on a strict Hexagonal Architecture, it enables businesses to handle hundreds of concurrent WhatsApp sessions with absolute stability and AI intelligence.


🌟 Vision & Roadmap

Note

AZ-WAP is under constant development. Our mission is to build the most advanced AI agent system for personal assistants and professional use cases across multiple environments.

The Objective:

Our goal is to transcend simple messaging. We are crafting a highly sophisticated AI ecosystem that learns, remembers, and acts as a true personal assistant. While WhatsApp is our primary channel today, we are not limited by it. We are progressively moving towards a multi-channel engine, implementing more networks and interaction environments to become a universal AI orchestration layer.


πŸ“‘ Table of Contents


✨ Key Features

  • High-Scale Concurrency: Run hundreds of independent WhatsApp nodes using a centralized worker-pool architecture.
  • Autonomous AI Agents: Integrated with Gemini, OpenAI, and Anthropic. Supports advanced Tool-Calling and Multimodal Context.
  • Human-Like Simulation: Advanced presence logic including randomized typing indicators, voice recording simulation, and smart hibernation to prevent account bans.
  • Enterprise Dashboard: A premium Vue 3 + DaisyUI interface for real-time orchestration of all nodes and clients.
  • Multi-Tenant SaaS Ready: Built-in system for managing clients, subscriptions, and granular capability toggles.
  • Native Chatwoot Sync: Bi-directional communication for enterprise customer support workflows.
  • Persistent Memory: Shared, searchable AI memory across all chat sessions.
  • Model Context Protocol (MCP): Use AZ-WAP as an MCP server to provide WhatsApp capabilities to other AI agents.

πŸ—οΈ System Architecture

AZ-WAP is built using Clean Hexagonal Architecture, ensuring the business logic remains pure and decoupled from external drivers.

Core Layers:

  1. Domain: Contains the pure business logic, entities (Bot, Workspace, Client), and port interfaces.
  2. Application (Use Cases): Orchestrates the flow of data between the Domain and Infrastructure.
  3. Infrastructure (Adapters):
    • WhatsApp Adapter: High-availability driver built on whatsmeow.
    • AI Providers: Dynamic adapters for Gemini, VertexAI, etc.
    • Persistence: Repository implementations for SQLite and PostgreSQL.
    • REST/MCP Adapters: Interface layers for external communication.

πŸ’Ž Global Client & Tier System

AZ-WAP includes a robust multi-tenant infrastructure designed to scale. The system supports a flexible subscription model where capabilities can be dynamically toggled and restricted based on the client's tier.

Dynamic Resource Management

  • Modular Capabilities: Tiers can be configured to enable or disable specific features like AI Vision, Audio processing, or Proactive Memory.
  • Resource Quotas: Manage workspace limits and message throughput per client.
  • Scalable Tiers: The platform is prepared for Standard, Premium, VIP, and Enterprise classifications, with configurations that can be adjusted through the administration layer.

πŸ€– Advanced AI Bot Engine

The engine transforms simple chat sessions into Sovereign Agents.

Proactive Mental State

The AI doesn't just respond; it thinks. It analyzes the conversation flow to determine if it should:

  • Record a voice note (Audio Generation).
  • Use a tool (Query database, fetch web data).
  • Save a memory (Update user profile).
  • Ack a complex task ("I'm working on that...").

Multimodal Intelligence

Supports native analysis of:

  • Images & Videos: Real-time object and context recognition.
  • Documents: PDF/Text extraction and semantic search.
  • Audio: Whisper-powered transcription and HSL-controlled voice output.

πŸš€ Quick Start Guide

Prerequisites

  • Go 1.24+ (Modern Go features required)
  • Node.js 20+ & Bun (Frontend package manager)
  • FFmpeg (Required for media conversion)
  • SQLite / PostgreSQL

Backend Setup

cd src
go mod tidy
# Run in REST API mode
go run . rest

Frontend Setup

cd src/frontend
bun install
bun dev

Environment Synchronization

Copy .env.example to .env inside the src folder and configure your keys.


βš™οΈ Configuration Manual

Variable Type Description
APP_PORT int The main listener port (Default: 3000).
DB_URI string Main DB (Example: postgres://user:pass@host:5432/db).
APP_BASIC_AUTH string Dashboard credentials (user:pass).
WHATSAPP_AUTO_REPLY string Global welcome message for new sessions.
WHATSAPP_WEBHOOK url CSV list of URLs for event notifications.
GEMINI_API_KEY string Main AI provider key.

πŸ“‚ Project Structure

az-wap/
β”œβ”€β”€ docs/               # Technical specs & OpenAPI documentation
β”œβ”€β”€ src/                # Core implementation
β”‚   β”œβ”€β”€ botengine/      # AI Intelligence Layer (Hexagonal)
β”‚   β”œβ”€β”€ workspace/      # Session Management (Hexagonal)
β”‚   β”œβ”€β”€ clients/        # Multi-tenant Management
β”‚   β”œβ”€β”€ infrastructure/ # External Adapters (WA, DB, API)
β”‚   β”œβ”€β”€ domains/        # Shared Business Entities
β”‚   β”œβ”€β”€ frontend/       # Enterprise Vue 3 Dashboard
β”‚   └── main.go         # Application Entry Point
β”œβ”€β”€ docker/             # Containerization assets
└── LICENSE             # Dual-License Agreement

πŸ“‘ API & Webhooks

REST API Highlights

  • Auth: Bearer Token or Basic Auth.
  • Media: Native support for File ID and URL-based sending.
  • Webhooks: Signed payloads with retry logic and sequential processing.

Event System

AZ-WAP emits events for:

  • message_received: Incoming text/media.
  • session_status: QR ready, Connected, Disconnected.
  • ai_thinking: Bot start/end processing.
  • client_limit_reached: Resource exhaustion warnings.

βš–οΈ Licensing & Governance

AZ-WAP is a Dual-Licensed product.

  • Open Source (GNU AGPL v3.0): Free for community, personal, and educational use. Any derived work must remain open source.
  • Commercial License: MANDATORY for any legal entity generating >$20,000 USD in annual gross revenue.

Contribution Agreement

By submitting code, you agree to assign all rights to the original authors as per the Rights Assignment Clause in the LICENSE file. This allows the project to maintain commercial viability while remaining free for the community.

Jurisdiction: Laws of Peru.


πŸ“© Contact & Support


Copyright (c) 2025-2026 Aziel Cruzado. All rights reserved.

About

AzWap - Multi-instance WhatsApp gateway with native Chatwoot & AI agents support

Resources

License

Stars

Watchers

Forks

Packages