feat: use SOUL.md as primary agent identity instead of hardcoded default#1922
Merged
Conversation
SOUL.md now loads in slot #1 of the system prompt, replacing the hardcoded DEFAULT_AGENT_IDENTITY. This lets users fully customize the agent's identity and personality by editing ~/.hermes/SOUL.md without it conflicting with the built-in identity text. When SOUL.md is loaded as identity, it's excluded from the context files section to avoid appearing twice. When SOUL.md is missing, empty, unreadable, or skip_context_files is set, the hardcoded DEFAULT_AGENT_IDENTITY is used as a fallback. The default SOUL.md (seeded on first run) already contains the full Hermes personality, so existing installs are unaffected.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…ult (NousResearch#1922) SOUL.md now loads in slot NousResearch#1 of the system prompt, replacing the hardcoded DEFAULT_AGENT_IDENTITY. This lets users fully customize the agent's identity and personality by editing ~/.hermes/SOUL.md without it conflicting with the built-in identity text. When SOUL.md is loaded as identity, it's excluded from the context files section to avoid appearing twice. When SOUL.md is missing, empty, unreadable, or skip_context_files is set, the hardcoded DEFAULT_AGENT_IDENTITY is used as a fallback. The default SOUL.md (seeded on first run) already contains the full Hermes personality, so existing installs are unaffected. Co-authored-by: Test <test@test.com>
rapackitirone-creator
pushed a commit
to rapackitirone-creator/hermes-agent
that referenced
this pull request
May 6, 2026
…njection
Three major changes from the Hermes multi-profile production deployment:
1. gateway/gateway_multifeishu.py (new file, ~350 lines)
Implements Scheme C: a single shared webhook port that routes events
to per-profile FeishuAdapters based on header.app_id. Activated by
MULTI_FEISHU_PROFILES=1. Each profile reads its own config.yaml
(app_id, app_secret, _profile_soul) so one公网 webhook port
serves all bots without port conflicts.
2. gateway/platforms/feishu.py + base.py + run.py
- FeishuAdapter.get_system_prompt(): returns _profile_soul injected
from config.yaml platforms.feishu.extra._profile_soul — each bot人格
(Lead, VOC, CX, …) gets its own identity prompt.
- BasePlatformAdapter.get_system_prompt(): new virtual method, returns
"" by default.
- run.py: combined_ephemeral now includes adapter.get_system_prompt()
and passes it as system_message= to run_conversation().
- run_agent.py: _build_system_prompt() uses injected system_message as
primary identity (skipping load_soul_md()), avoiding double injection.
- Fixed: typing_task exception handler now catches (CancelledError,
Exception) instead of just CancelledError — prevents AttributeError
from crashing _keep_typing on missing _typing_paused attribute.
3. hermes_cli/model_normalize.py + model_switch.py
DeepSeek model normalization updated to support v4 variants
(deepseek-v4-pro, deepseek-v4-flash). 'deepseek' alias now defaults
to deepseek-v4-pro instead of deepseek-chat.
Closes NousResearch#1922 (SOUL.md as primary agent identity)
This was referenced May 10, 2026
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…ult (NousResearch#1922) SOUL.md now loads in slot NousResearch#1 of the system prompt, replacing the hardcoded DEFAULT_AGENT_IDENTITY. This lets users fully customize the agent's identity and personality by editing ~/.hermes/SOUL.md without it conflicting with the built-in identity text. When SOUL.md is loaded as identity, it's excluded from the context files section to avoid appearing twice. When SOUL.md is missing, empty, unreadable, or skip_context_files is set, the hardcoded DEFAULT_AGENT_IDENTITY is used as a fallback. The default SOUL.md (seeded on first run) already contains the full Hermes personality, so existing installs are unaffected. Co-authored-by: Test <test@test.com>
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
…ult (NousResearch#1922) SOUL.md now loads in slot NousResearch#1 of the system prompt, replacing the hardcoded DEFAULT_AGENT_IDENTITY. This lets users fully customize the agent's identity and personality by editing ~/.hermes/SOUL.md without it conflicting with the built-in identity text. When SOUL.md is loaded as identity, it's excluded from the context files section to avoid appearing twice. When SOUL.md is missing, empty, unreadable, or skip_context_files is set, the hardcoded DEFAULT_AGENT_IDENTITY is used as a fallback. The default SOUL.md (seeded on first run) already contains the full Hermes personality, so existing installs are unaffected. Co-authored-by: Test <test@test.com>
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…ult (NousResearch#1922) SOUL.md now loads in slot NousResearch#1 of the system prompt, replacing the hardcoded DEFAULT_AGENT_IDENTITY. This lets users fully customize the agent's identity and personality by editing ~/.hermes/SOUL.md without it conflicting with the built-in identity text. When SOUL.md is loaded as identity, it's excluded from the context files section to avoid appearing twice. When SOUL.md is missing, empty, unreadable, or skip_context_files is set, the hardcoded DEFAULT_AGENT_IDENTITY is used as a fallback. The default SOUL.md (seeded on first run) already contains the full Hermes personality, so existing installs are unaffected. Co-authored-by: Test <test@test.com>
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…ult (NousResearch#1922) SOUL.md now loads in slot NousResearch#1 of the system prompt, replacing the hardcoded DEFAULT_AGENT_IDENTITY. This lets users fully customize the agent's identity and personality by editing ~/.hermes/SOUL.md without it conflicting with the built-in identity text. When SOUL.md is loaded as identity, it's excluded from the context files section to avoid appearing twice. When SOUL.md is missing, empty, unreadable, or skip_context_files is set, the hardcoded DEFAULT_AGENT_IDENTITY is used as a fallback. The default SOUL.md (seeded on first run) already contains the full Hermes personality, so existing installs are unaffected. Co-authored-by: Test <test@test.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Users have been requesting the ability to fully replace the Hermes identity with their own. Currently,
DEFAULT_AGENT_IDENTITYis hardcoded as slot #1 in the system prompt, and SOUL.md appears later in the context files section. This means custom SOUL.md content conflicts with the built-in identity rather than replacing it.This PR makes SOUL.md the primary identity source.
How it works
System prompt slot #1 resolution:
skip_context_filesis NOT set → try loading~/.hermes/SOUL.mdskip_context_filesis set → fall back toDEFAULT_AGENT_IDENTITYNo change for existing users: The default SOUL.md (already seeded by
ensure_hermes_home()on first run) contains the full Hermes personality. Existing installs already have this file.Customization is now simple: Edit
~/.hermes/SOUL.mdto fully replace the agent identity. No more conflict with hardcoded text.Changes
agent/prompt_builder.py: Newload_soul_md()function;build_context_files_prompt()gainsskip_soulparameterrun_agent.py:_build_system_prompt()tries SOUL.md first, falls back toDEFAULT_AGENT_IDENTITYTest plan
pytest tests/test_run_agent.py tests/agent/test_prompt_builder.py -n0 -q— 278 passed