Skip to content

fix(hermes): inject recalled context into system prompt#239

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/hermes-system-prompt-persona
Open

fix(hermes): inject recalled context into system prompt#239
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/hermes-system-prompt-persona

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • have Hermes system_prompt_block fetch recall context from the Gateway when available
  • append recalled persona/scene memory context to the static memory guide so L3 persona can reach the agent system prompt
  • fall back to the static block and trigger existing recovery handling when recall fails
  • add a unittest covering persona context injection

Closes #205

Test plan

  • python3 hermes-plugin/memory/memory_tencentdb/tests/test_system_prompt_block.py
  • python3 -m py_compile hermes-plugin/memory/memory_tencentdb/init.py hermes-plugin/memory/memory_tencentdb/tests/test_system_prompt_block.py
  • npm test
  • npm run build

Notes

  • python3 -m pytest is unavailable in this local environment: No module named pytest. The added test uses stdlib unittest and is pytest-discoverable.
  • npm run test:cc-plugin -- --run currently fails because package.json has no test:cc-plugin script.

Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Awesome work! 13 fixes in one batch covering Gateway hardening, embedding compatibility, Hermes memory injection, offload stability, and pipeline optimization — a very productive cleanup session 👏

We'll review and merge them one by one 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Hermes system_prompt.] _block 返回 静态文本,agent 看不到L3 persona

2 participants