Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
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.
Requires OpenClaw 2026.4.10 or above. Run
openclaw --versionopenclaw updatetextThe `--token` value uses colon-separated `appKey:appSecret` format. You can obtain these from the Yuanbao app by creating a robot in your application settings.
You can also use the interactive wizard:
bashopenclaw channels login --channel yuanbao
Follow the prompts to enter your App ID and App Secret.
Configure
dmPolicy"pairing""allowlist"allowFrom"open""disabled"Approve a pairing request:
bashopenclaw pairing list yuanbao openclaw pairing approve yuanbao <CODE>
Mention requirement (
channels.yuanbao.requireMentiontruefalseReplying to the bot's message in a group chat is treated as an implicit mention.
json5{ channels: { yuanbao: { appKey: "your_app_key", appSecret: "your_app_secret", dm: { policy: "open", }, }, }, }
json5{ channels: { yuanbao: { appKey: "your_app_key", appSecret: "your_app_secret", dm: { policy: "allowlist", allowFrom: ["user_id_1", "user_id_2"], }, }, }, }
json5{ channels: { yuanbao: { requireMention: false, }, }, }
json5{ channels: { yuanbao: { // Send each chunk immediately without buffering outboundQueueStrategy: "immediate", }, }, }
json5{ 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) }, }, }
| Command | Description |
|---|---|
text /help | Show available commands |
text /status | Show bot status |
text /new | Start a new session |
text /stop | Stop the current run |
text /restart | Restart OpenClaw |
text /compact | Compact the session context |
Yuanbao supports native slash-command menus. Commands are synced to the platform automatically when the gateway starts.
openclaw logs --followappKeyappSecretopenclaw gateway statusopenclaw logs --followchannels.yuanbao.fallbackReplyopenclaw gateway restartjson5{ 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, }, }, }, }, }
defaultAccountaccountIdmaxChars3000mediaMaxMb20overflowPolicy"split""stop"Yuanbao supports block-level streaming output. When enabled, the bot sends text in chunks as it generates.
json5{ channels: { yuanbao: { disableBlockStreaming: false, // block streaming enabled (default) }, }, }
Set
disableBlockStreaming: trueControl how many historical messages are included in the AI context for group chats:
json5{ channels: { yuanbao: { historyLimit: 100, // default: 100, set 0 to disable }, }, }
Control how the bot quotes messages when replying in group chats:
json5{ channels: { yuanbao: { replyToMode: "first", // "off" | "first" | "all" (default: "first") }, }, }
| Value | Behavior |
|---|---|
text "off" | No quote reply |
text "first" | Quote only the first reply per inbound message (default) |
text "all" | Quote every reply |
By default, the bot injects instructions in the system prompt to prevent the AI model from wrapping the entire reply in markdown code blocks.
json5{ channels: { yuanbao: { markdownHintEnabled: true, // default: true }, }, }
Enable unsanitized log output for specific bot IDs:
json5{ channels: { yuanbao: { debugBotIds: ["bot_user_id_1", "bot_user_id_2"], }, }, }
Use
bindingsjson5{ agents: { list: [ { id: "main" }, { id: "agent-a", workspace: "/home/user/agent-a" }, { id: "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" }, }, }, ], }
Routing fields:
match.channel"yuanbao"match.peer.kind"direct""group"match.peer.idFull configuration: Gateway configuration
| Setting | Description | Default |
|---|---|---|
text channels.yuanbao.enabled | Enable/disable the channel | text true |
text channels.yuanbao.defaultAccount | Default account for outbound routing | text default |
text channels.yuanbao.accounts.<id>.appKey | App Key (used for signing and ticket generation) | — |
text channels.yuanbao.accounts.<id>.appSecret | App Secret (used for signing) | — |
text channels.yuanbao.accounts.<id>.token | Pre-signed token (skips automatic ticket signing) | — |
text channels.yuanbao.accounts.<id>.name | Account display name | — |
text channels.yuanbao.accounts.<id>.enabled | Enable/disable a specific account | text true |
text channels.yuanbao.dm.policy | DM policy | text open |
text channels.yuanbao.dm.allowFrom | DM allowlist (user ID list) | — |
text channels.yuanbao.requireMention | Require @mention in groups | text true |
text channels.yuanbao.overflowPolicy | Long message handling ( text splittext stop | text split |
text channels.yuanbao.replyToMode | Group reply-to strategy ( text offtext firsttext all | text first |
text channels.yuanbao.outboundQueueStrategy | Outbound strategy ( text merge-texttext immediate | text merge-text |
text channels.yuanbao.minChars | Merge-text: min chars to trigger send | text 2800 |
text channels.yuanbao.maxChars | Merge-text: max chars per message | text 3000 |
text channels.yuanbao.idleMs | Merge-text: idle timeout before auto-flush (ms) | text 5000 |
text channels.yuanbao.mediaMaxMb | Media size limit (MB) | text 20 |
text channels.yuanbao.historyLimit | Group chat history context entries | text 100 |
text channels.yuanbao.disableBlockStreaming | Disable block-level streaming output | text false |
text channels.yuanbao.fallbackReply | Fallback reply when AI returns no content | text 暂时无法解答,你可以换个问题问问我哦 |
text channels.yuanbao.markdownHintEnabled | Inject markdown anti-wrapping instructions | text true |
text channels.yuanbao.debugBotIds | Debug whitelist bot IDs (unsanitized logs) | text [] |
replyToMode© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine