技能

soul.md

塑造 agent 行為的持久性身份和邊界指令。

soul.md

這是什麼

塑造 agent 行為的持久性身份和邊界指令。

白話解釋

想像一個人的核心個性不會因為身處不同場合而改變——同樣的幽默感、價值觀和個人界線,無論是在工作面試、傳訊息給朋友還是與家人聚會時都保持一致。SOUL.md 給了 Hermes 同樣的恆定性:一個 agent 在讀取任何其他內容之前就會讀取的身份檔案,因此無論是在終端機、聊天平台還是排程工作中回應,語氣和邊界都保持穩定。

為什麼重要

SOUL.md 保存的是無論 agent 目前在哪個對話、專案或平台上運行都應該保持不變的內容——身份、語氣、硬性邊界——這與可選的 BOOT.md hook 模式的 gateway 啟動檢查清單或技能對某個特定工作的指令不同。它的功能接近於一部憲法:標準作業程序和個別技能應在 SOUL.md 設定的邊界內運作,而不是覆蓋它們。當 agent 的行為以某種單一技能無法解釋的方式感覺「不對勁」時,通常應該先看 SOUL.md。

How it works

SOUL.md occupies the very first slot of the system prompt’s stable tier, which is built once per session and reused for every turn after that (agent/system_prompt.py). If the file exists at HERMES_HOME and has content, load_soul_md() reads it and that text becomes the agent’s identity; if it’s missing or empty, Hermes falls back to a hardcoded default identity that reads word-for-word identical to the text new installs get seeded with (agent/prompt_builder.py, hermes_cli/default_soul.py). Because identity loads before tool guidance, the skills prompt, or memory, everything layered on top — a skill’s own instructions, a platform hint, a remembered fact — operates inside whatever tone and boundaries SOUL.md already set, rather than the other way around.

A concrete example

Add one line to ~/.hermes/SOUL.md: never suggest deleting files without explicit confirmation, and keep replies under five sentences. From that point forward, every single thing the agent does — whether it’s running a scheduled report, answering in a Telegram DM, or debugging a build — respects those two boundaries, because SOUL.md loaded before anything else had a chance to set a different tone.