Yuanbao Channel: Tencent AI Bot Setup and Configuration
Overview of the community-maintained Yuanbao plugin that connects Tencent Yuanbao bots to OpenClaw over WebSocket for DMs and group chats. Covers installation, credentials, and configuration.
Read this when
- You want to connect a Yuanbao bot
- You are configuring the Yuanbao channel
Tencent Yuanbao is Tencent's AI assistant platform. A community-maintained plugin, openclaw-plugin-yuanbao, links Yuanbao bots to OpenClaw via WebSocket, covering direct messages and group chats.
Status: production-ready for bot DMs and group chats. WebSocket is the only connection mode available. The Tencent Yuanbao team maintains this plugin as an external catalog entry rather than core OpenClaw; the configuration and behavior details below (apart from installation and the generic CLI surface) are drawn from the plugin's own docs and have not been verified against OpenClaw core source.
Quick start
OpenClaw 2026.4.10 or newer is required. Verify with openclaw --version; upgrade using openclaw update.
Add the Yuanbao channel with your credentials
openclaw channels add --channel yuanbao --token "appKey:appSecret"
--token expects appKey:appSecret separated by colons. Obtain these values from the Yuanbao app by creating a bot under your application settings.
Verify the channel
Configuration changes are applied through hot reload. Confirm the channel is ready:
openclaw channels status --probe
If the Gateway is offline, start it.
Interactive setup (alternative)
openclaw channels login --channel yuanbao
The prompts will ask for your App Key (appKey) and App Secret (appSecret).
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 (default true): the bot will only respond in a group after an @mention. A reply to one of the bot's own messages counts as an implicit mention.
Configuration examples
Basic setup with an open DM policy:
{
channels: {
yuanbao: {
appKey: "your_app_key",
appSecret: "your_app_secret",
dm: {
policy: "open",
},
},
},
}
Limit DMs to specific 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 in groups:
{
channels: {
yuanbao: {
requireMention: false,
},
},
}
Tuning outbound delivery:
{
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)
},
},
}
With outboundQueueStrategy: "immediate" set, each chunk is sent 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 are supported by Yuanbao; when the gateway starts, commands sync to the platform automatically.
Troubleshooting
Bot does not respond in group chats:
- Confirm the bot is added to the group
- Confirm you @mention the bot (required by default)
- Check logs:
openclaw logs --follow
Bot does not receive messages:
- Confirm the bot is created and approved in the Yuanbao app
- Confirm
appKeyandappSecretare correctly configured - Confirm the gateway is running:
openclaw gateway status - Check logs:
openclaw logs --follow
Bot sends empty or fallback replies:
- Check whether the AI model is returning valid content
- Default fallback reply: "暂时无法解答,你可以换个问题问问我哦"
- Customize with
channels.yuanbao.fallbackReply
App Secret leaked:
- Reset the App Secret in the Yuanbao app
- Update the value in your config
- Verify that hot reload applied the new credentials with
openclaw channels status --probe.
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 do not specify an accountId, defaultAccount determines which account gets used.
Message limits
maxChars: maximum number of characters per message (default3000)mediaMaxMb: limit for media uploads and downloads (default20MB)overflowPolicy: what happens when a message goes over the limit,"split"(default) or"stop"
Streaming
Yuanbao can stream output at the block level: text is delivered in chunks while the bot generates it.
{
channels: {
yuanbao: {
disableBlockStreaming: false, // block streaming enabled (default)
},
},
}
To have the full reply delivered as a single message, set disableBlockStreaming: true.
Group chat history context
{
channels: {
yuanbao: {
historyLimit: 100, // default: 100, set 0 to disable
},
},
}
Determines the number of past messages fed into the AI context for group chats.
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
By default, the bot adds a system-prompt instruction so the model does not wrap its whole reply in 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 unsanitized log output for the bot IDs you list.
Multi-agent routing
To route Yuanbao DMs or groups to different agents, use bindings:
{
agents: {
ownership: "explicit",
defaults: {
systemAgent: { agentId: "main" },
},
entries: {
main: { workspace: "~/.openclaw/workspace" },
"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" },
},
},
{ agentId: "main", match: { channel: "yuanbao", accountId: "*" } },
],
talk: { agentId: "main" },
}
match.channel:"yuanbao"match.peer.kind:"direct"(DM) or"group"(group chat)match.peer.id: user ID or group code
Configuration reference
Complete configuration reference: Gateway configuration
| Setting | Description | Default |
|---|---|---|
channels.yuanbao.enabled | Turns the channel on or off | true |
channels.yuanbao.defaultAccount | Account used by default 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 | Token that is already signed (bypasses automatic ticket signing) | - |
channels.yuanbao.accounts.<id>.name | Display name shown for the account | - |
channels.yuanbao.accounts.<id>.enabled | Turns a particular account on or off | true |
channels.yuanbao.dm.policy | Policy applied to DMs | open |
channels.yuanbao.dm.allowFrom | Allowlist for DMs (list of user IDs) | - |
channels.yuanbao.requireMention | Whether an @mention is required in groups | true |
channels.yuanbao.overflowPolicy | How long messages are handled (split or stop) | split |
channels.yuanbao.replyToMode | Reply-to behavior in groups (off, first, all) | first |
channels.yuanbao.outboundQueueStrategy | Outbound behavior (merge-text or immediate) | merge-text |
channels.yuanbao.minChars | Merge-text: smallest character count that triggers a send | 2800 |
channels.yuanbao.maxChars | Merge-text: largest character count per message | 3000 |
channels.yuanbao.idleMs | Merge-text: idle time before automatic flush (ms) | 5000 |
channels.yuanbao.mediaMaxMb | Size cap for media (MB) | 20 |
channels.yuanbao.historyLimit | Number of context entries kept for group chat history | 100 |
channels.yuanbao.disableBlockStreaming | Turns off block-level streaming output | false |
channels.yuanbao.fallbackReply | Reply used as a fallback when the model returns no content | 暂时无法解答,你可以换个问题问问我哦 |
channels.yuanbao.markdownHintEnabled | Adds markdown instructions that prevent wrapping | true |
channels.yuanbao.debugBotIds | Bot IDs allowed to produce unsanitized debug logs | [] |
Supported message types
Receive: text, images, files, audio/voice, video, stickers/custom emoji, and custom elements (link cards).
Send: text (markdown), images, files, audio, video, and stickers.
Threads and replies: quote replies are available and controlled by replyToMode; the platform does not support thread replies.
Related
- Channels Overview - every channel that is supported
- Pairing - how DMs are authenticated and paired
- Groups - how group chats behave and how mention gating works
- Channel routing - how messages are routed to sessions
- Security - the access model and hardening guidance