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:

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 (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

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 are supported by Yuanbao; when the gateway starts, commands sync to the platform automatically.

Troubleshooting

Bot does not respond in group chats:

  1. Confirm the bot is added to the group
  2. Confirm you @mention the bot (required by default)
  3. Check logs: openclaw logs --follow

Bot does not receive messages:

  1. Confirm the bot is created and approved in the Yuanbao app
  2. Confirm appKey and appSecret are correctly configured
  3. Confirm the gateway is running: openclaw gateway status
  4. Check logs: openclaw logs --follow

Bot sends empty or fallback replies:

  1. Check whether the AI model is returning valid content
  2. Default fallback reply: "暂时无法解答,你可以换个问题问问我哦"
  3. Customize with channels.yuanbao.fallbackReply

App Secret leaked:

  1. Reset the App Secret in the Yuanbao app
  2. Update the value in your config
  3. 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 (default 3000)
  • mediaMaxMb: limit for media uploads and downloads (default 20 MB)
  • 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")
    },
  },
}
ValueBehavior
offNo quote reply
firstQuote only the first reply per inbound message (default)
allQuote 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

SettingDescriptionDefault
channels.yuanbao.enabledTurns the channel on or offtrue
channels.yuanbao.defaultAccountAccount used by default for outbound routingdefault
channels.yuanbao.accounts.<id>.appKeyApp Key (used for signing and ticket generation)-
channels.yuanbao.accounts.<id>.appSecretApp Secret (used for signing)-
channels.yuanbao.accounts.<id>.tokenToken that is already signed (bypasses automatic ticket signing)-
channels.yuanbao.accounts.<id>.nameDisplay name shown for the account-
channels.yuanbao.accounts.<id>.enabledTurns a particular account on or offtrue
channels.yuanbao.dm.policyPolicy applied to DMsopen
channels.yuanbao.dm.allowFromAllowlist for DMs (list of user IDs)-
channels.yuanbao.requireMentionWhether an @mention is required in groupstrue
channels.yuanbao.overflowPolicyHow long messages are handled (split or stop)split
channels.yuanbao.replyToModeReply-to behavior in groups (off, first, all)first
channels.yuanbao.outboundQueueStrategyOutbound behavior (merge-text or immediate)merge-text
channels.yuanbao.minCharsMerge-text: smallest character count that triggers a send2800
channels.yuanbao.maxCharsMerge-text: largest character count per message3000
channels.yuanbao.idleMsMerge-text: idle time before automatic flush (ms)5000
channels.yuanbao.mediaMaxMbSize cap for media (MB)20
channels.yuanbao.historyLimitNumber of context entries kept for group chat history100
channels.yuanbao.disableBlockStreamingTurns off block-level streaming outputfalse
channels.yuanbao.fallbackReplyReply used as a fallback when the model returns no content暂时无法解答,你可以换个问题问问我哦
channels.yuanbao.markdownHintEnabledAdds markdown instructions that prevent wrappingtrue
channels.yuanbao.debugBotIdsBot 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.

  • 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
1,454 words · updated Oct 25, 2026