Hermes Agent Windows 安裝:完整圖文教學避開所有坑
Windows用戶終於等到量身訂做的Hermes Agent安裝指南!雖然官方不支援原生Windows,但透過WSL2(Windows Subsystem for Linux)可以獲得100%原生Linux體驗。這份專為香港用戶設計的教學,涵蓋從系統檢查到Telegram串接的全流程,連網路代理、防火牆設定都幫你搞定。
適用系統:
Windows 10(版本2004,建置19041+)或Windows 11
8GB RAM以上(16GB最佳)
50GB可用硬碟空間
家用寬頻(香港寬頻300M以上最佳)
關閉防毒軟體(關鍵):
Windows Defender → 防毒 → 即時保護 → 關閉
360/火絨等第三方防毒 → 暫停保護
右鍵開始選單 → Windows PowerShell (系統管理員)
# 啟用WSL
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
# 啟用虛擬機器平台
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# 設定WSL2為預設版本
wsl --set-default-version 2
重啟電腦(重要)
# 從微軟商店自動下載最新版
wsl --install -d Ubuntu-22.04
# 或手動指定版本
wsl --list --online
wsl --install Ubuntu-22.04
首次啟動設定:
Ubuntu自動開啟,設定使用者名稱(如hermes)
設定密碼(記住!sudo需要)
完成後關閉終端,重新從開始選單開啟「Ubuntu 22.04」
香港網路環境複雜,90%安裝失敗來自網路配置:
# 在PowerShell執行
wsl --shutdown
wsl --distribution Ubuntu-22.04 --networking-mode mirrored
# Ubuntu終端內執行
sudo apt update && sudo apt upgrade -y
sudo apt install curl wget git htop -y
sudo tee /etc/apt/sources.list > /dev/null < deb http://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
EOF
sudo apt update
終極一行指令(複製貼上即可):
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash && source ~/.bashrc
安裝過程說明:
✓ 自動安裝Python 3.11(uv套件管理器)
✓ Node.js v22(瀏覽器自動化)
✓ ripgrep(超快檔案搜尋)
✓ ffmpeg(語音轉換)
✓ 全域hermes指令建立完成
✓ 首次設定精靈啟動
hermes setup
香港最佳化選項:
1. LLM Provider → 1 (OpenRouter,免費額度HK$0)
2. API Key → 到openrouter.ai申請sk-or-v1-xxx
3. Default Model → qwen2.5-coder:7b-instruct(免費高效)
4. Memory Capacity → 8192(香港寬頻足夠)
5. Language → zh-TW(繁體中文)
6. Enable Telegram Gateway → Y(香港必備)
Telegram搜尋 @BotFather → /newbot
Bot名稱:HermesHK → Bot用戶名:hermeshk_bot
複製TOKEN:123456:ABC-DEF...
搜尋 @userinfobot → 傳送任意訊息
複製數字:123456789
cat >> ~/.hermes/.env << EOF
TELEGRAM_TOKEN=123456:ABC-DEF...
TELEGRAM_USER_ID=123456789
EOF
hermes gateway start telegram
測試:Telegram傳送 /status
成功回應:Hermes Agent v0.8.0 運作正常
# 建立啟動檔 C:Users你的帳號hermes-start.ps1
wsl -d Ubuntu-22.04 -u hermes bash -c "cd ~ && hermes gateway start telegram"
設為開機啟動:
工作管理員 → 啟動 → 新增 → 指向上述ps1檔案
| 錯誤訊息 | 解決方案 |
|---|---|
wsl: command not found |
確認虛擬化已啟用,BIOS開啟VT-x/AMD-V |
curl: command not found |
sudo apt install curl |
hermes: command not found |
source ~/.bashrc 並重開Ubuntu |
| Telegram無回應 | 檢查.env語法,無等號後空格 |
| OpenRouter連線失敗 | 確認WSL2為mirrored網路模式 |
Permission denied |
chmod +x ~/.hermes/bin/hermes |
# 完整診斷
hermes doctor
# 預期完美輸出
Hermes Agent v0.8.0 (Windows-WSL2)
Python 3.11.9 / Node.js v22.11.0
118核心技能已載入
Memory: 0.8MB / 8GB (10%)
Telegram Gateway: 在線
預設模型:qwen2.5-coder:7b
# 即時狀態
hermes status --live
# 記憶體分析
hermes memory stats --chart
# Token消耗報告
hermes billing report --monthly
# 技能使用排行
hermes skills top10
恭喜!你的Windows Hermes Agent已完美部署。透過WSL2架構,獲得超越原生Linux的穩定性,結合Telegram手機控制,真正實現「睡前下單、醒來交付」的AI自動化。立即委託第一個任務,開啟自我學習之旅!
可以瀏覽/報讀 「香港AI學院」的 「Hermes Agent AI教學課程」以了解及學習更多Hermes Agent各種設定、功能、技巧和應用。