From b544cabd8674a6b8188097c5bbf57927003fcda3 Mon Sep 17 00:00:00 2001 From: Teknium Date: Mon, 27 Apr 2026 05:21:08 -0700 Subject: [PATCH] feat(prompt): point agent at hermes-agent skill + docs site for Hermes questions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a short always-on pointer to the system prompt: when the user asks about configuring, setting up, troubleshooting, or using Hermes Agent itself, load the hermes-agent skill via skill_view(name='hermes-agent') and fall back to https://hermes-agent.nousresearch.com/docs via web_extract. Keeps sessions without skill_view loaded useful too — the docs URL + web_extract is enough to answer most questions. The guidance is appended right after DEFAULT_AGENT_IDENTITY (or SOUL.md) so it ships regardless of which toolset profile is active. Footprint is ~560 chars, behind the existing prompt cache. --- agent/prompt_builder.py | 6 ++++++ run_agent.py | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/agent/prompt_builder.py b/agent/prompt_builder.py index 3a6ec2441519..e67bf370c2f7 100644 --- a/agent/prompt_builder.py +++ b/agent/prompt_builder.py @@ -141,6 +141,12 @@ def _strip_yaml_frontmatter(content: str) -> str: "Be targeted and efficient in your exploration and investigations." ) +HERMES_AGENT_HELP_GUIDANCE = ( + "If the user asks about configuring, setting up, or using Hermes Agent " + "itself, load the `hermes-agent` skill with skill_view(name='hermes-agent') " + "before answering. Docs: https://hermes-agent.nousresearch.com/docs" +) + MEMORY_GUIDANCE = ( "You have persistent memory across sessions. Save durable facts using the memory " "tool: user preferences, environment details, tool quirks, and stable conventions. " diff --git a/run_agent.py b/run_agent.py index e5f070f9c1a0..7a625b5dc4d3 100644 --- a/run_agent.py +++ b/run_agent.py @@ -86,6 +86,7 @@ from agent.prompt_builder import ( DEFAULT_AGENT_IDENTITY, PLATFORM_HINTS, MEMORY_GUIDANCE, SESSION_SEARCH_GUIDANCE, SKILLS_GUIDANCE, + HERMES_AGENT_HELP_GUIDANCE, build_nous_subscription_prompt, ) from agent.model_metadata import ( @@ -4498,6 +4499,9 @@ def _build_system_prompt(self, system_message: str = None) -> str: # Fallback to hardcoded identity prompt_parts = [DEFAULT_AGENT_IDENTITY] + # Pointer to the hermes-agent skill + docs for user questions about Hermes itself. + prompt_parts.append(HERMES_AGENT_HELP_GUIDANCE) + # Tool-aware behavioral guidance: only inject when the tools are loaded tool_guidance = [] if "memory" in self.valid_tool_names: