Open-WA Documentation

website·Indexed 32 days ago

https://openwa.dev/

Documentation for Open-WA v5, a modular Node.js framework for WhatsApp automation. Includes guides on the Easy API, Socket Client, Cloudflare Session Proxy, and Chatwoot integration. Covers core concepts such as webhook payloads, data models for messages and contacts, AI agent patterns for LLM integration, and deployment via Docker.

Tokens
141.7K
Snippets
764
Records
1K
Agent score
61%

What's inside Open-WA

  1. Overview of @open-wa/wa-automate

    @open-wa/wa-automate is a WhatsApp automation CLI and API server. It allows developers to run a standalone server for HTTP interaction, manage multiple WhatsApp accounts (multi-session), and utilize advanced retries and state management for robustness. It supports multiple drivers, including Playwright, Puppeteer, and Lightpanda.
  2. Overview of @open-wa/integration-s3

    @open-wa/integration-s3 is a plugin for open-wa that integrates S3-compatible cloud storage. It listens for message.received events containing decryptable media, uploads that media using pico-s3, and attaches the resulting cloudUrl to the message object. This allows downstream message handlers to access a cloud-hosted URL instead of just the original WhatsApp media reference.
  3. Overview of Cloudflare Session Proxy

    The Cloudflare Session Proxy (@open-wa/cf-proxy) enables remote access to WhatsApp sessions. Instead of opening ports on a local machine, the local session connects outward to a Cloudflare Durable Object, which then relays requests from remote consumers. When no traffic is flowing, the WebSocket hibernates at $0 idle cost.
  4. Overview of @open-wa/cli features

    The @open-wa/cli is a command line tool for the Open-WA WhatsApp automation stack (v5 monorepo). Key features include:

    • Easy API mode: Quickly start a WhatsApp server with a single command.
    • Session Auth: Perform interactive QR code scanning directly in the terminal for authentication.
    • Diagnostics: Access built-in tools to test drivers and connections.
  5. Overview of open-wa Runtime and API Components

    Key architectural components of open-wa include:

    • Driver: The browser automation backend (e.g., Puppeteer, Playwright, Lightpanda) used to control WhatsApp Web.
    • Easy API: The hosted HTTP API surface and runtime that provides client functionality, interactive docs, and generated schemas. It is launched via npx @open-wa/wa-automate.
    • SocketClient: A remote consumer client used to connect to an Easy API instance without embedding the browser automation runtime in the local application.
    • WAPI: The internal WhatsApp Web API abstraction layer that open-wa bridges to.
    npx @open-wa/wa-automate
  6. Overview of the PluginClient interface

    The PluginClient is the primary interface plugins use to call WhatsApp methods. It acts as a transport-agnostic proxy, meaning plugins do not have direct access to the browser, CDP (Chrome DevTools Protocol), or the file system. All calls are forwarded through the host's transport layer (e.g., HTTP RPC, SSE). It is available via the client object within the plugin's PluginInput.
  7. Overview of open-wa v5 Applications

    The open-wa v5 monorepo includes several applications for managing WhatsApp instances and APIs:

    • @open-wa/cli-app: A WhatsApp CLI providing an Easy API mode for @open-wa/wa-automate.
    • @open-wa/dashboard-neo: A static dashboard UI designed for the open-wa v5 Easy API.
    • @open-wa/docker: An application that exposes an API to control WhatsApp instances via Docker.
    • orchestrator-cli: CLI workspace for orchestration.
    • orchestrator-dashboard: Dashboard workspace for orchestration.
    • registry: Registry workspace for the monorepo.