Yuanbao
Tencent Yuanbao is Tencent’s AI assistant platform. The OpenClaw channel plugin connects Yuanbao bots to OpenClaw over WebSocket so they can interact with users through direct messages and group chats. Status: production-ready for bot DMs + group chats. WebSocket is the only supported connection mode.Quick start
Requires OpenClaw 2026.4.10 or above. Runopenclaw --versionto check. Upgrade withopenclaw update.
Add the Yuanbao channel with your credentials
--token value uses colon-separated appKey:appSecret format. You can obtain these from the Yuanbao app by creating a robot in your application settings.Interactive setup (alternative)
You can also use the interactive wizard:Access control
Direct messages
ConfiguredmPolicy to control who can DM the bot:
"pairing"— unknown users receive a pairing code; approve via CLI"allowlist"— only users listed inallowFromcan chat"open"— allow all users (default)"disabled"— disable all DMs
Group chats
Mention requirement (channels.yuanbao.requireMention):
true— require @mention (default)false— respond without @mention
Configuration examples
Basic setup with open DM policy
Restrict DMs to specific users
Disable @mention requirement in groups
Optimize outbound message delivery
Tune merge-text strategy
Common commands
| Command | Description |
|---|---|
/help | Show available commands |
/status | Show bot status |
/new | Start a new session |
/stop | Stop the current run |
/restart | Restart OpenClaw |
/compact | Compact the session context |
Yuanbao supports native slash-command menus. Commands are synced to the platform automatically when the gateway starts.
Troubleshooting
Bot does not respond in group chats
- Ensure the bot is added to the group
- Ensure you @mention the bot (required by default)
- Check logs:
openclaw logs --follow
Bot does not receive messages
- Ensure the bot is created and approved in the Yuanbao app
- Ensure
appKeyandappSecretare correctly configured - Ensure the gateway is running:
openclaw gateway status - Check logs:
openclaw logs --follow
Bot sends empty or fallback replies
- Check if the AI model is returning valid content
- The default fallback reply is: “暂时无法解答,你可以换个问题问问我哦”
- Customize it via
channels.yuanbao.fallbackReply
App Secret leaked
- Reset the App Secret in YuanBao APP
- Update the value in your config
- Restart the gateway:
openclaw gateway restart
Advanced configuration
Multiple accounts
defaultAccount controls which account is used when outbound APIs do not specify an accountId.
Message limits
maxChars— single message max character count (default:3000chars)mediaMaxMb— media upload/download limit (default:20MB)overflowPolicy— behavior when message exceeds limit:"split"(default) or"stop"
Streaming
Yuanbao supports block-level streaming output. When enabled, the bot sends text in chunks as it generates.disableBlockStreaming: true to send the complete reply in one message.
Group chat history context
Control how many historical messages are included in the AI context for group chats:Reply-to mode
Control how the bot quotes messages when replying in group chats:| Value | Behavior |
|---|---|
"off" | No quote reply |
"first" | Quote only the first reply per inbound message (default) |
"all" | Quote every reply |
Markdown hint injection
By default, the bot injects instructions in the system prompt to prevent the AI model from wrapping the entire reply in markdown code blocks.Debug mode
Enable unsanitized log output for specific bot IDs:Multi-agent routing
Usebindings to route Yuanbao DMs or groups to different agents.
match.channel:"yuanbao"match.peer.kind:"direct"(DM) or"group"(group chat)match.peer.id: user ID or group code
Configuration reference
Full configuration: Gateway configuration| Setting | Description | Default |
|---|---|---|
channels.yuanbao.enabled | Enable/disable the channel | true |
channels.yuanbao.defaultAccount | Default account for outbound routing | default |
channels.yuanbao.accounts.<id>.appKey | App Key (used for signing and ticket generation) | — |
channels.yuanbao.accounts.<id>.appSecret | App Secret (used for signing) | — |
channels.yuanbao.accounts.<id>.token | Pre-signed token (skips automatic ticket signing) | — |
channels.yuanbao.accounts.<id>.name | Account display name | — |
channels.yuanbao.accounts.<id>.enabled | Enable/disable a specific account | true |
channels.yuanbao.dm.policy | DM policy | open |
channels.yuanbao.dm.allowFrom | DM allowlist (user ID list) | — |
channels.yuanbao.requireMention | Require @mention in groups | true |
channels.yuanbao.overflowPolicy | Long message handling (split or stop) | split |
channels.yuanbao.replyToMode | Group reply-to strategy (off, first, all) | first |
channels.yuanbao.outboundQueueStrategy | Outbound strategy (merge-text or immediate) | merge-text |
channels.yuanbao.minChars | Merge-text: min chars to trigger send | 2800 |
channels.yuanbao.maxChars | Merge-text: max chars per message | 3000 |
channels.yuanbao.idleMs | Merge-text: idle timeout before auto-flush (ms) | 5000 |
channels.yuanbao.mediaMaxMb | Media size limit (MB) | 20 |
channels.yuanbao.historyLimit | Group chat history context entries | 100 |
channels.yuanbao.disableBlockStreaming | Disable block-level streaming output | false |
channels.yuanbao.fallbackReply | Fallback reply when AI returns no content | 暂时无法解答,你可以换个问题问问我哦 |
channels.yuanbao.markdownHintEnabled | Inject markdown anti-wrapping instructions | true |
channels.yuanbao.debugBotIds | Debug whitelist bot IDs (unsanitized logs) | [] |
Supported message types
Receive
- ✅ Text
- ✅ Images
- ✅ Files
- ✅ Audio / Voice
- ✅ Video
- ✅ Stickers / Custom emoji
- ✅ Custom elements (link cards, etc.)
Send
- ✅ Text (with markdown support)
- ✅ Images
- ✅ Files
- ✅ Audio
- ✅ Video
- ✅ Stickers
Threads and replies
- ✅ Quote replies (configurable via
replyToMode) - ❌ Thread replies (not supported by platform)
Related
- Channels Overview — all supported channels
- Pairing — DM authentication and pairing flow
- Groups — group chat behavior and mention gating
- Channel Routing — session routing for messages
- Security — access model and hardening