Yuanbao Channel: Connect Tencent AI Assistant Bots to OpenClaw
Learn how to connect Tencent Yuanbao bots to OpenClaw via WebSocket for DM and group chat. Covers setup, access control, and configuration for production use.
Read this when
- You want to connect a Yuanbao bot
- You are configuring the Yuanbao channel
Tencent Yuanbao serves as Tencent's AI assistant platform. Through the community-maintained openclaw-plugin-yuanbao plugin, Yuanbao bots connect to OpenClaw via WebSocket, enabling both direct messages and group chat interactions.
Status: ready for production use in bot DMs and group chats. WebSocket remains the sole supported connection method. The Tencent Yuanbao team maintains this plugin as an external catalog entry, separate from core OpenClaw; configuration and behavior details below (excluding installation and the standard CLI surface) originate from the plugin's own documentation and have not been validated against OpenClaw core source.
Quick start
OpenClaw 2026.4.10 or newer is required. Verify with openclaw --version; update using openclaw update.
Add the Yuanbao channel with your credentials
openclaw channels add --channel yuanbao --token "appKey:appSecret"
--token accepts colon-separated appKey:appSecret. To obtain these, create a bot within your application settings in the Yuanbao app.
Restart the gateway to apply the change
openclaw gateway restart
Interactive setup (alternative)
openclaw channels login --channel yuanbao
When prompted, provide your App ID and App Secret.
Access control
Direct messages
channels.yuanbao.dm.policy:
| Value | Behavior |
|---|---|
open (default) | Allow all users |
pairing | Unknown users get a pairing code; approve via CLI |
allowlist | Only users in allowFrom can chat |
disabled | Disable all DMs |
To approve a pairing request:
openclaw pairing list yuanbao
openclaw pairing approve yuanbao <CODE>
Group chats
channels.yuanbao.requireMention (defaults to true): in group settings, an @mention must precede any bot response. Replying to a message the bot itself sent counts as an implicit mention.
Configuration examples
Standard configuration with open DM policy:
{
channels: {
yuanbao: {
appKey: "your_app_key",
appSecret: "your_app_secret",
dm: {
policy: "open",
},
},
},
}
Limit DMs to designated users:
{
channels: {
yuanbao: {
appKey: "your_app_key",
appSecret: "your_app_secret",
dm: {
policy: "allowlist",
allowFrom: ["user_id_1", "user_id_2"],
},
},
},
}
Turn off the @mention requirement for groups:
{
channels: {
yuanbao: {
requireMention: false,
},
},
}
Outbound delivery adjustments:
{
channels: {
yuanbao: {
outboundQueueStrategy: "merge-text",
minChars: 2800, // buffer until this many chars
maxChars: 3000, // force split above this limit
idleMs: 5000, // auto-flush after idle timeout (ms)
},
},
}
Configure outboundQueueStrategy: "immediate" so each chunk transmits without buffering.
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 |
Native slash-command menus come built into Yuanbao; once the gateway starts, commands sync to the platform on their own.
Troubleshooting
Bot stays silent in group chats:
- Verify the bot has been added to the group
- Verify you @mention the bot (required unless disabled)
- Inspect logs:
openclaw logs --follow
Bot receives no messages:
- Verify the bot exists and has been approved in the Yuanbao app
- Verify
appKeyandappSecretare set up correctly - Verify the gateway is active:
openclaw gateway status - Inspect logs:
openclaw logs --follow
Bot replies with empty or fallback content:
- Check whether the AI model is producing valid output
- Default fallback text: "暂时无法解答,你可以换个问题问问我哦"
- Adjust via
channels.yuanbao.fallbackReply
App Secret exposed:
- Generate a new App Secret in the Yuanbao app
- Update the value in your configuration
- Restart the gateway:
openclaw gateway restart
Advanced configuration
Multiple accounts
{
channels: {
yuanbao: {
defaultAccount: "main",
accounts: {
main: {
appKey: "key_xxx",
appSecret: "secret_xxx",
name: "Primary bot",
},
backup: {
appKey: "key_yyy",
appSecret: "secret_yyy",
name: "Backup bot",
enabled: false,
},
},
},
},
}
When outbound APIs omit an accountId, defaultAccount determines which account gets used.
Message limits
maxChars: maximum characters allowed per message (default3000)mediaMaxMb: media upload/download size cap (default20MB)overflowPolicy: handling when a message exceeds the cap, either"split"(default) or"stop"
Streaming
Block-level streaming output is supported by Yuanbao; the bot transmits text in chunks as generation proceeds.
{
channels: {
yuanbao: {
disableBlockStreaming: false, // block streaming enabled (default)
},
},
}
Set disableBlockStreaming: true to deliver the full response as a single message.
Group chat history context
{
channels: {
yuanbao: {
historyLimit: 100, // default: 100, set 0 to disable
},
},
}
Determines how many prior messages are fed into the AI context for group conversations.
Reply-to mode
{
channels: {
yuanbao: {
replyToMode: "first", // "off" | "first" | "all" (default: "first")
},
},
}
| Value | Behavior |
|---|---|
off | No quote reply |
first | Quote only the first reply per inbound message (default) |
all | Quote every reply |
Markdown hint injection
Unless changed, the bot adds a system-prompt directive that stops the model from putting the entire reply inside a markdown code block.
{
channels: {
yuanbao: {
markdownHintEnabled: true, // default: true
},
},
}
Debug mode
{
channels: {
yuanbao: {
debugBotIds: ["bot_user_id_1", "bot_user_id_2"],
},
},
}
Turns on raw log output for the specified bot IDs.
Multi-agent routing
To send Yuanbao DMs or groups to different agents, use bindings:
{
agents: {
entries: {
main: { default: true },
"agent-a": { workspace: "/home/user/agent-a" },
"agent-b": { workspace: "/home/user/agent-b" },
},
},
bindings: [
{
agentId: "agent-a",
match: {
channel: "yuanbao",
peer: { kind: "direct", id: "user_xxx" },
},
},
{
agentId: "agent-b",
match: {
channel: "yuanbao",
peer: { kind: "group", id: "group_zzz" },
},
},
],
}
match.channel:"yuanbao"match.peer.kind:"direct"(DM) or"group"(group chat)match.peer.id: user ID or group code
Configuration reference
Complete setup details: Gateway configuration
| Setting | Description | Default |
|---|---|---|
channels.yuanbao.enabled | Turns the channel on or off | true |
channels.yuanbao.defaultAccount | Default account used for outbound routing | default |
channels.yuanbao.accounts.<id>.appKey | App Key, handles signing and ticket generation | - |
channels.yuanbao.accounts.<id>.appSecret | App Secret, used for signing | - |
channels.yuanbao.accounts.<id>.token | Pre-signed token, bypasses automatic ticket signing | - |
channels.yuanbao.accounts.<id>.name | Name shown for the account | - |
channels.yuanbao.accounts.<id>.enabled | Enables or disables a particular account | true |
channels.yuanbao.dm.policy | Policy for direct messages | open |
channels.yuanbao.dm.allowFrom | DM allowlist, a list of user IDs | - |
channels.yuanbao.requireMention | Requires @mention when in groups | true |
channels.yuanbao.overflowPolicy | How long messages are handled, either split or stop | split |
channels.yuanbao.replyToMode | Reply strategy for groups, options are off, first, all | first |
channels.yuanbao.outboundQueueStrategy | Outbound strategy, either merge-text or immediate | merge-text |
channels.yuanbao.minChars | Merge-text: minimum characters before sending | 2800 |
channels.yuanbao.maxChars | Merge-text: maximum characters per message | 3000 |
channels.yuanbao.idleMs | Merge-text: idle time in ms before auto-flush | 5000 |
channels.yuanbao.mediaMaxMb | Maximum media size in MB | 20 |
channels.yuanbao.historyLimit | Number of history entries for group chat context | 100 |
channels.yuanbao.disableBlockStreaming | Disables streaming output at the block level | false |
channels.yuanbao.fallbackReply | Fallback reply used when the model returns nothing | 暂时无法解答,你可以换个问题问问我哦 |
channels.yuanbao.markdownHintEnabled | Adds markdown anti-wrapping instructions | true |
channels.yuanbao.debugBotIds | Debug allowlist bot IDs, logs are not sanitized | [] |
Supported message types
Incoming: text, images, files, audio/voice, video, stickers/custom emoji, custom elements (link cards).
Outgoing: text (markdown), images, files, audio, video, stickers.
Threads and replies: quote replies are configurable via replyToMode; thread replies are not available on this platform.
Related
- Channels Overview - a list of every supported channel
- Pairing - the DM authentication and pairing process
- Groups - group chat behavior and mention restrictions
- Channel Routing - how messages are routed through sessions
- Security - the access model and hardening measures