Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenClaw treats group chats consistently across surfaces: Discord, iMessage, Matrix, Microsoft Teams, Signal, Slack, Telegram, WhatsApp, Zalo.
OpenClaw "lives" on your own messaging accounts. There is no separate WhatsApp bot user. If you are in a group, OpenClaw can see that group and respond there.
Default behavior:
groupPolicy: "allowlist"messageTranslation: allowlisted senders can trigger OpenClaw by mentioning it.
*.allowFrom*.groupPolicy*.groups*.groupAllowFromrequireMention/activationQuick flow (what happens to a group message):
textgroupPolicy? disabled -> drop groupPolicy? allowlist -> group allowed? no -> drop requireMention? yes -> mentioned? no -> store for context only otherwise -> reply
For group/channel rooms, OpenClaw defaults to
messages.groupChat.visibleReplies: "message_tool"message(action=send)If the message tool is unavailable under the active tool policy, OpenClaw falls back to automatic visible replies instead of silently suppressing the response.
openclaw doctorFor direct chats and any other source turn, use
messages.visibleReplies: "message_tool"messages.groupChat.visibleRepliesThis replaces the old pattern of forcing the model to answer
NO_REPLYTyping indicators are still sent while the agent works in tool-only mode. The default group typing mode is upgraded from "message" to "instant" for these turns because there may never be normal assistant message text before the agent decides whether to call the message tool. Explicit typing-mode config still wins.
To restore legacy automatic final replies for group/channel rooms:
json5{ messages: { groupChat: { visibleReplies: "automatic", }, }, }
The gateway hot-reloads
messagesTo require visible output to go through the message tool for every source chat:
json5{ messages: { visibleReplies: "message_tool", }, }
Native slash commands (Discord, Telegram, and other surfaces with native command support) bypass
visibleReplies: "message_tool"/...Two different controls are involved in group safety:
groupPolicygroupsgroupAllowFromBy default, OpenClaw prioritizes normal chat behavior and keeps context mostly as received. This means allowlists primarily decide who can trigger actions, not a universal redaction boundary for every quoted or historical snippet.
Group message flow
If you want...
| Goal | What to set |
|---|---|
| Allow all groups but only reply on @mentions | text groups: { "*": { requireMention: true } } |
| Disable all group replies | text groupPolicy: "disabled" |
| Only specific groups | text groups: { "<group-id>": { ... } }text "*" |
| Only you can trigger in groups | text groupPolicy: "allowlist"text groupAllowFrom: ["+1555..."] |
agent:<agentId>:<channel>:group:<id>agent:<agentId>:<channel>:channel:<id>:topic:<threadId>Yes — this works well if your "personal" traffic is DMs and your "public" traffic is groups.
Why: in single-agent mode, DMs typically land in the main session key (
agent:main:mainagent:main:<channel>:group:<id>mode: "non-main"This gives you one agent "brain" (shared workspace + memory), but two execution postures:
text```json5} { agents: { defaults: { sandbox: { mode: "non-main", scope: "session", workspaceAccess: "none", docker: { binds: [ // hostPath:containerPath:mode "/home/user/FriendsShared:/data:ro", ], }, }, }, }, } ```
Related:
displayName<channel>:<token>#roomg-<slug>-#@+._-Control how group/room messages are handled per channel:
json5{ channels: { whatsapp: { groupPolicy: "disabled", // "open" | "disabled" | "allowlist" groupAllowFrom: ["+15551234567"], }, telegram: { groupPolicy: "disabled", groupAllowFrom: ["123456789"], // numeric Telegram user id (wizard can resolve @username) }, signal: { groupPolicy: "disabled", groupAllowFrom: ["+15551234567"], }, imessage: { groupPolicy: "disabled", groupAllowFrom: ["chat_id:123"], }, msteams: { groupPolicy: "disabled", groupAllowFrom: ["user@org.com"], }, discord: { groupPolicy: "allowlist", guilds: { GUILD_ID: { channels: { help: { allow: true } } }, }, }, slack: { groupPolicy: "allowlist", channels: { "#general": { allow: true } }, }, matrix: { groupPolicy: "allowlist", groupAllowFrom: ["@owner:example.org"], groups: { "!roomId:example.org": { enabled: true }, "#alias:example.org": { enabled: true }, }, }, }, }
| Policy | Behavior |
|---|---|
text "open" | Groups bypass allowlists; mention-gating still applies. |
text "disabled" | Block all group messages entirely. |
text "allowlist" | Only allow groups/rooms that match the configured allowlist. |
Quick mental model (evaluation order for group messages):
Group messages require a mention unless overridden per group. Defaults live per subsystem under
*.groups."*"Replying to a bot message counts as an implicit mention when the channel supports reply metadata. Quoting a bot message can also count as an implicit mention on channels that expose quote metadata. Current built-in cases include Telegram, WhatsApp, Slack, Discord, Microsoft Teams, and ZaloUser.
json5{ channels: { whatsapp: { groups: { "*": { requireMention: true }, "123@g.us": { requireMention: false }, }, }, telegram: { groups: { "*": { requireMention: true }, "123456789": { requireMention: false }, }, }, imessage: { groups: { "*": { requireMention: true }, "123": { requireMention: false }, }, }, }, agents: { list: [ { id: "main", groupChat: { mentionPatterns: ["@openclaw", "openclaw", "\\+15555550123"], historyLimit: 50, }, }, ], }, }
Some channel configs support restricting which tools are available inside a specific group/room/channel.
toolstoolsBySenderid:<senderId>e164:<phone>username:<handle>name:<displayName>"*"id:Resolution order (most specific wins):
Example (Telegram):
json5{ channels: { telegram: { groups: { "*": { tools: { deny: ["exec"] } }, "-1001234567890": { tools: { deny: ["exec", "read", "write"] }, toolsBySender: { "id:123456789": { alsoAllow: ["exec"] }, }, }, }, }, }, }
When
channels.whatsapp.groupschannels.telegram.groupschannels.imessage.groups"*"Common intents (copy/paste):
Group owners can toggle per-group activation:
/activation mention/activation alwaysOwner is determined by
channels.whatsapp.allowFrom/activationGroup inbound payloads set:
ChatType=groupGroupSubjectGroupMembersWasMentionedMessageThreadIdIsForumChannel-specific notes:
GroupMembersThe agent system prompt includes a group intro on the first turn of a new group session. It reminds the model to respond like a human, avoid Markdown tables, minimize empty lines and follow normal chat spacing, and avoid typing literal
\nchat_id:<id>imsg chats --limit 20chat_idSee WhatsApp for the canonical WhatsApp system prompt rules, including group and direct prompt resolution, wildcard behavior, and account override semantics.
See Group messages for WhatsApp-only behavior (history injection, mention handling details).
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine