Group Activation
When the owner tags you into a group on any messaging platform, follow this procedure.
Prerequisites
INLINECODE0 , groupAllowFrom, and groups.*.requireMention are set so that only the owner can wake you in any group. Trigger phrases are defined in agents.list[main].groupChat.mentionPatterns. This applies to WhatsApp, Signal, Telegram, and other supported platforms.
Procedure
Step 1 — Capture context
From the inbound message metadata: platform (e.g. whatsapp, signal), group ID (the chat_id / from field), and duration (parse from the owner's message — default 30 minutes if unspecified).
Step 2 — Open the gate
Patch channels.<platform>.groups.<group_id>.requireMention to false in openclaw.json. The gateway file-watches the config and hot-reloads channel changes automatically — no restart needed.
Step 3 — Respond naturally
Say hi, introduce yourself briefly if it's a new group. Participate like a human in a group chat — use judgment about when to contribute. Do not respond to every message.
Step 4 — Set a closing cron job
Create a one-shot cron job (kind: "at") for the parsed duration. When it fires: patch requireMention back to true for this group in openclaw.json, then send a brief goodbye to the group. The gateway hot-reloads and the gate closes — no owner action needed.
Step 5 — Confirm
Tell the owner the window is open and when it closes: "Joined! I'll be here for 60 minutes — going quiet at 4:19 PM."
Controls
- - Extend: owner says
@<agent> stay for another X mins → cancel existing cron, set a new one - Close early: owner says
@<agent> that's enough / close → patch requireMention: true immediately, cancel cron, say goodbye
Notes
- - Group ID is in inbound message metadata (
chat_id / from field) - Config changes hot-reload — no gateway restart or Docker restart needed
- When closing, remove the specific group entry from
groups or set requireMention: true to return to the wildcard default
群组激活
当主人在任何消息平台将你标记到群组中时,请遵循以下流程。
前置条件
channels..groupPolicy、groupAllowFrom 和 groups.*.requireMention 已设置,确保只有主人能在任何群组中唤醒你。触发短语定义在 agents.list[main].groupChat.mentionPatterns 中。这适用于 WhatsApp、Signal、Telegram 及其他支持的平台。
流程
步骤 1 — 获取上下文
从入站消息元数据中获取:平台(例如 whatsapp、signal)、群组 ID(chat_id / from 字段)和持续时间(从主人的消息中解析——如未指定,默认 30 分钟)。
步骤 2 — 开启通道
在 openclaw.json 中将 channels..groups..requireMention 修改为 false。网关会通过文件监听自动热加载配置变更——无需重启。
步骤 3 — 自然回应
打招呼,如果是新群组则简要自我介绍。像人类一样参与群聊——判断何时发言。不要回复每一条消息。
步骤 4 — 设置关闭定时任务
为解析出的持续时间创建一个一次性定时任务(kind: at)。触发时:在 openclaw.json 中将该群组的 requireMention 改回 true,然后向群组发送简短告别。网关热加载后通道关闭——无需主人操作。
步骤 5 — 确认
告知主人通道已开启及关闭时间:已加入!我将在这里停留 60 分钟——下午 4:19 将静默退出。
控制指令
- - 延长: 主人说 @ 再待 X 分钟 → 取消现有定时任务,设置新任务
- 提前关闭: 主人说 @ 够了 / 关闭 → 立即将 requireMention 设为 true,取消定时任务,发送告别
注意事项
- - 群组 ID 在入站消息元数据中(chat_id / from 字段)
- 配置变更热加载——无需重启网关或 Docker
- 关闭时,从 groups 中移除特定群组条目,或将 requireMention 设为 true 以恢复通配符默认值