Channels
Chat Only Trigger
Chat-only and whitelist safety plugin for OpenClaw public channels and group chats
Configuration Example
{
"plugins": {
"allow": ["chat-only-trigger"],
"entries": {
"chat-only-trigger": {
"enabled": true,
"config": {}
}
}
}
}
README
# chat-only-trigger
An OpenClaw plugin that forces selected turns into chat-only mode.
It now supports three activation styles:
- Keyword trigger: if the prompt contains a configured trigger word, this turn switches to chat-only mode.
- Non-whitelist trigger: if the sender is not on your allowlist, this turn switches to chat-only mode.
- Combined trigger: either condition can activate chat-only mode.
When active, the plugin:
- forces a fixed provider/model if configured
- appends a system instruction that forbids tools and actions
- blocks tool calls
- blocks subagent / ACP spawning
## Why this exists
OpenClaw is agent-first. That is powerful, but public-facing surfaces often need a safer mode:
- Bilibili mentions where strangers can @ the bot
- Telegram groups where only the owner/admins should be able to invoke agent actions
- Community channels where everyone should get replies, but only trusted users should get full agent capability
This plugin keeps the chat UX while temporarily shutting off agent execution.
## Install
Clone or install this plugin into your OpenClaw extensions directory, for example:
```bash
git clone https://github.com/constansino/openclaw-chat-only-trigger.git ~/.openclaw/extensions/chat-only-trigger
```
Then enable it in OpenClaw config:
```json
{
"plugins": {
"allow": ["chat-only-trigger"],
"entries": {
"chat-only-trigger": {
"enabled": true,
"config": {}
}
}
}
}
```
## Web UI
This plugin does not have a standalone page.
Its config is exposed through the built-in OpenClaw Control UI config form under:
`plugins.entries.chat-only-trigger.config`
Open `Config`, then search for `chat-only-trigger` or open the `plugins` section.
## Example: keyword-only
```json
{
"channels": ["bilibili"],
"triggerWords": ["只聊天模式"],
"policyMode": "trigger_only",
"modelOverride": "gpt-5.4",
"providerOverride": "wuju.de5.net"
}
```
## Example: public Bilibili default to chat-only, whitelist some UIDs
```json
{
"channels": ["bilibili"],
"policyMode": "non_whitelist",
"chatTypes": ["group"],
"whitelistSenderIds": ["3706942188948391", "39489993", "37253965", "527178615"],
"inheritBilibiliWhitelist": true,
"modelOverride": "gpt-5.4",
"providerOverride": "wuju.de5.net"
}
```
## Example: Telegram groups, only owner/admin IDs can use agent mode
```json
{
"channels": ["telegram"],
"policyMode": "non_whitelist",
"chatTypes": ["group"],
"whitelistSenderIds": ["123456789", "987654321"],
"modelOverride": "gpt-5.4",
"providerOverride": "wuju.de5.net"
}
```
## Notes
- `whitelistSenderUsernames` ignores a leading `@`.
- `inheritBilibiliWhitelist` automatically includes `channels.bilibili.whitelistUids` and `selfUid`.
- `channelFallbackWindowSeconds` is mainly for channels whose session naming does not map cleanly back to a conversation id.
- Restart the gateway after changing plugin code or config.
channels
Comments
Sign in to leave a comment