Group Rules with requireMention and mentionPatterns
Set group requireMention and messages mentionPatterns so OpenClaw only responds when explicitly addressed.
Group Rules with requireMention and mentionPatterns is a free OpenClaw Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the OpenClaw Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Calm in Group Chats
In a busy group, you do not want your assistant replying to everything. Group rules let it stay quiet until it is actually addressed. 🤫
Meet requireMention
The key for this is requireMention. Turn it on for a group and OpenClaw only answers when someone explicitly mentions it.
groups: {
"*": { requireMention: true }
}The Star Means All
That * wildcard means every group. Setting requireMention under it applies the rule to all groups on that channel at once.
Where It Lives
requireMention sits inside a channel's groups block. So it is per platform, letting you keep group manners channel by channel.
whatsapp: {
groups: { "*": { requireMention: true } }
}Meet mentionPatterns
Next, how does it know it was mentioned? mentionPatterns lists the words that count as calling your assistant by name.
messages: {
groupChat: { mentionPatterns: ["@openclaw"] }
}Where mentionPatterns Sits
mentionPatterns lives under messages.groupChat. It is a list, so you can register more than one way people might tag the assistant.
Adding Patterns
Want a friendlier handle? Add more entries to the list. Any matching mention in a group will wake your assistant up.
mentionPatterns: ["@openclaw", "@claw"]How They Work Together
The two pair up: requireMention says wait to be called, and mentionPatterns defines what being called sounds like.
A Combined Example
Here both keys work as a team in openclaw.json: groups require a mention, and the patterns define the trigger word.
channels: { whatsapp: {
groups: { "*": { requireMention: true } }
} }Less Noise
Together these settings cut the noise. Your assistant ignores normal chatter and steps in only when a group member tags it.
Apply and Test
Save the file, restart OpenClaw, then send a mention in a group. A reply confirms your patterns and requireMention are working.
Quick Check
Match each key to its job.
Recap
You tamed group chats: requireMention waits to be called, and mentionPatterns defines the call. Next, the smart defaults. ✅
Frequently asked questions
Is the “Group Rules with requireMention and mentionPatterns” lesson free?
Yes — the full text of “Group Rules with requireMention and mentionPatterns” is free to read here on the web, and the OpenClaw Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the OpenClaw Academy course, upgrade to CoddyKit PRO.
What will I learn in “Group Rules with requireMention and mentionPatterns”?
Set group requireMention and messages mentionPatterns so OpenClaw only responds when explicitly addressed. You practise OpenClaw Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start OpenClaw Academy?
No prior experience is required. OpenClaw Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Group Rules with requireMention and mentionPatterns” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this OpenClaw Academy lesson?
Yes. Every OpenClaw Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- The openclaw.json Config File
- Allowlisting Senders with allowFrom
- Group Rules with requireMention and mentionPatterns
- Defaults When You Configure Nothing