← Back to Blog

OpenClaw WhatsApp Agent: Set Up Yours Before Everyone Else Does

OpenClaw WhatsApp Agent: Set Up Yours Before Everyone Else Does

If you run a small business, you already know where your customers live: WhatsApp.

They send support questions, voice notes, screenshots, even payment confirmations. But if you are still answering everything manually, you are leaving hours on the table every week.

In March 2026, Meta finally opened up WhatsApp Business API access to third‑party AI chatbots. That means you can now run your own self‑hosted AI agent on WhatsApp instead of renting yet another SaaS chatbot.

In this guide, you will set up a WhatsApp agent on your own OpenClaw server using an OpenAgents.mom workspace bundle. No vibe‑coding, no mystery prompts. Just plain markdown files you can read, edit, and version‑control.

What You Are Building

By the end of this tutorial you will have:

  • A dedicated WhatsApp support agent running on your OpenClaw server
  • A complete set of workspace files (SOUL.md, AGENTS.md, USER.md, TOOLS.md, HEARTBEAT.md)
  • A WhatsApp Business connection that routes messages into your agent
  • Safety guardrails so the agent cannot leak secrets or go off‑script

You can adapt the same pattern for sales, lead‑qualification, or internal team helpers. We will focus on support because it is the fastest way to get real value.

Prerequisites

Before you start, you should have:

  • An OpenClaw server running and reachable from the internet
  • Basic command‑line access (SSH into your server)
  • A WhatsApp Business account with API access (Meta’s Cloud API or a compatible provider)
  • A domain or subdomain pointing at your OpenClaw instance

You do not need to write code. All of the logic lives in markdown files and OpenClaw configuration.

Step 1: Generate Your WhatsApp Agent Workspace

OpenAgents.mom is a guided wizard that generates complete OpenClaw workspaces.

  1. Go to https://openagents.mom in your browser.
  2. Start the wizard and choose “Customer Support Agent” as the primary use case.
  3. When asked about channels, select WhatsApp (you can also enable others like Telegram or Slack if you want a multi‑channel agent).
  4. Answer the questions about:
    • Your brand voice (formal vs friendly)
    • Typical questions customers ask
    • Hours of operation and escalation rules
    • Languages you want to support

Behind the scenes, the wizard is preparing a set of workspace files tailored to your answers.

When you finish the interview, download the generated ZIP bundle. Unzip it locally and you will see files like:

SOUL.md
IDENTITY.md
AGENTS.md
USER.md
TOOLS.md
HEARTBEAT.md
MEMORY.md

Let’s look at the important ones for WhatsApp.

SOUL.md — Personality and Boundaries

SOUL.md defines how your agent behaves:

# SOUL.md (excerpt)

## Personality
- Friendly, fast, and to the point
- Always confirms key details (order ID, email) before making changes

## Hard Boundaries
- Never process payments directly inside WhatsApp
- Never ask for full credit card numbers or passwords
- Escalate to a human when the user sounds angry or frustrated

Because it is just markdown, you can tune this over time without touching any prompts inside OpenClaw itself.

AGENTS.md — Operating Manual

AGENTS.md is the runbook for your agent. For a WhatsApp support bot it might include:

## Channels
- Primary: WhatsApp Business
- Secondary: Telegram (optional)

## Session Behavior
- Treat each phone number as a long‑lived session
- Summarize long threads into short notes in MEMORY.md

## Support Rules
- Handle FAQs from local knowledge base first
- For account‑specific answers, call the internal API via TOOLS.md
- Offer human handoff when confidence is low

OpenClaw reads this file at runtime so your agent’s behavior is transparent and auditable.

TOOLS.md — What the Agent Is Allowed to Do

For WhatsApp, a typical TOOLS.md might include:

# TOOLS.md (excerpt)

## HTTP API
- Name: orders_api
- Base URL: https://api.yourstore.com
- Allowed paths:
  - GET /orders/{order_id}
  - POST /tickets

## Restrictions
- No shell access
- No direct database access
- No file write outside the workspace

This is where you enforce least privilege. If the tool is not listed here, the agent does not get to use it.

Step 2: Deploy the Workspace to OpenClaw

Once you are happy with the files, deploy them to your OpenClaw server.

  1. Copy the folder to your server, for example:
scp -r support-whatsapp-agent/ root@your-server:/home/openclaw/agents/support-whatsapp/
  1. Add an agent entry to your OpenClaw config, pointing at that workspace:
{
  "id": "support-whatsapp",
  "name": "WhatsApp Support Agent",
  "workspace": "/home/openclaw/agents/support-whatsapp",
  "channels": ["whatsapp"],
  "skills": [],
  "heartbeat": true
}
  1. Restart OpenClaw so the new agent is loaded.

Check the logs to make sure the agent starts without errors.

Step 3: Connect WhatsApp Business to OpenClaw

The WhatsApp piece has three moving parts:

  1. Your WhatsApp Business API provider (Meta Cloud API or partner)
  2. A webhook URL exposed by OpenClaw
  3. An app or connector that translates WhatsApp messages into OpenClaw channel events

In most setups, you will:

  1. Configure your provider to send incoming messages to a URL like:

    https://your-domain.com/api/channels/whatsapp/webhook

  2. Add a WhatsApp channel block in your OpenClaw config:

{
  "channel": "whatsapp",
  "provider": "meta_cloud_api",
  "verify_token": "replace-with-random-string",
  "access_token_env": "WHATSAPP_ACCESS_TOKEN",
  "phone_number_id": "1234567890",
  "agents": ["support-whatsapp"]
}
  1. Set the WHATSAPP_ACCESS_TOKEN environment variable on your server with the token from Meta.

Once you save the config and restart OpenClaw, send a test message from your WhatsApp number to the business line. You should see the agent respond using the tone defined in SOUL.md.

Step 4: Design Good WhatsApp Flows (Without Over‑Automating)

A WhatsApp agent is not just a FAQ bot. Treat it like a junior support teammate.

A few patterns that work well:

  • Triage first, detail later — ask for order IDs and email before doing any work
  • Offer options — present 3–4 quick‑reply style suggestions (“Track an order”, “Change shipping address”, “Talk to a human”)
  • Use short messages — WhatsApp users scan; keep replies under 3 short sentences

You can encode these patterns in your workspace files.

Example snippet in SOUL.md:

## Conversation Patterns
- Use bullets or numbered lists when offering options
- Avoid sending more than 3 messages in a row without a user reply
- When unsure, summarize what you understood and ask for confirmation

And in AGENTS.md:

## Escalation
- If user types "agent" or "human" or sounds frustrated, create a ticket via orders_api and tag it as URGENT.
- Post a summary in our internal Slack channel via webhook.

Because everything is file‑based, you can review these patterns in Git and evolve them like any other part of your stack.

Step 5: Add HEARTBEAT.md for Monitoring

OpenClaw’s HEARTBEAT.md lets you schedule recurring checks so your agent does not silently break.

For a WhatsApp bot, include at least:

# HEARTBEAT.md (excerpt)

## Every 15 minutes
- Hit WhatsApp provider health endpoint
- Log latency and error rate

## Every day at 23:55
- Summarize daily ticket volume
- List top 10 user questions
- Save summary to MEMORY.md and send to Slack

This keeps you informed if Meta’s API starts failing or if message patterns change.

Common Mistakes When Launching a WhatsApp Agent

Common Mistakes

  1. Turning on full automation on day one. Start with clear boundaries and a fast human‑escalation path instead of pretending the agent can handle everything.
  2. Letting the agent talk about anything. If your TOOLS.md and knowledge sources are too broad, the agent will happily improvise.
  3. No logging or summaries. Without good logs and MEMORY.md notes, you cannot tell what your agent is actually doing.
  4. Forgetting mobile‑first design. Long paragraphs and desktop‑style answers are painful to read in WhatsApp.
  5. Storing secrets in plain text. API keys and tokens should live in environment variables, not inside markdown files.

Avoid these and your first week with the agent will be much less stressful.

Security Guardrails You Should Not Skip

Security Guardrails

  • Sandbox your tools. Only expose the minimal HTTP endpoints your agent needs. Never give it shell access just because it is convenient.
  • Keep secrets out of the workspace. Use environment variables for tokens and credentials. Your workspace folder should be safe to commit to a private repo.
  • Audit configs like code. Treat SOUL.md, AGENTS.md, TOOLS.md, and HEARTBEAT.md like production code — review, diff, and approve changes.
  • Rate‑limit and monitor. A misconfigured agent can spam users or hammer your APIs. Use HEARTBEAT.md tasks to watch for unusual behavior.

Security is not something you “add later” to an AI agent. It has to be part of the first deployment.

Step 6: Iterate From Real Conversations

Once your WhatsApp agent is live, the real work starts.

Every few days, review:

  • Logs for confusing conversations
  • Repeated questions the agent cannot answer
  • Escalations that should have been handled automatically

Translate those findings back into your workspace files:

  • Update MEMORY.md with new patterns and examples
  • Refine SOUL.md to clarify tone and escalation rules
  • Extend TOOLS.md with safe new capabilities

Because everything is written down, you never lose context between iterations.

Where OpenAgents.mom Fits In

You could assemble all of these files by hand. But it is slow, easy to miss edge cases, and you end up reinventing the same patterns.

OpenAgents.mom gives you:

  • A guided interview that bakes in best practices for channels like WhatsApp
  • Pre‑wired files for SOUL.md, AGENTS.md, TOOLS.md, HEARTBEAT.md, USER.md, and MEMORY.md
  • Output that plugs directly into your OpenClaw server as a workspace bundle

Instead of spending a weekend drafting configs, you can have a working WhatsApp agent in minutes and spend your time tuning it.

Launch Your WhatsApp Agent Before Everyone Else

WhatsApp Business AI is finally open for real builders, not just big vendors. Generate your WhatsApp support agent workspace and go from zero to live agent in the time it takes to finish a coffee.

Create Your WhatsApp Agent

Share