Yuanbao — Tencent AI Assistant
easy-to-understand guide based on official docs
Imagine you’re at a big company party, and you want your AI assistant to mingle in every conversation—both one-on-one chats and group discussions. That’s exactly what this feature does: it plugs your Hermes agent directly into Tencent’s Yuanbao messaging platform, so your AI can send and receive messages in real time, just like a helpful colleague.
What You Need Before Starting
Think of this like getting a gym membership—you need a few things first:
- A Yuanbao account with permission to create bots (ask your admin if unsure)
- Your personal APP_ID and APP_SECRET (like a username and password for your bot)
- Python packages installed on your computer
Run this command to install everything:
pip install websockets httpx aiofiles
Step 1: Create Your Bot
First, download the Yuanbao app from https://yuanbao.tencent.com/. Once you’re in:
- Go to PAI → My Bot
- Click “Create New Bot”
- After it’s made, copy your APP_ID and APP_SECRET—keep these safe, like your ATM PIN!
Step 2: Let the Wizard Do the Work
Hermes has a magic helper that sets everything up for you. Just type:
hermes gateway setup
When it asks, select Yuanbao. The wizard will:
- Ask for your APP_ID
- Ask for your APP_SECRET
- Save everything automatically
Pro tip: You don’t need to worry about WebSocket URLs or API domains—they come pre-filled with smart defaults. You only need to provide those two keys.
Step 3: Double-Check Your Settings
After the wizard finishes, look at your configuration file at ~/.hermes/.env. You should see something like:
YUANBAO_APP_ID=your_app_id_here
YUANBAO_APP_SECRET=your_secret_here
YUANBAO_WS_URL=wss://default-websocket-url
YUANBAO_API_DOMAIN=https://default-api-domain
If everything looks right, you’re ready to go!
What Makes This Special?
Yuanbao isn’t just any chat app—it’s built for serious business. It uses WebSocket (think of it as a permanent open phone line instead of sending letters back and forth) for instant message delivery. Plus, it supports rich media: images, files, and even voice messages. So your AI can send a screenshot, share a PDF, or forward a voice note, just like a real teammate.
Wrapping Up
Connecting Hermes to Yuanbao is like giving your AI a company badge—it can now join conversations, answer questions, and share files in real time. The whole setup takes less than five minutes, and the wizard handles the boring parts.
Practical tip for beginners: Start with a simple test—send a message to your bot in a one-on-one chat first. Once that works, try adding it to a group. This way, you’ll catch any setup issues early and build confidence before going full “AI colleague” mode. Happy automating!
📖 Official Docs
This article is based on the official Hermes Agent documentation:Official docs › user-guide/messaging/yuanbao