一人企業创始人常在一下午同时扮演調研員、数据清潔工与文案——三个角色、一条时间线。Hermes Agent(Nous Research)内置 delegate_task,可 spawn 隔离子 Agent,各自独立终端。父 Agent 当协调者;每个子 Agent 只有新会话、明确 goal 与受限 toolset——仅摘要回到老板上下文。
无需像 CrewAI 那样手写编排类。用自然语言描述成果——找资料、规范化 CSV、写周报——Hermes 默认最多 並行 3 个子 Agent(可调 delegation.max_concurrent_children)。尚未安裝?请看 Hermes macOS 安裝設定指南 或 Hermes Mac mini M4 教學 了解常开 Mac 方案。
為何 delegate_task 勝過手寫多 Agent 程式碼
CrewAI 等框架要求先用 Python 定義角色、任務與依賴。Hermes 由父級 LLM 依複雜度決定是否委派;底層為每個子 Agent 建立獨立終端。
子 Agent 的系統提示來自 goal 與 context。上游提醒:goal="修復錯誤" 會失敗——請把堆疊、目錄、輸出 schema 寫進 context。
葉子 subagent 不能呼叫 delegate_task、clarify、memory、send_message、execute_code。
預設並行 3 個。路徑不衝突時可同時調研、規範化與寫稿;共享檔案寫入請在老板提示裡串行。
機械變換建議 execute_code。子 Agent 預設繼承父級 API 憑證。
把 delegate_task 當契約:你定義結果與路徑,父 Agent 拆解 spawn,你在磁碟驗收。
與 CrewAI 對比,看流程變更頻率;一人企業週報適合 Hermes 自然語言改分工。
台灣存取 Telegram 或部分 API 需自備網路;閘道常開 Mac 需穩定出站。
CrewAI 等框架要求先用 Python 定義角色、任務與依賴。Hermes 由父級 LLM 依複雜度決定是否委派。
底層為每個子 Agent 提供零父歷史、獨立終端、摘要回傳父執行緒,以及預設最多 3 的並行批次。
| Factor | CrewAI-style code | Hermes delegate_task |
|---|---|---|
| 搭建方式 | Python 角色、任務、Agent | 自然語言描述 + Hermes CLI |
| 上下文隔離 | 自行接 memory buffer | 每個子 Agent 全新會話 |
| 並行度 | 自選執行器 | 批次模式 + 執行緒池(預設 3) |
| 工具權限 | 自訂工具綁定 | toolsets 參數(web、terminal、file 等) |
可引用: 葉子 subagent 不能呼叫 delegate_task、clarify、memory、send_message、execute_code——父級須在 context 寫全指令。
架構:老闆、員工與 toolsets
每個子 Agent 的提示來自 goal 與 context。請貼上堆疊、路徑與 schema。
葉子 worker 被屏蔽的 toolsets 含 delegation、memory、clarify。
You (solopreneur)
│
▼
Hermes parent agent ──delegate_task(tasks=[A, B, C])──┐
│ │
│ ┌──────────────┬──────────────┐ │
│ ▼ ▼ ▼ │
│ Subagent A Subagent B Subagent C
│ toolsets:web terminal+file web+file
│ │ │ │
│ └──── summaries back to parent ──┘
▼
Final merged brief / files on disk
可在 ~/.hermes/config.yaml 的 delegation 區塊設定迭代上限、並發、逾時與更便宜的子模型。
子 Agent 預設繼承父級 API 憑證(可覆寫)。
delegation:
max_iterations: 50
max_concurrent_children: 3
child_timeout_seconds: 600
model: "google/gemini-2.0-flash-001"
provider: "openrouter"
spawn 前規劃分工——子 Agent 中途不能向你澄清。
一人企業工作流:三名 AI 員工
以一人 SaaS 週報為例:
日常不必直接調 Python API——在 Hermes TUI 用老闆提示驅動 delegate_task 批次。
| 員工 | 角色 | Hermes toolsets | 產出 |
|---|---|---|---|
| A — 调研员 | 找 10 个一手来源 | ["web"] | 要点列表 + URL |
| B — 分析师 | 抓取页面并生成 sources.csv | ["terminal", "file", "web"] | CSV 位于 ~/work/newsletter/ |
| C — 写稿员 | 基于 CSV 写约 800 字 | ["file"] | draft.md,含 H2 大纲 |
在 Hermes TUI 輸入老闆提示:
Run this week's newsletter pipeline for topic "Mac mini CI for iOS teams":
1) Delegate research: 10 authoritative sources from 2025–2026.
2) Delegate data: save title,url,summary into ~/work/newsletter/sources.csv.
3) Delegate writing: draft draft.md (~800 words) using only that CSV.
Use parallel delegation where safe. Report file paths when done.
Hermes 应发出类似上游示例的 delegate_task 批次:
delegate_task(tasks=[
{
"goal": "Research Mac mini CI for iOS teams",
"context": "Need 10 sources from 2025–2026. Prefer Apple, GitHub Actions, and Mac host vendors. Return bullet list with URLs.",
"toolsets": ["web"]
},
{
"goal": "Build sources.csv from research output",
"context": "CSV columns: title,url,summary. Path: ~/work/newsletter/sources.csv. Create directory if missing.",
"toolsets": ["terminal", "file"]
},
{
"goal": "Draft newsletter markdown",
"context": "Read ~/work/newsletter/sources.csv only. Write ~/work/newsletter/draft.md ~800 words, H2 sections, no fabricated URLs.",
"toolsets": ["file"]
}
])
父 Agent 合併摘要;你在磁碟驗收。機械變換優先 execute_code。
macOS 分步運行手冊(8 步)
本 8 步手冊假設你已在可控 Mac 上安裝 Hermes,涵蓋工具、工作區、可選 Skill、會話、驗收與排程。
- 安裝 Hermes — 若未安裝,依 Hermes macOS 安裝設定指南:
curl -fsSL …/install.sh | bash,再hermes doctor。 - 啟用工具 — 執行
hermes tools,確認 delegation、web、terminal、file 工具集已開啟。 - 建立工作區 —
mkdir -p ~/work/newsletter,讓每個 context 指向同一路徑。 - 可選設定 — 在
~/.hermes/config.yaml加入delegation:區塊。 - 可複用 Skill(可選) — 在
~/.hermes/skills/newsletter-pipeline/保存三員工老闆指令。 - 執行老闆會話 —
hermes貼上流線提示;/agents查看子樹與 token。 - 驗收產出 — 開啟
sources.csv與draft.md;失敗單腿可單獨重委派。 - 排程(可選) — 週期任務用 Hermes cron 文件Hermes cron documentation,勿指望 Ctrl+C 後 delegate_task 仍在背景執行。
故障排查
子 Agent 回傳空泛摘要
現象: 幾秒就結束且輸出無用。
修復: 父級 context 不足。補上路徑、欄位範例後重跑。子 Agent 不繼承父級歷史。
批次並發報錯
現象: 一次傳 4+ 任務時報錯。
修復: 預設 max_concurrent_children 為 3。拆批或在 config.yaml / 環境變數中提高上限。
子 Agent 600 秒逾時
現象: child_timeout_seconds 中途終止調研。
修復: 調大 delegation.child_timeout_seconds 或縮小 goal。可查 subagent-timeout 日誌。
delegate_task 與 execute_code 對比
選對工具再 spawn 三個推理環。
| Use | Tool | Why |
|---|---|---|
| 需要判断的多步调研 | delegate_task | 完整推理 + 工具 |
| 万行 CSV 机械排序过滤 | execute_code | 更低 token 成本 |
| 固定夜间 ETL | cronjob + 脚本 | 可扛父进程中断 |
蘋果 Mac mini 規格 寫明 M4 基礎款 16GB——夠父 Agent + 3 子 Agent;本機重瀏覽器建議 24GB。
若需要無臉影片產出,可將委派與 MoneyPrinterTurbo 無臉短影片教學 搭配——6.7 萬星、8 步 macOS 批量渲染,覆蓋抖音 / Shorts / 小紅書。
Pair delegate_task with our
Hermes Gateway multi-device setup for Telegram→Discord handoff.
常見問題
用了 Hermes subagent 還需要 CrewAI 嗎?
日常 ad-hoc 工作流不需要。Hermes 透過 delegate_task 把編排嵌進父 Agent 模型。CrewAI 適合在應用儲存庫裡維護版本化的 Python DAG;一人企業週報/營運循環很少需要那套儀式。
Hermes 最多能並行 spawn 幾個 subagent?
預設 3 個,上游無硬性上限—批次超過限制會報錯,需在 config.yaml 或環境變數中提高 max_concurrent_children。
subagent 能直接在 Telegram 上跟我說話嗎?
不能。葉子 subagent 無法使用 send_message 或 clarify。父級閘道會話彙總後回覆你。手機端老闆對話請執行 hermes gateway。
子 Agent 會記住上週的調研嗎?
不會自動記住。葉子 subagent 不能寫 memory。請把 sources.csv、draft.md 等產物落盤,或由父 Agent 審閱摘要後再寫入記憶。
必須用雲端 Mac 嗎?
不必。任何已裝 Hermes 且保持喚醒的 Mac 即可。休眠筆電會暫停長批次;從 Telegram 委派而工人在別處的團隊常用常開 Mac。
延伸閱讀:Hermes macOS 安裝設定指南(安裝、閘道、launchd);Hermes Mac mini M4 教學(常開 Mac mini)。