🎯 重點摘要: Hermes Agent 是 Nous Research 開發的開源 AI 助手,支援 CLI 與多頻道整合:
① 理解 Hermes Agent 的特色 (記憶、排程、子代理器、沙箱、MCP)
② 安裝 Hermes Agent (curl 腳本 / macOS / Windows / Linux)
③ 掌握基本操作 (chat、send、setup、model、config)
④ 完整 CLI 命令速查 (12 大類指令)
⑤ 進階技巧 (子代理器、沙箱、排程、MCP、skills、bundles)
⑥ 常見問題解決
30 分鐘從零開始,把強大的 AI 助手架設在你的電腦或 VPS 上!
前言 — 什麼是 Hermes Agent?
Hermes Agent 是一個開源的 AI 助手平台,由 Nous Research 開發,以 MIT 授權釋出。你可以把它想像成「可跑在你的電腦或 VPS 上的一個會思考並執行任務的 AI 助手」。
與以付費為主的 AI 助手不同,Hermes Agent 的特色包括:
- 跨平台連接 — Telegram、Discord、Slack、WhatsApp、Signal、Email、CLI
- 持久記憶 — 學習你的習慣,永遠記得解決問題的方法
- 自然語言排程 — 「每天早上發報表」、「週五備份資料」
- 子代理器 — 同時執行多個獨立的 AI 任務
- 網頁瀏覽 & 視覺 — 支援網頁搜尋、圖片生成、多模態推理
- 沙箱隔離 — 五種沙箱後端 (本地、Docker、SSH、Singularity、Modal)
| 方案 | 開源 | 自架 | 多頻道 | 記憶功能 | 沙箱 |
|---|---|---|---|---|---|
| Hermes Agent | ✅ | ✅ | ✅ | ✅ | ✅ |
| Claude Code | ❌ | ❌ | 部分 | ❌ | ❌ |
| ChatGPT | ❌ | ❌ | ❌ | ❌ | ❌ |
| OpenClaw | ✅ | ✅ | ✅ | ✅ | ✅ |
安裝教學
系統需求
| 需求 | 說明 |
|---|---|
| 作業系統 | macOS / Linux / Windows / WSL2 / Android (Termux) |
| 依賴 | Git、curl、xz-utils (Linux) — 安裝器會自動安裝 Python (uv)、Node.js、ripgrep、ffmpeg |
方法 1:安裝腳本 (推薦)
官方提供一鍵安裝腳本,自動處理所有依賴:
macOS / Linux / WSL2:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh \
| bash
Windows (PowerShell):
iex (irm https://hermes-agent.nousresearch.com/install.ps1)
⚠️ Linux 前置需求:
sudo apt install curl xz-utils build-essential
方法 2:Native 桌面應用程式
官網也提供 macOS / Windows / Linux 的圖形化安裝包,可從 官網 下載。
驗證安裝
hermes --version
hermes doctor # 診斷安裝環境
基本使用
設定 (Setup)
首次安裝後,執行設定精靈來配置模型、API 金鑰、語音和工具:
# 互動式設定 (推薦)
hermes setup
# 僅設定缺少的項目
hermes setup --quick
# 無互動模式 (使用預設值)
hermes setup --non-interactive
# 一鍵 Nous Portal 設定
hermes setup --portal
選擇 AI 模型
# 互動式選擇模型提供商與模型
hermes model
# 在聊天時臨時切換模型
hermes chat -q "你好" -m claude-3-5-sonnet-20241022
支援的提供商包括:OpenRouter、Anthropic、OpenAI、Google、以及許多本地模型。
開始聊天
# 啟動互動式聊天
hermes chat
# 單次查詢 (非互動)
hermes chat -q "解釋一下什麼是 TCP 三向交握"
# 靜默模式 (僅輸出回答)
hermes -z "解釋一下什麼是 TCP 三向交握"
發送訊息到通道
# 發送訊息到 Telegram
hermes send -t telegram:<聊天對象> "幫我發一下明天的會議提醒"
# 發送檔案
hermes send -t discord:<頻道> -f /path/to/report.md -s "每日報告"
全局選項 (Global Options)
所有命令都支援以下全局選項:
| 選項 | 說明 |
|---|---|
--profile <name> |
選擇配置檔個人檔案 |
--resume <session> |
恢復指定對話 |
--continue / -c |
恢復最近的對話 |
--worktree / -w |
使用獨立的 git 工作樹 |
--tui |
啟動終端應用程式 (TUI) |
--yolo |
跳過所有確認提示 |
--dev |
以 TypeScript 原始碼模式啟動 (開發用) |
--safe-mode |
停用所有客製化設定 |
完整 CLI 命令速查
以下是 Hermes Agent 支援的所有 CLI 命令,按功能分類整理:
對話與互動
| 命令 | 說明 |
|---|---|
hermes chat |
互動式聊天或單次查詢 (-q 單次, -z 靜默) |
hermes send |
發送訊息到平台 (Telegram, Discord 等) |
hermes --resume |
恢復之前的對話 |
hermes --continue |
繼續最近的對話 |
設定與配置
| 命令 | 說明 |
|---|---|
hermes setup |
互動式設定精靈 (--quick、--portal、--non-interactive) |
hermes model |
模型提供商與模型選擇器 |
hermes config |
配置檔管理 (show、edit、get、set、unset、path) |
hermes auth |
認證管理 (add、list、remove、logout、status) |
hermes tools |
工具配置 (啟用/停用特定平台工具) |
系統管理
| 命令 | 說明 |
|---|---|
hermes status |
顯示代理人/認證/平台狀態 |
hermes doctor |
診斷配置與依賴問題 |
hermes logs |
查看/過濾日誌 (agent、errors、gateway、gui) |
hermes update |
更新到最新版本 (--check 預覽, --backup 備份) |
hermes backup |
備份設定到 zip 檔 (--output、--quick、--label) |
hermes import |
從備份 zip 還原 |
hermes dump |
顯示可供複製的設定摘要 |
消息與頻道 (Messaging & Channels)
| 命令 | 說明 |
|---|---|
hermes gateway |
管理消息閘道 (run、start/stop/restart、status、setup) |
hermes whatsapp |
設定 WhatsApp 橋樨 |
hermes whatsapp-cloud |
設定 Meta WhatsApp Business Cloud API |
hermes slack |
生成 Slack 應用程式清單單 (manifest) |
hermes pairing |
批准/撤銷消息配對 |
開發工具 (Development Tools)
| 命令 | 說明 |
|---|---|
hermes skills |
瀏覽/安裝/配置技能 (browse、install、list、update、uninstall) |
hermes bundles |
將多個技能組合成單個 /<name> 指令 |
hermes mcp |
管理 MCP 伺服器 (install、serve、add、list、test、configure) |
hermes completion |
生成 shell 自動補全腳本 |
進階功能 (Advanced Features)
| 命令 | 說明 |
|---|---|
hermes portals |
工具閘道路由 |
hermes egress |
出站憑證注入防火牆 |
hermes kanban |
多配置文件協作面板 |
hermes insights |
Token/費用/活動分析 |
hermes sandbox |
沙箱管理 (local、Docker、SSH、Singularity、Modal) |
hermes moa |
配置 Mixture of Agents 預設集 |
hermes memory |
配置外部記憶提供商 |
hermes sessions |
管理對話 (list、export、delete、rename) |
hermes cron |
檢查 cron 排程器 |
進階技巧
子代理器 (Subagents)
Hermes Agent 支援同時執行多個獨立的 AI 子代理器,每個都有自己的會話、終端和 Python 腳本:
# 與子代理器一起聊天
hermes chat -q "請同時研究 Kubernetes 和 Docker 的差異" -s k8s-research
沙箱隔離 (Sandboxing)
Hermes Agent 支援五種沙箱後端,可以安全地執行代碼:
# 使用 Docker 沙箱
hermes chat -q "幫我執行一個 Python 腳本" --profile docker
# 使用 SSH 沙箱 (遠端伺服器)
hermes chat --profile ssh
自然語言排程 (Scheduling)
只要在對話中告訴 Hermes 什麼時候執行,即可自動排程:
# 在聊天中輸入:
# "每天早上 9 點發送周報到 Slack"
# "週五下午 5 點備份資料庫"
# "明天下午 2 點提醒我開會"
# 查看排程
hermes cron
技能擴展 (Skills & Bundles)
Hermes Agent 支援透過技能 (skills) 擴展功能,並將多個技能組合成 bundles:
# 瀏覽可用技能
hermes skills browse
# 安裝技能
hermes skills install github-issues
# 建立 bundle (將多個技能組合)
hermes bundles create dev-tools --skill github --skill jira --skill terminal
# 管理 MCP 伺服器
hermes mcp install context7
設定管理最佳實踪
- 使用
--profile建立多個獨立配置 (如dev、prod、personal) - 定期執行
hermes backup create備份你的設定 - 使用
hermes logs -f --level debug即時監看日誌 - 配置完成後執行
hermes doctor驗證環境健康狀態 - 使用
hermes -z "..."來自腳本自動化 (僅輸出回答)
常見問題 (FAQ)
Q1: Hermes Agent 支援哪些 AI 模型?
支援眾多提供商,包括:
- OpenRouter — 支援 300+ 模型
- Anthropic — Claude 3/4 系列
- OpenAI — GPT-4、o1 等
- Google — Gemini 1.5/2.0
- 本地模型 — 透過 Ollama、llama.cpp 等
Q2: Hermes Agent 的免費版有什麼限制?
免費版本支援所有功能,但每月有使用額度。付費方案 (Plus/Super/Ultra) 提供:
- 每月 AI 額度
- 300+ 模型透過 Nous Portal 存取
- 優先支援
- 進階功能解鎖
Q3: Hermes Agent 資料安全嗎?
支援 本地部署 與 沙箱隔離。你的 API 金鑰存在本地,並可選擇使用本地模型 (如 Ollama) 完全不經第三方伺服器。
Q4: 如何在 VPS 上部署 Hermes Agent?
# 在 VPS 上安裝
curl -fsSL https://hermes-agent.nousresearch.com/install.sh \
| bash
# 設定 Gateway 服務 (background)
hermes gateway install
hermes gateway start
# 配置 Telegram/Discord
hermes gateway setup
Q5: 如何更新 Hermes Agent?
# 檢查更新
hermes update --check
# 更新並備份
hermes update --backup --yes