一條命令把 Hermes Agent 接上 iMessage,盡享絲滑「完整教程」

一句話概覽

✅Hermes Agent v0.17.0 已支持通過 Photon 收發 iMessage。

✅按照步驟操作3分鐘搞定!

✅不需要準備常駐 Mac,也不需要配置公網地址。完成設置後,直接用 iPhone 的「信息」App 給 Photon 分配的號碼發消息,就能與 Hermes Agent 對話。

⭕重磅!Hermes Agent v0.17.0 正式發佈 ! Hermes 進一步拓展了多端連接、異步協作與跨網絡集成能力,升級爲全功能指揮中心。 以下爲核心更新摘要 1. 獨立支持 iMessage - 無需 Mac 中繼或 BlueBubbles 設置。 - 運行 hermes photon login 即可通過 Photon 直連收發 iMessage。 

📋 準備條件

開始前需要:

  • 已安裝最新版 Hermes Agent

  • Node.js 18.17 或更高版本

  • 一個能夠接收 iMessage 的手機號

  • 一個 Photon 賬號,沒有的話可以在配置過程中註冊

先檢查 Node.js 版本:

node --version

🔑 第一步:配置 Photon

可以通過 Hermes Gateway 的統一向導配置:

hermes gateway setup

在嚮導中選擇 Photon iMessage

也可以直接運行 Photon 配置命令:

hermes photon setup --phone +你的手機號

手機號必須使用國際格式。中國大陸手機號示例:

hermes photon setup --phone +8613800000000

命令運行後,終端會顯示設備授權地址和驗證碼。按照提示打開 Photon Dashboard,登錄並批准設備。

頁面顯示 Device connected 後,回到終端等待配置繼續執行。

Hermes 會自動完成 Photon 項目創建、手機號註冊、依賴安裝和授權配置。成功後會顯示:

✓ phone registered
✓ allowlisted your number (PHOTON_ALLOWED_USERS)

┌─ Your agent's iMessage number ───────────────────────────────
│ 📱 +16xxxxxxxxx // 🔥提供一個號碼,保存好
│ Text this number from your phone to talk to your agent.
└──────────────────────────────────────────────────────────────

✓ Photon setup complete.

請記下終端顯示的 iMessage 號碼。

安裝依賴時可能出現 npm audit 的 vulnerabilities 提示。只要最後顯示 Photon setup complete,就代表配置成功。

不要運行 npm audit fix –force,它可能升級並破壞 sidecar 所需的依賴版本。

▶ 第二步:啓動 Gateway

首次啓動可以運行:

hermes gateway start --platform photon

如果 Gateway 已經在運行,重啓即可:

hermes gateway restart

🔍 第三步:檢查連接狀態

檢查 Photon:

hermes photon status

重點確認以下項目正常:

device token : ✓ stored
project secret : ✓ stored
assigned number : +1...
sidecar deps : ✓ installed

再檢查 Gateway:

hermes gateway status

看到下面的提示,說明 Gateway 正在運行:

✓ System gateway service is running

💬 第四步:發送 iMessage

打開 iPhone 的「信息」App,新建 iMessage,將收件人填寫爲 Photon 分配的號碼,然後發送一條消息:

你好,介紹一下你自己

Hermes Agent 正常回復,就代表接入完成。

hermes photon setup 會自動把配置時填寫的手機號加入允許名單。其他號碼首次發送消息時,可能需要進行配對。

查看待批准的配對請求:

hermes pairing list

批准配對:

hermes pairing approve photon <配對碼>

✅Hermes Agent iMessage安排上了。 實測響應速度比 ******** 快,更絲滑 另外,不需要就可以隨時溝通,爽歪歪 Good Job!

👥 Photon 後臺與免費額度

登錄 Photon Dashboard 後,進入 Spectrum → Users,可以查看當前用戶、綁定的手機號以及分配的 iMessage 號碼。

免費版每個項目最多添加 10 個用戶。需要讓其他人使用時,點擊 Add user,填寫對方的手機號即可。

Photon 使用共享 iMessage 線路池,因此不同用戶在 Texts on 一欄中看到的收件號碼可能不同,這是正常現象。

免費版目前還有以下額度:

  • 每個 server 每天最多處理 5000 條消息

  • 每條共享線路每天最多發起 50 次新對話

日常個人使用通常足夠。額度或線路需求更高時,需要聯繫 Photon 升級方案。

❓ 常見問題

  • Photon 依賴沒有安裝

如果 hermes photon status 顯示 sidecar deps 缺失,運行:

hermes photon install-sidecar
hermes gateway restart

  • Device token 缺失

如果狀態中顯示 device token 缺失,重新運行配置並完成登錄:

hermes photon setup --phone +你的手機號

  • 沒有分配 iMessage 號碼

如果 Photon Dashboard 顯示 No iMessage line assigned yet,重新運行:

hermes photon setup --phone +你的手機號

完成後再次檢查:

hermes photon status

  • Gateway 服務定義過期

升級 Hermes 後如果看到:

Installed gateway service definition is outdated

運行:

sudo hermes gateway restart --system

  • 發消息沒有回覆

依次檢查:

hermes photon status
hermes gateway status
hermes logs gateway

確認 Photon 已連接、sidecar 已啓動、Gateway 正在運行,並檢查發送消息的手機號是否已被允許或完成配對。

📚 寫在最後

如果這篇對你有幫助,關注 + 收藏 + 轉發走一個唄 👏

關注 勵志man,會持續更新新手向的教程和 AI 工具用得上的心得。

更多遊戲資訊請關註:電玩幫遊戲資訊專區

電玩幫圖文攻略 www.vgover.com