Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/prompt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _strip_yaml_frontmatter(content: str) -> str:
)

HERMES_AGENT_HELP_GUIDANCE = (
"You run on Hermes Agent (by Nous Research). When the user needs help with "
"You are running on Hermes Agent (by Nous Research). When the user needs help with "
"Hermes itself — configuring, setting up, using, extending, or troubleshooting "
"it — or when you need to understand your own features, tools, or capabilities, "
"the documentation at https://hermes-agent.nousresearch.com/docs is your "
Expand Down
10 changes: 10 additions & 0 deletions tests/agent/test_prompt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
OPENAI_MODEL_EXECUTION_GUIDANCE,
PARALLEL_TOOL_CALL_GUIDANCE,
GOOGLE_MODEL_OPERATIONAL_GUIDANCE,
HERMES_AGENT_HELP_GUIDANCE,
MEMORY_GUIDANCE,
SESSION_SEARCH_GUIDANCE,
PLATFORM_HINTS,
Expand All @@ -54,6 +55,15 @@ def test_session_search_guidance_is_simple_cross_session_recall(self):
assert "relevant cross-session context exists" in SESSION_SEARCH_GUIDANCE
assert "recent turns of the current session" not in SESSION_SEARCH_GUIDANCE

def test_help_guidance_avoids_zai_waf_blocked_literal(self):
# Z.AI's coding-plan WAF (api.z.ai) rejects any request whose SYSTEM
# prompt contains the exact literal "You run on Hermes Agent", with a
# misleading HTTP 429 / code 1305 "temporarily overloaded" response
# (#47685, #53002, #56816 — the blocked-literal set drifts over time).
# Keep the identity statement, avoid the currently blocked literal.
assert "You run on Hermes Agent" not in HERMES_AGENT_HELP_GUIDANCE
assert "Hermes Agent (by Nous Research)" in HERMES_AGENT_HELP_GUIDANCE


# =========================================================================
# Context injection scanning
Expand Down