fix(hindsight): fix hindsight memory plugin and memory provider setup#5044
Closed
cdbartholomew wants to merge 3 commits into
Closed
fix(hindsight): fix hindsight memory plugin and memory provider setup#5044cdbartholomew wants to merge 3 commits into
cdbartholomew wants to merge 3 commits into
Conversation
… and local mode - Fix sequential tool dispatch: memory provider tools were not routed through memory_manager in _execute_tool_calls_sequential, causing all memory provider tools (hindsight, honcho, mem0, etc.) to silently fail with "Unknown tool" when called as single tool calls. Only the concurrent path had the dispatch. - Fix hindsight UI URL: changed from app.hindsight.vectorize.io to ui.hindsight.vectorize.io for API key registration. - Fix Hindsight client constructor: use base_url parameter (not api_url). - Fix is_available(): check for configured api_url in addition to API key, since the key lives in .env and may not be in the config file. - Add recall_mode config (context/tools/hybrid, default hybrid) matching honcho's pattern — context mode hides tools, tools mode skips prefetch. - Add conditional setup fields (when clause) so cloud mode only shows URL + API key, local mode shows LLM provider/key/model. - Add uv fallback for dependency installation when pip is not in the venv. - Use dedicated asyncio event loop for hindsight client calls to avoid aiohttp session leaks from ephemeral loops. - Local mode: use HindsightEmbedded with background daemon startup and OS-level fd redirect to capture rich startup output in hindsight-embed.log. - Suppress HindsightEmbedded.__del__ to prevent "attached to a different loop" errors during garbage collection. - Remove duplicate hindsight_hermes pip package that conflicted with plugin.
Fixes multiple issues preventing the hindsight memory plugin from working correctly. Also fixes two bugs in the generic memory infrastructure that were discovered during this work. Generic memory fixes: - Fix memory provider tools not dispatched in sequential execution path (_execute_tool_calls_sequential skipped memory_manager, affecting all providers) - Fix dependency auto-install in hermes memory setup (use uv instead of pip, which was never available in standard installs) - Add conditional fields (when) and dynamic defaults (default_from) to setup wizard schema Hindsight plugin: - Fix UI URL (app -> ui.hindsight.vectorize.io) - Fix client constructor parameter (api_url -> base_url) - Fix is_available() to check api_url when API key is in .env - Add cloud/local mode with conditional setup fields - Local mode uses HindsightEmbedded with background daemon startup - Add memory_mode (hybrid/context/tools) and prefetch_method (recall/reflect) - Add bank_id, budget, and provider-specific LLM model defaults to setup - Auto-restart daemon on LLM config change - Suppress daemon output to ~/.hermes/logs/hindsight-embed.log - Update README with full configuration reference Tests: 12 new tests for dispatch routing and setup field filtering
Contributor
Author
|
@teknium1 could you review this when you get a chance? |
teknium1
pushed a commit
that referenced
this pull request
Apr 4, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR #5044 by cdbartholomew.
teknium1
pushed a commit
that referenced
this pull request
Apr 4, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR #5044 by cdbartholomew.
Contributor
|
Merged via PR #5094. Your hindsight plugin overhaul and memory setup wizard changes were cherry-picked onto current main with your authorship preserved in git log. The non-hindsight changes (cron, doctor, openviking, test skips) were dropped as they conflicted with commits that landed after your branch point. Thanks for the thorough work on this! |
naoironman-hue
pushed a commit
to naoironman-hue/hermes-agent
that referenced
this pull request
Apr 5, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR NousResearch#5044 by cdbartholomew.
Tommyeds
pushed a commit
to Tommyeds/hermes-agent
that referenced
this pull request
Apr 12, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR NousResearch#5044 by cdbartholomew.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR NousResearch#5044 by cdbartholomew.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR NousResearch#5044 by cdbartholomew.
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR NousResearch#5044 by cdbartholomew.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR NousResearch#5044 by cdbartholomew.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
- Dedicated asyncio event loop for Hindsight async calls (fixes aiohttp session leaks) - Client caching (reuse instead of creating per-call) - Local mode daemon management with config change detection and auto-restart - Memory mode support (hybrid/context/tools) and prefetch method (recall/reflect) - Proper shutdown with event loop and client cleanup - Disable HindsightEmbedded.__del__ to avoid GC loop errors - Update API URLs (app -> ui.hindsight.vectorize.io, api_url -> base_url) - Setup wizard: conditional fields (when clause), dynamic defaults (default_from) - Switch dependency install from pip to uv (correct for uv-based venvs) - Add hindsight-all to plugin.yaml and import mapping - 12 new tests for dispatch routing and setup field filtering Original PR NousResearch#5044 by cdbartholomew.
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
Fixes multiple issues preventing the hindsight memory plugin from working correctly. Also fixes dependency auto-install in
hermes memory setupwhich was broken for all providers not bundled in.[all].Generic memory setup fixes
Fix dependency auto-install —
hermes memory setupusedpython -m pip installbut the install script creates venvs withuv venvwhich does not include pip. This meant auto-install never worked for any provider not bundled in.[all](everything except honcho). Changed to useuv pip install --python.Conditional fields (
whenclause) — Config schema fields can now specify awhencondition so providers can show different options based on previous selections (e.g. cloud mode shows API URL + key, local mode shows LLM provider + key + model).Dynamic defaults (
default_from) — A field's default can be derived from another field's value via a lookup map (e.g. LLM model default changes based on selected provider: groq →openai/gpt-oss-120b, anthropic →claude-haiku-4-5).Import name mapping — Added
hindsight-all→hindsightto the pip-to-import name mapping so dependency checks work correctly.Hindsight plugin
app→ui.hindsight.vectorize.io)api_url→base_url)is_available()to work when API key is in.envbut not in configHindsightEmbeddedwith background daemon startupmemory_mode(hybrid/context/tools) andprefetch_method(recall/reflect) configbank_id,budget, and provider-specific LLM model defaults to setup wizard~/.hermes/logs/hindsight-embed.logHindsightEmbedded.__del__to prevent aiohttp event loop errors during GCTest plan
pip installfails,uv pip installsucceeds