Files
openclaw-skill/openclaw-knowhow-skill/docs/reference/concepts/group-messages.md
Selig 4c966a3ad2 Initial commit: OpenClaw Skill Collection
6 custom skills (assign-task, dispatch-webhook, daily-briefing,
task-capture, qmd-brain, tts-voice) with technical documentation.
Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
2026-03-13 10:58:30 +08:00

1.7 KiB

Group Messages

This documentation covers WhatsApp group chat functionality for Clawd, enabling the agent to participate in groups while remaining dormant until activated.

Key Features

Activation Modes

The system supports two modes:

  • mention (default): requires @-ping to respond
  • always: responds to every message

Group Policy Control

Access is managed through groupPolicy settings with three options:

  • open
  • disabled
  • allowlist (default)

The default allowlist blocks messages until senders are explicitly permitted.

Separate Sessions

Each group maintains its own session context independent from direct messages. Session keys look like agent:<agentId>:whatsapp:group:<jid> to keep group and DM conversations isolated.

Context Injection

Unread group messages (up to 50 by default) are automatically included in prompts, labeled as "[Chat messages since your last reply - for context]" with the current message marked separately.

Sender Attribution

Each message batch includes [from: Sender Name (+E164)] so the agent knows who is speaking.

Configuration

The setup requires adding mention patterns and group settings to openclaw.json, including regex patterns for display-name recognition and numerical fallbacks.

{
  agents: {
    list: [
      {
        id: "main",
        groupChat: {
          mentionPatterns: ["@openclaw", "openclaw", "\\+15555550123"],
          historyLimit: 50,
        },
      },
    ],
  },
}

Usage

Simply @-mention the bot in a group (using @openclaw or the phone number), and only allowlisted senders can trigger responses unless open policy is enabled. Group-specific commands like /verbose on apply only to that session.