hermes - 💡(How to fix) Fix Native Hindsight memory provider: lifecycle hooks (pre_llm_call/post_llm_call) missing, hindsight_* tools not visible in `hermes tools list`

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix / Workaround

cristian@hermes-orchestrator-01:~/hindsight-migration-20260523$ cat > /tmp/bug-report-hermes.md << 'EOF'

Title

Native Hindsight memory provider: lifecycle hooks (pre_llm_call/post_llm_call) missing, hindsight_* tools not visible in hermes tools list

Summary

After migrating from the deprecated hindsight-hermes pip plugin to the native Hindsight memory provider (per the official migration guide), automatic memory injection never fires. The Hindsight blog post and migration guide both describe pre_llm_call/post_llm_call lifecycle hooks that should inject recalled memories into the system prompt before every LLM turn, but inspection of plugins/memory/hindsight/__init__.py at the current HEAD shows neither hook is implemented. hermes memory status still reports the provider as active.

Environment

  • Hermes Agent version: v0.14.0 (2026.5.16) reported by hermes --version, "Up to date" after hermes update
  • Git HEAD: cae7537359c0ba8fceedc0a6423a4d9f30972100 (May 23, 2026 05:55 -0700)
  • Repo: https://github.com/NousResearch/hermes-agent.git
  • Python: 3.11.15 (venv at ~/.hermes/hermes-agent/venv)
  • OS: Ubuntu (systemd user services)
  • Memory provider: hindsight (native), mode=cloud against self-hosted Hindsight 0.6 API on http://127.0.0.1:9077
  • Hindsight backend: PostgreSQL 17 + pgvector 0.8.2 Docker, LLM extraction via OpenRouter google/gemini-2.5-flash
  • LLM for the agent: mistralai/mistral-small-2603 via OpenRouter (Telegram gateway)
  • Deprecated hindsight-hermes pip plugin: confirmed UNINSTALLED via uv pip uninstall hindsight-hermes per the official migration guide; importlib.metadata.entry_points(group='hermes_agent.plugins') returns empty

Reproduction

  1. Set up the native Hindsight provider following the migration guide:
    • hermes memory setup → select hindsight
    • Configure ~/.hermes/hindsight/config.json with mode: cloud, api_url, bank_id, memory_mode: hybrid, prefetch_method: recall
  2. Disable built-in memory tool: hermes tools disable memory (per guide)
  3. Verify status:
    • hermes memory status → reports Provider: hindsight, Plugin: installed ✓, Status: available ✓, marked as ← active
    • hermes tools list | grep hindsightreturns nothing. Only the built-in memory tool (disabled) is shown.
  4. Send a message to the agent via the Telegram gateway (e.g. "What are Frenevo's pricing packages?") sight.ve> 5. Observe agent behavior and Hindsight API logs

Expected (per official docs)

Per the integration guide (https://hindsight.vectorize.io/sdks/integrations/hermes) and the migration guide (https://hindsight.vectorize.io/guides/2026/04/14/guide-migrate-hindsight-hermes-to-native-hermes-memory):

  • hermes tools list should show hindsight_retain, hindsight_recall, hindsight_reflect when memory_mode is hybrid or tools
  • On every LLM turn, the pre_llm_call hook should auto-query Hindsight and inject relevant memories into the system prompt as ephemeral context
  • After every response, the post_llm_call hook should auto-retain the user/assistant exchange

Actual

  • hermes tools list does NOT show hindsight_* tools (only the built-in memory tool, which is correctly disabled)
  • On user turns, the Hindsight API receives no auto-recall request. Hindsight logs show only refresh_mental_model background tasks triggered by refresh_after_consolidation, never an automatic recall for the user's actual query.
  • The LLM (Mistral Small) instead calls built-in read_file, search_files, session_search and answers from those sources — never via hindsight_recall
  • Result: memories stored in the Hindsight bank are not surfaced to the model on user turns; the integration is effectively a no-op for end-users despite memory status reporting "active"

Code-level diagnosis

Inspection of plugins/memory/hindsight/__init__.py at HEAD cae7537:

  • The 3 tools hindsight_retain, hindsight_recall, hindsight_reflect ARE defined (lines 242, 263, 278) with descriptions and dispatcher (lines 1499–1561)
  • The system prompt block (lines 1270, 1277) includes the instruction "Use hindsight_recall to search, hindsight_reflect for synthesis, hindsight_retain to store facts."
  • grep -E 'pre_llm_call|post_llm_call' plugins/memory/hindsight/__init__.py returns 0 matches

So the plugin is "tools-only" architecturally. Auto-recall/auto-retain documented in the Hindsight blog (https://hindsight.vectorize.io/blog/2026/04/06/hermes-native-memory-provider) appears to require lifecycle hooks that aren't wired up in this build. The Hindsight migration guide explicitly anticipates this case: "Lifecycle hooks require a build with pre_llm_call and post_llm_call support. On older Hermes versions, only the three tools are registered. In that case, the provider is partially present, but automatic injection is skipped."

So either (a) those hooks are intended but not yet implemented in plugins/memory/hindsight/__init__.py, or (b) the supporting hook infrastructure in agent/memory_provider.py isn't being invoked by the gateway/agent runtime. Either way, the user-facing outcome is: native Hindsight provider is documented as "automatic" but behaves manual-only. Uninst>

Workarounds attempted

  • ✅ Uninstalled hindsight-hermes deprecated pip plugin (per migration guide step 2)
  • ✅ Disabled built-in memory tool (per migration guide step 4)
  • ✅ Set memory_mode: hybrid, prefetch_method: recall in ~/.hermes/hindsight/config.json
  • ✅ Tried memory_mode: context and prefetch_method: reflect variants — no behavioral change
  • ✅ Set HINDSIGHT_DEBUG=true env var on the gateway service — no additional injection-related log output observed
  • ✅ Restart of hermes-gateway-*.service after every change

The Hindsight bank itself is healthy: direct API calls to /v1/default/banks/<id>/... work, mental models are populated with correct content, manual reflect calls return synthesized answers in 4–25s. The problem is solely on the Hermes-side bridge.

Requested

Could the maintainers confirm:

  1. Whether pre_llm_call/post_llm_call lifecycle hooks for the native Hindsight provider are planned/in progress (referenced PR #2823 in the Hindsight docs)?
  2. If they're planned, is there a tracking issue or target version?
  3. If the current intended behavior is tools-only, would it be possible to update the Hindsight integration docs to reflect that auto-injection is not yet available in 0.14.0 (the docs currently imply it works out-of-the-box on the native provider)?

Happy to provide more logs, run additional diagnostics, or test patches. EOF n /tmp/bug-report-hermes.md ===" ; echo "" ; ls -la /tmp/bug-report-hermes.md ; echo "" ; wc -l cristian@hermes-orchestrator-01:~/hindsight-migration-20260523$ echo "=== bug report scritto in /tmp/bug-report-hermes.md ===" ; echo "" ; ls -la /tmp/bug-report-hermes.md ; echo "" ; wc -l /tmp/bug-report-hermes.md === bug report scritto in /tmp/bug-report-hermes.md ===

RAW_BUFFERClick to expand / collapse

cristian@hermes-orchestrator-01:~/hindsight-migration-20260523$ cat > /tmp/bug-report-hermes.md << 'EOF'

Title

Native Hindsight memory provider: lifecycle hooks (pre_llm_call/post_llm_call) missing, hindsight_* tools not visible in hermes tools list

Summary

After migrating from the deprecated hindsight-hermes pip plugin to the native Hindsight memory provider (per the official migration guide), automatic memory injection never fires. The Hindsight blog post and migration guide both describe pre_llm_call/post_llm_call lifecycle hooks that should inject recalled memories into the system prompt before every LLM turn, but inspection of plugins/memory/hindsight/__init__.py at the current HEAD shows neither hook is implemented. hermes memory status still reports the provider as active.

Environment

  • Hermes Agent version: v0.14.0 (2026.5.16) reported by hermes --version, "Up to date" after hermes update
  • Git HEAD: cae7537359c0ba8fceedc0a6423a4d9f30972100 (May 23, 2026 05:55 -0700)
  • Repo: https://github.com/NousResearch/hermes-agent.git
  • Python: 3.11.15 (venv at ~/.hermes/hermes-agent/venv)
  • OS: Ubuntu (systemd user services)
  • Memory provider: hindsight (native), mode=cloud against self-hosted Hindsight 0.6 API on http://127.0.0.1:9077
  • Hindsight backend: PostgreSQL 17 + pgvector 0.8.2 Docker, LLM extraction via OpenRouter google/gemini-2.5-flash
  • LLM for the agent: mistralai/mistral-small-2603 via OpenRouter (Telegram gateway)
  • Deprecated hindsight-hermes pip plugin: confirmed UNINSTALLED via uv pip uninstall hindsight-hermes per the official migration guide; importlib.metadata.entry_points(group='hermes_agent.plugins') returns empty

Reproduction

  1. Set up the native Hindsight provider following the migration guide:
    • hermes memory setup → select hindsight
    • Configure ~/.hermes/hindsight/config.json with mode: cloud, api_url, bank_id, memory_mode: hybrid, prefetch_method: recall
  2. Disable built-in memory tool: hermes tools disable memory (per guide)
  3. Verify status:
    • hermes memory status → reports Provider: hindsight, Plugin: installed ✓, Status: available ✓, marked as ← active
    • hermes tools list | grep hindsightreturns nothing. Only the built-in memory tool (disabled) is shown.
  4. Send a message to the agent via the Telegram gateway (e.g. "What are Frenevo's pricing packages?") sight.ve> 5. Observe agent behavior and Hindsight API logs

Expected (per official docs)

Per the integration guide (https://hindsight.vectorize.io/sdks/integrations/hermes) and the migration guide (https://hindsight.vectorize.io/guides/2026/04/14/guide-migrate-hindsight-hermes-to-native-hermes-memory):

  • hermes tools list should show hindsight_retain, hindsight_recall, hindsight_reflect when memory_mode is hybrid or tools
  • On every LLM turn, the pre_llm_call hook should auto-query Hindsight and inject relevant memories into the system prompt as ephemeral context
  • After every response, the post_llm_call hook should auto-retain the user/assistant exchange

Actual

  • hermes tools list does NOT show hindsight_* tools (only the built-in memory tool, which is correctly disabled)
  • On user turns, the Hindsight API receives no auto-recall request. Hindsight logs show only refresh_mental_model background tasks triggered by refresh_after_consolidation, never an automatic recall for the user's actual query.
  • The LLM (Mistral Small) instead calls built-in read_file, search_files, session_search and answers from those sources — never via hindsight_recall
  • Result: memories stored in the Hindsight bank are not surfaced to the model on user turns; the integration is effectively a no-op for end-users despite memory status reporting "active"

Code-level diagnosis

Inspection of plugins/memory/hindsight/__init__.py at HEAD cae7537:

  • The 3 tools hindsight_retain, hindsight_recall, hindsight_reflect ARE defined (lines 242, 263, 278) with descriptions and dispatcher (lines 1499–1561)
  • The system prompt block (lines 1270, 1277) includes the instruction "Use hindsight_recall to search, hindsight_reflect for synthesis, hindsight_retain to store facts."
  • grep -E 'pre_llm_call|post_llm_call' plugins/memory/hindsight/__init__.py returns 0 matches

So the plugin is "tools-only" architecturally. Auto-recall/auto-retain documented in the Hindsight blog (https://hindsight.vectorize.io/blog/2026/04/06/hermes-native-memory-provider) appears to require lifecycle hooks that aren't wired up in this build. The Hindsight migration guide explicitly anticipates this case: "Lifecycle hooks require a build with pre_llm_call and post_llm_call support. On older Hermes versions, only the three tools are registered. In that case, the provider is partially present, but automatic injection is skipped."

So either (a) those hooks are intended but not yet implemented in plugins/memory/hindsight/__init__.py, or (b) the supporting hook infrastructure in agent/memory_provider.py isn't being invoked by the gateway/agent runtime. Either way, the user-facing outcome is: native Hindsight provider is documented as "automatic" but behaves manual-only. Uninst>

Workarounds attempted

  • ✅ Uninstalled hindsight-hermes deprecated pip plugin (per migration guide step 2)
  • ✅ Disabled built-in memory tool (per migration guide step 4)
  • ✅ Set memory_mode: hybrid, prefetch_method: recall in ~/.hermes/hindsight/config.json
  • ✅ Tried memory_mode: context and prefetch_method: reflect variants — no behavioral change
  • ✅ Set HINDSIGHT_DEBUG=true env var on the gateway service — no additional injection-related log output observed
  • ✅ Restart of hermes-gateway-*.service after every change

The Hindsight bank itself is healthy: direct API calls to /v1/default/banks/<id>/... work, mental models are populated with correct content, manual reflect calls return synthesized answers in 4–25s. The problem is solely on the Hermes-side bridge.

Requested

Could the maintainers confirm:

  1. Whether pre_llm_call/post_llm_call lifecycle hooks for the native Hindsight provider are planned/in progress (referenced PR #2823 in the Hindsight docs)?
  2. If they're planned, is there a tracking issue or target version?
  3. If the current intended behavior is tools-only, would it be possible to update the Hindsight integration docs to reflect that auto-injection is not yet available in 0.14.0 (the docs currently imply it works out-of-the-box on the native provider)?

Happy to provide more logs, run additional diagnostics, or test patches. EOF n /tmp/bug-report-hermes.md ===" ; echo "" ; ls -la /tmp/bug-report-hermes.md ; echo "" ; wc -l cristian@hermes-orchestrator-01:~/hindsight-migration-20260523$ echo "=== bug report scritto in /tmp/bug-report-hermes.md ===" ; echo "" ; ls -la /tmp/bug-report-hermes.md ; echo "" ; wc -l /tmp/bug-report-hermes.md === bug report scritto in /tmp/bug-report-hermes.md ===

-rw-rw-r-- 1 cristian cristian 6625 May 23 16:18 /tmp/bug-report-hermes.md

79 /tmp/bug-report-hermes.md cristian@hermes-orchestrator-01:~/hindsight-migration-20260523$

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING