Blog Entry
2026.04.10-hermes-agent
2026.04.10-hermes-agent
- Created
- 2026/04/10
- Updated
- 2026/04/10
环境
- Windows11 (宿主机)
- Ubuntu-24.04 (WSL)
chsrc
curl https://chsrc.run/posix | bashchsrc set ubuntuchsrc set uv# 有可能随到很久不更新的源, 导致某些版本下载不到chsrc set nvmchsrc set nodejschsrc set npm #需要先安装nodechsrc set bunuv
curl -LsSf https://astral.sh/uv/install.sh | sh安装
nodejs (nvm)
-
参考: nvm-sh/nvm
-
安装
nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash- 重开
UBuntu命令行 - 安装
nodejs
# 看下v24的LTS版本 (openclaw当前的推荐版本)nvm ls-remote 22 --lts
# 安装 (当前hermes推荐的lts)nvm install 22.22.2nvm use 22.22.2
# 查看node版本node -vHermes
- Hermes Agent — An Agent That Grows With You | Nous Research
- NousResearch/hermes-agent: The agent that grows with you
安装
# 官网安装脚本curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
# 或者修改并执行curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | sed 's/npm install --silent 2>\/dev\/null || {/npm install || {/g' | bash- 或者先下载脚本,修改一点再运行
curl https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh -o install.shvim install.sh- 安装
Node.js的依赖有可能会很久, 可以把运行输出打印处理
log_info "Installing Node.js dependencies (browser tools)..." cd "$INSTALL_DIR" npm install --silent 2>/dev/null || { log_warn "npm install failed (browser tools may not work)" }- 修改为:
log_info "Installing Node.js dependencies (browser tools)..." cd "$INSTALL_DIR" npm install || { log_warn "npm install failed (browser tools may not work)" }profile-xkyii
# 创建xkyiihermes profile create xkyii
# 使用xkyii作为默认profilehermes profile use xkyiiprofile-weche
# 创建xkyiihermes profile create wechat
# 使用xkyii作为默认profilehermes profile use wechat
mkdir -p ~/.hermes/profiles/wechat/skills/xky# cp -r ~/.xky/skills/. ~/.hermes/profiles/wechat/skills/xky/# .env不需要单独复制过来了# cp -r ~/.xky/skills/.env ~/.hermes/profiles/wechat/skills/xky/# 删除再复制for dir in ~/.xky/skills/xky*/; do target="$HOME/.hermes/profiles/wechat/skills/xky/$(basename "$dir")" echo $target rm -rf "$target" cp -r "$dir" "$target"done
mkdir -p ~/.hermes/profiles/wechat/skills/baoyucp -r ~/.agent/skills/. ~/.hermes/profiles/wechat/skills/baoyu/# 删除再复制for dir in ~/.agents/skills/baoyu*/; do target="$HOME/.hermes/profiles/wechat/skills/baoyu/$(basename "$dir")" rm -rf "$target" cp -r "$dir" "$target"done配置
hermes setupgateway
# 配置hermes gateway setup
# 后台运行hermes gateway start
# 前台运行hermes gateway run# 详细日志hermes gateway run -v$ hermes gateway setup
┌─────────────────────────────────────────────────────────┐│ ⚕ Gateway Setup │├─────────────────────────────────────────────────────────┤│ Configure messaging platforms and the gateway service. ││ Press Ctrl+C at any time to exit. │└─────────────────────────────────────────────────────────┘
⚠ Gateway service is installed but not running. Start it now? [Y/n]: y✓ User service started
◆ Messaging Platforms
─── 📱 Telegram Setup ───
1. Open Telegram and message @BotFather 2. Send /newbot and follow the prompts to create your bot 3. Copy the bot token BotFather gives you 4. To find your user ID: message @userinfobot — it replies with your numeric ID
Paste the token from @BotFather (step 3 above). Bot token:✓ Saved TELEGRAM_BOT_TOKEN
Paste your user ID from step 4 above. The gateway DENIES all users by default for security. Enter user IDs to create an allowlist, or leave empty and you'll be asked about open access next. Allowed user IDs (comma-separated): xkyii✓ Saved — only these users can interact with the bot.
For DMs, this is your user ID. You can set it later by typing /set-home in chat. Home channel ID (for cron/notification delivery, or empty to set later with /set-home): xky05✓ Saved TELEGRAM_HOME_CHANNEL
✓ 📱 Telegram configured!
◆ Messaging Platforms Skipped (keeping current)
────────────────────────────────────────────────────────── Restart the gateway to pick up changes? [Y/n]: y✓ User service restartedtelegram
早上起来发现gateway的状态不对, telegram连不上:
$ hermes gateway status● hermes-gateway.service - Hermes Agent Gateway - Messaging Platform Integration Loaded: loaded (/home/xkyii/.config/systemd/user/hermes-gateway.service; enabled; preset: enabled) Active: active (running) since Sat 2026-04-11 12:21:05 CST; 8s ago Main PID: 285 (python) Tasks: 4 (limit: 18995) Memory: 120.8M (peak: 121.5M) CPU: 502ms CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/hermes-gateway.service └─285 /home/xkyii/.hermes/hermes-agent/venv/bin/python -m hermes_cli.main gateway run --replace
Apr 11 12:21:05 xky05 systemd[218]: Started hermes-gateway.service - Hermes Agent Gateway - Messaging Platform Integration.Apr 11 12:21:11 xky05 python[285]: WARNING gateway.platforms.telegram_network: [Telegram] Primary api.telegram.org…4.167.220Hint: Some lines were ellipsized, use -l to show in full.✓ User gateway service is running
Recent gateway health: ⚠ telegram: Telegram startup failed: Timed out✓ Systemd linger is enabled (service survives logout)配置了一下代理, 给api.telegram.org或telegram.org添加额外的代理规则就好
Skills
安装skill: https://skills.sh/anthropics/skills/docx安装skill: https://skills.sh/anthropics/skills/xlsx安装skill: https://skills.sh/d4vinci/scrapling/scrapling-official安装skill: https://clawhub.ai/excalibur9527/mediacrawler-skill- docx by anthropics/skills, claude自带
- xlsx by anthropics/skills, claude自带
- scrapling-official by d4vinci/scrapling, 网页内容抓取. (知乎导出Cookie也能抓)
- Media Crawler — ClawHub, 抓取基于 MediaCrawler 的多平台公开信息采集工具, 支持平台
- 小红书(xhs)
- 抖音(dy)
- 快手(ks)
- B站(bili)
- 微博(wb)
- 贴吧(tieba)
- 知乎(zhihu)