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:

ValueBehavior
open (default)Allow all users
pairingUnknown users get a pairing code; approve via CLI
allowlistOnly users in allowFrom can chat
disabledDisable 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

CommandDescription
/helpShow available commands
/statusShow bot status
/newStart a new session
/stopStop the current run
/restartRestart OpenClaw
/compactCompact 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:

  1. Verify the bot has been added to the group
  2. Verify you @mention the bot (required unless disabled)
  3. Inspect logs: openclaw logs --follow

Bot receives no messages:

  1. Verify the bot exists and has been approved in the Yuanbao app
  2. Verify appKey and appSecret are set up correctly
  3. Verify the gateway is active: openclaw gateway status
  4. Inspect logs: openclaw logs --follow

Bot replies with empty or fallback content:

  1. Check whether the AI model is producing valid output
  2. Default fallback text: "暂时无法解答,你可以换个问题问问我哦"
  3. Adjust via channels.yuanbao.fallbackReply

App Secret exposed:

  1. Generate a new App Secret in the Yuanbao app
  2. Update the value in your configuration
  3. 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 (default 3000)
  • mediaMaxMb: media upload/download size cap (default 20 MB)
  • 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")
    },
  },
}
ValueBehavior
offNo quote reply
firstQuote only the first reply per inbound message (default)
allQuote 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

SettingDescriptionDefault
channels.yuanbao.enabledTurns the channel on or offtrue
channels.yuanbao.defaultAccountDefault account used for outbound routingdefault
channels.yuanbao.accounts.<id>.appKeyApp Key, handles signing and ticket generation-
channels.yuanbao.accounts.<id>.appSecretApp Secret, used for signing-
channels.yuanbao.accounts.<id>.tokenPre-signed token, bypasses automatic ticket signing-
channels.yuanbao.accounts.<id>.nameName shown for the account-
channels.yuanbao.accounts.<id>.enabledEnables or disables a particular accounttrue
channels.yuanbao.dm.policyPolicy for direct messagesopen
channels.yuanbao.dm.allowFromDM allowlist, a list of user IDs-
channels.yuanbao.requireMentionRequires @mention when in groupstrue
channels.yuanbao.overflowPolicyHow long messages are handled, either split or stopsplit
channels.yuanbao.replyToModeReply strategy for groups, options are off, first, allfirst
channels.yuanbao.outboundQueueStrategyOutbound strategy, either merge-text or immediatemerge-text
channels.yuanbao.minCharsMerge-text: minimum characters before sending2800
channels.yuanbao.maxCharsMerge-text: maximum characters per message3000
channels.yuanbao.idleMsMerge-text: idle time in ms before auto-flush5000
channels.yuanbao.mediaMaxMbMaximum media size in MB20
channels.yuanbao.historyLimitNumber of history entries for group chat context100
channels.yuanbao.disableBlockStreamingDisables streaming output at the block levelfalse
channels.yuanbao.fallbackReplyFallback reply used when the model returns nothing暂时无法解答,你可以换个问题问问我哦
channels.yuanbao.markdownHintEnabledAdds markdown anti-wrapping instructionstrue
channels.yuanbao.debugBotIdsDebug 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.

  • 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
1,376 words · updated Aug 12, 2026