Mention Policy (mention-mode)
In a regular group, the bot by default answers only messages that explicitly @-mention it. The mention policy decides when you can skip the @.
It only decides "is this message calling this bot?" — it does not grant permissions. Skipping the @ never skips authorization: people without talk access are still blocked (see Permissions & Authorization).
Pick a mode
Two more notes:
@alldoes not count as calling someone else; underambientthe bot still answers.- Under
topic, a reply inside a topic that only @-mentions someone else also makes the bot yield.
How to set it
There are two levels, and the per-group setting wins:

Change it with a command in the group
Send in a regular group (in a multi-bot group, @ the specific bot):
- Viewing (
statusor no argument): talk access is enough. - Changing: requires operate rights (owner /
allowedUsers). - Changes apply immediately, affect only this group, and leave the bot default alone.
- Setting a group to the same value as the bot default means "follow the default again": if the bot default changes later, this group changes too. (Exception: bots with
signedChatDefaultson keep the setting as written; see "Trusted group-creation service" at the end.)
Which groups support it
Only regular groups:
- DMs: never need an @.
- Topic groups: already topic-shaped; the command replies "no need to set it here".
- Session groups created by
/group: managed by the bot itself; changes are rejected.
Mode is always — why does it still answer without an @?
"Must be @-mentioned" is the default rule, but a set of parallel exceptions exists; matching any one makes the bot answer. When the bot "won't listen", it is almost always one of these:
A few details:
- Except for message listeners (case 3), every case requires the sender to have talk access.
- Cases 7, 8 and 9 also yield to explicit naming: if the message starts by @-mentioning someone else, the bot doesn't take it. But in
/solve @someone, the @ after the command is an argument, so the command still fires. - In multi-bot groups where bots shouldn't talk over each other, prefer
ambient: whoever is named answers.
Tip: sent a message and forgot the @? Use Lark's Edit to add an @ to this bot — that triggers it too.
Substitute mode: answer when someone else is @-mentioned
Substitute mode makes the bot a stand-in for certain people: when someone in a group @-mentions one of them (without @-mentioning the bot), the bot answers on their behalf. It suits people who get @-mentioned with questions all the time, such as the on-call engineer or a project owner.
Turn it on
In Dashboard Bot Config → Sessions → Substitute mode, turn on Enable substitute trigger and add substitute targets. Changes take effect as soon as you save.
- You can enter an email directly. On save it is resolved to this app's Open ID; entries that fail to resolve are marked red and not saved.
- You can also enter an Open ID, User ID, or Union ID. An Open ID must belong to this bot's app; Open IDs from other apps, and people outside the app's contact visibility scope, are rejected.
- Turning it on needs at least one matchable target, otherwise saving fails.
The sender still needs talk access; substitute mode does not loosen permissions. To let everyone in a group ask by @-mentioning a target, combine it with On-Call Mode.
Which messages trigger it
- Only text and rich-text messages where the sender typed the @ themselves. @-mentions carried in by a forwarded card or a merged forward don't count.
- If the message @-mentions a target but its body starts with
/(a slash command), it doesn't trigger; the @ in the command is treated as an argument and the message keeps its normal routing. - When trigger keywords are configured, the body must also contain one of them, otherwise the bot doesn't answer and the message is dropped outright — it won't fall through to any other path (existing session, no-@ modes, solo groups) (see
keywordsbelow). - Regular groups: the substitute turn goes into the group's group-scope session, and the reply is anchored to the trigger message.
- Topic groups: the substitute turn goes into that topic's own session (a new one is started if none exists), and the reply stays in the topic.
Settings
Each Dashboard field maps to substituteMode in this bot's bots.json entry:
A few notes:
- When editing bots.json by hand, an email-only target matches no one: Lark @-mentions don't carry email. The email is only kept as a label; if substitute mode is enabled but no target has an
openId/userId/unionId/appId, the wholesubstituteModeblock is ignored on load. To add people by email, save them in the Dashboard so they are resolved to Open IDs. - Run
botmux restartafter editing by hand. - In a blocked group, a message that @-mentions a target is ignored outright and doesn't fall through to other no-@ rules. Direct @-mentions of the bot are still answered.
Bot substitute targets by App ID
To have the bot answer for another bot, choose App ID as the target type and enter cli_...; in bots.json write { "appId": "cli_example" }. No Open ID or chat ID is needed, and display names are never used for matching.
- @-mentions in both text and rich-text messages count, whether a person or a bot with talk access sent them.
- The allow list, block list, per-group
/substitute off, trigger keywords and active-topic rules work exactly as for Open ID targets, and a message they hold back doesn't fall through to other paths either. Messages from bots go through the same rules; when one is held back it also doesn't start a session through new-topic auto-start. - Lark events only carry the receiver-scoped Open ID, so the bot reads the message again through the Get Message API to learn the App ID. If that read fails, returns a different version of the message, or the identities don't line up, the message isn't treated as an App ID substitute trigger.
- When a substitute message from a bot waits in the session queue, the sender's access and the substitute settings are checked again right before it runs. If the sender is revoked or blocked, or substitute mode is turned off or changed meanwhile, the message is dropped.
- Saving only checks the format (uppercase is converted to lowercase). It doesn't check that the app exists or is in the group, and doesn't request extra scopes to look up names. A malformed
appIdin a hand-edited bots.json is logged as a warning and that target is ignored.
Per-group toggle
Substitute mode is on by default in every group it applies to. To switch it off for one group, @ the bot in that group:
- Anyone can check status; switching needs operate access (owner /
allowedUsers). - Works in regular and topic groups, not in DMs.
- If the group is blocked, or it is a topic group while
topicGroupsis off, the command tells you it can't be used here instead of pretending it was turned on.
Turn off "no @ in 1-person-1-bot groups"
A group with one human and one bot needs no @ by default. To make these groups follow the mention policy, configure the bot's bots.json entry:
In the example, only oc_example keeps the exception; all other groups have it off. To turn it off for just one group, keep the bot default and set that group to false in the map.
Run botmux restart after editing by hand.
Once it's off:
- The effective mention policy (per-group first) decides:
alwaysneeds @;topicstill allows non-@ follow-ups in topics the bot handles;never/ambientbehave as usual. - Under
always/topic, non-@ top-level text or images no longer start a session just because the group is small. - The switch applies to regular and topic groups, not DMs; permission checks and "yield when someone else is named" still apply.
This switch only removes the implicit "small group" exception. Message listeners, no-@ commands, substitutes, and auto-start on group join / new topic are separate settings. For strict @-only behavior: set the switch to false, set the group's mention policy to always, and check that the group has no other triggers enabled.
Also, "1 person, 1 bot" is judged by group membership. When a message @-mentions another member, the bot re-checks membership, so an old bot won't grab the turn right after a new bot joins. If the mentioned person isn't in the group (Lark allows mentioning non-members) and the re-check still shows one human and one bot, the exception still applies.
Advanced: trusted group-creation service
If your deployment uses a trusted group-creation service and signedChatDefaults is enabled in bots.json, groups created by that service default to ambient. The order then is: the group's /mention-mode setting → the service-declared ambient → the bot default. This only affects whether an @ is needed; it never loosens permissions.
Related: whether a reply lands in a new topic or the current session is controlled by
/reply-mode; see Slash Commands.
