Yuanbao
Yuanbao
Start with meaning, then move to detail.
This lesson explains Yuanbao as part of getting started with Hermes correctly. You will learn what it does, when it matters, and the smallest safe test that proves it works.
If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?
For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.
For advanced readers, inspect Prerequisites, Setup, 1. Create a Bot in Yuanbao, then verify failure modes and version compatibility.
No prior experience is required; follow the steps on a safe test setup first.
A clear outcome before you read.
- Understand Yuanbao without assumed prior knowledge.
- Separate the source description from what still needs testing in your environment.
- Read the first command and identify its inputs and outputs before copying it.
Short definitions before the details.
- Gateway
- The process that connects Hermes to channels such as Telegram or Discord and routes messages.
Connect Hermes Agent to the Yuanbao enterprise messaging platform via WebSocket gateway
What does the source say, and in what order?
- 01Prerequisites
Start here to understand the core idea or structure.
- 02Setup
Read this after the foundation, then connect it to the previous step.
- 031. Create a Bot in Yuanbao
Read this after the foundation, then connect it to the previous step.
- 042. Run the Setup Wizard
Read this after the foundation, then connect it to the previous step.
- 053. Configure Environment Variables
Read this after the foundation, then connect it to the previous step.
- 064. Start the Gateway
Read this after the foundation, then connect it to the previous step.
- 07Features
Read this after the foundation, then connect it to the previous step.
- 08Configuration Options
Read this after the foundation, then connect it to the previous step.
- 09Chat ID Formats
Read this after the foundation, then connect it to the previous step.
- 10Media Uploads
Finish here to verify the result and special cases.
Copy only after you understand the effect.
pip install websockets httpx aiofileshermes gateway setup# Required
YUANBAO_APP_ID=your-app-id
YUANBAO_APP_SECRET=your-app-secret
YUANBAO_WS_URL=wss://api.yuanbao.example.com/ws
YUANBAO_API_DOMAIN=https://api.yuanbao.example.com
# Optional: bot account ID (normally obtained automatically from sign-token)
# YUANBAO_BOT_ID=your-bot-id
# Optional: internal routing environment (e.g. test/staging/production)
# YUANBAO_ROUTE_ENV=production
# Optional: home channel for cron/notifications (format: direct:<account> or group:<group_code>)
YUANBAO_HOME_CHANNEL=direct:bot_account_id
YUANBAO_HOME_CHANNEL_NAME="Bot Notifications"
# Optional: restrict access (Read the first command and identify its inputs and outputs before copying it.
Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.