Files
hermes/README.md
2026-06-21 00:11:25 +08:00

116 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# hermes
Hermes Agent 部署與使用筆記。
## 部署位置
| 項目 | 值 |
|------|----|
| 主機 | `192.168.42.109` (root) |
| 安裝路徑 | `/root/.hermes` |
| 版本 | hermes-agent v0.17.0 |
| 進入點 | `/usr/local/bin/hermes``/root/.hermes/hermes-agent/venv/bin/hermes` |
## 模型 / API
走 Z.AI GLM設定於 `/root/.hermes/config.yaml`
```yaml
model:
default: glm-5.1
provider: zai
base_url: https://api.z.ai/api/paas/v4
```
API key 存於 `/root/.hermes/.env``GLM_API_KEY`(同步進 `auth.json` 的 zai credential pool
## 使用
```bash
ssh root@192.168.42.109
hermes # 進互動 chat
hermes -z "你的問題" # 一次性問答
hermes model # 換模型 / provider
hermes status # 狀態
hermes --help # 所有子指令
```
## Telegram
透過 gateway 整合 Telegram bot。
| 項目 | 值 |
|------|----|
| Bot | 小幫手 (@SystemAidBot) |
| Token | `/root/.hermes/.env``TELEGRAM_BOT_TOKEN` |
| 白名單 | `TELEGRAM_ALLOWED_USERS=949023145`(限 Timmy 本人) |
| 服務 | systemd user service `hermes-gateway`,已啟用 linger撐過登出 / 開機自啟) |
直接在 Telegram 跟 @SystemAidBot 對話即可。維運:
```bash
hermes gateway status # 狀態
hermes gateway restart # 重啟
journalctl --user -u hermes-gateway -f # 即時 log
```
> 預設無白名單時會拒絕所有人;新使用者第一次傳訊會被擋並在 log 留下其 user ID
> 把 ID 加進 `TELEGRAM_ALLOWED_USERS`(逗號分隔)再 `hermes gateway restart` 即可放行。
## 使用範例
Hermes 是有工具的 AI agent終端機、瀏覽器、網路搜尋、檔案、排程、記憶、影像等用自然語言下指令即可CLI `hermes chat` 或 Telegram @SystemAidBot 皆通)。
一般任務:
```
幫我查今天台北天氣
把這段話翻成英文:……
寫一支 Python 腳本算費氏數列,跑給我看
總結這個網址的重點https://…
這台機器的磁碟用量現在多少?
```
用工具做事:
```
打開瀏覽器去 google.com 搜「GLM-5.1」,截圖給我
在 /root 下建一個資料夾叫 test列出來確認
看 hermes-gateway 的最近 log
```
排程 / 主動推播(需先在 Telegram 打 `/sethome` 設主頻道):
```
每天早上 8 點推一則今日天氣給我
30 分鐘後提醒我喝水
每週一彙整一次系統狀態傳給我
```
記憶:
```
記住:我老婆叫 Una兒子叫 Jay
我之前跟你說過我兒子叫什麼?
```
常用斜線指令:
| 指令 | 用途 |
|------|------|
| `/new` | 開新對話(清掉前文) |
| `/status` | 看 session模型token |
| `/model` | 換模型 |
| `/stop` | 停掉背景任務 |
| `/background <任務>` | 丟背景跑,不卡對話 |
| `/sessions` | 瀏覽/回到舊對話 |
| `/sethome` | 設主頻道(收排程結果) |
| `/help` | 全部指令 |
## 安全元件 tirith
命令安全守衛 binary安裝於 `/root/.hermes/bin/tirith`v0.3.3)。
> 2026-04-14 首次安裝時因暫時性網路問題下載失敗,留下 `.tirith-install-failed` 標記擋住重試。
> 2026-06-20 已手動重裝(從 `sheeki03/tirith` releases 下載、SHA-256 驗證、清除標記),現正常運作。