feat: discover pipx-installed memory providers via entry points, switch to pipx - #40644
feat: discover pipx-installed memory providers via entry points, switch to pipx#40644AxDSan wants to merge 3 commits into
Conversation
|
There's a regression in The problem:
Reproduction: After Suggested fix: Either:
The entry-point discovery code in Minor note: The |
|
Great catch @liuhao1024 — you're right on every point. creates an isolated venv, so plugin.yaml deps (honcho, mem0ai, etc.) aren't importable from the agent's runtime. Entry-point discovery via Fix applied: reverted The pipx narrative still holds, just for a different target:
Two separate tools, each for their job. The entry-point discovery change in Also split the |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for tackling a real gap: current main only loads memory providers from directories (plugins/memory/__init__.py:146-205).
Problems
- The new group at
plugins/memory/__init__.py:40ishermes_agent.memory_providers, while Hermes' existing pip-plugin contract ishermes_agent.plugins(hermes_cli/plugins.py:215;website/docs/user-guide/features/plugins.md:109,125). The PR body says the target package already uses the latter, so this scan will not find it. ep.load()atplugins/memory/__init__.py:155is never invoked when it returns a registration callable; only module attributes and subclasses are inspected.- The implementation does not make pipx environments visible to the Hermes interpreter. The prior review correctly identified that limitation, and the author acknowledged it in the follow-up discussion.
- No tests cover the newly added discovery and loading paths.
Suggested changes
- Align on one entry-point contract and add end-to-end discovery/activation tests for it, including precedence and callable entry points.
- Keep the documented symlink/pip install path unless pipx visibility is implemented and tested explicitly.
Automated hermes-sweeper review.
…Research#34271) Mnemosyne is a community-maintained Hermes memory provider plugin that fills a documented gap in the bundled provider set: - Largest tool surface of any provider (19 tools vs Honcho's 5). - Only provider with hybrid semantic + FTS5 + temporal ranking in one query. - Only fully-local provider (beyond Holographic/ByteRover) with vector search, full-text search, and a knowledge graph in one engine. - Free + MIT + no API key + no quotas + no network egress. Per the issue's 'Minimal' acceptance criteria (no Hermes core code changes required), this PR: 1. Adds Mnemosyne to the front-matter description, the providers inventory line ('9 external memory provider plugins + 1 community provider'), and the example config-yaml comment. 2. Adds a full provider section under ### Memori with: - Best-for / Requires / Storage / Cost block - All 19 tools listed - Setup snippet showing pip install + plugin symlink + provider selection - Key capabilities summary - Lifecycle integration audit (which optional hooks are implemented vs not) - Explicit community-maintained status note pointing bug reports to the Mnemosyne project. 3. Adds a Mnemosyne row to the Provider Comparison table with a footnote distinguishing it from bundled providers. The 'community-maintained' framing is intentional: the issue's request was visibility, not promotion to first-party. The plugin- discovery system already supports user-installed providers via $HERMES_HOME/plugins/, so documentation is the only blocker. Refs: NousResearch#34271 Closes: NousResearch#34271 Co-authored-by: Cursor <cursoragent@cursor.com>
…s (+ zh-Hans) Adds Mnemosyne (and Memori) to the cross-reference lists in: - website/docs/integrations/index.md - website/docs/user-guide/features/overview.md - website/docs/user-guide/features/memory.md - website/i18n/zh-Hans/ integrations/index.md (zh-Hans) - website/i18n/zh-Hans/ overview.md (zh-Hans) Replaces stale '8 providers' wording with 'supported providers' for lower maintenance overhead. Co-authored-by: Bartok <bartok9@users.noreply.github.com> Co-authored-by: Abdias J <abdi.moya@gmail.com>
…ace uv with pipx Three changes: 1. **Entry-point provider discovery** — now scans entry points in addition to directory-based providers. pipx/pip-installed memory provider packages are auto-discovered without symlinks or directory copies. 2. **pipx over uv** — uses instead of for plugin dependencies. pipx installs packages to stable isolated locations so updates don't break paths. 3. **Precedence** — bundled > user-installed > entry-point, so existing directory-based setups keep working unchanged. Fixes mnemosyne-oss/mnemosyne#240 — mnemosyne-hermes plugin now surfaces as 'installed' via entry-point discovery, no workaround needed.
2862437 to
e881c03
Compare
…ation Documents and tests the routing contract the sweeper review asked about: classification records the manifest but does not activate anything. - model-provider test now exercises providers.get_provider_profile() against the pip-only name (None today — providers discovery is directory-based) and asserts the module never leaks into sys.modules via that path. - new test for the mnemosyne shape: a pip entry point duplicating a same-name directory provider. The pip copy is classified exclusive and never imported; the directory copy still activates through plugins.memory discovery, exactly once. - _classify_entrypoint_kind docstring now states the activation contract explicitly: pip-only providers were equally unactivatable pre-change (both destination systems are directory-only; the hermes_agent.memory_providers entry-point group has no consumers), so classification only removes the wasted import. Entry-point activation is tracked upstream (NousResearch#40644 for memory); this change is its prerequisite, preventing double import once it lands.
…ation Documents and tests the routing contract the sweeper review asked about: classification records the manifest but does not activate anything. - model-provider test now exercises providers.get_provider_profile() against the pip-only name (None today — providers discovery is directory-based) and asserts the module never leaks into sys.modules via that path. - new test for the mnemosyne shape: a pip entry point duplicating a same-name directory provider. The pip copy is classified exclusive and never imported; the directory copy still activates through plugins.memory discovery, exactly once. - _classify_entrypoint_kind docstring now states the activation contract explicitly: pip-only providers were equally unactivatable pre-change (both destination systems are directory-only; the hermes_agent.memory_providers entry-point group has no consumers), so classification only removes the wasted import. Entry-point activation is tracked upstream (NousResearch#40644 for memory); this change is its prerequisite, preventing double import once it lands.
…ation Documents and tests the routing contract the sweeper review asked about: classification records the manifest but does not activate anything. - model-provider test now exercises providers.get_provider_profile() against the pip-only name (None today — providers discovery is directory-based) and asserts the module never leaks into sys.modules via that path. - new test for the mnemosyne shape: a pip entry point duplicating a same-name directory provider. The pip copy is classified exclusive and never imported; the directory copy still activates through plugins.memory discovery, exactly once. - _classify_entrypoint_kind docstring now states the activation contract explicitly: pip-only providers were equally unactivatable pre-change (both destination systems are directory-only; the hermes_agent.memory_providers entry-point group has no consumers), so classification only removes the wasted import. Entry-point activation is tracked upstream (#40644 for memory); this change is its prerequisite, preventing double import once it lands.
|
Closing — the entry-point discovery half of this landed on main via PR #85527 (salvage of #80493), which took #18842's implementation for that piece; the pipx switch was previously found unworkable in review (pipx venvs are invisible to |
Problem
discover_memory_providers()inplugins/memory/__init__.pyis purely directory-based. It scansplugins/memory/<name>/and$HERMES_HOME/plugins/<name>/for directories - never checksimportlib.metadataentry points. This means pipx-installed memory provider packages (likemnemosyne-hermes) register a correcthermes_agent.pluginsentry point but never appear asPlugin: installed ✓because the memory discovery system doesn't look for entry points.Separately,
hermes_cli/memory_setup.pyusesuv pip installfor plugin dependencies, which doesn't provide stable path guarantees across Hermes updates.Changes
1. Entry-point provider discovery (
plugins/memory/__init__.py)importlib.metadatabased scanning of a newhermes_agent.memory_providersentry-point group_get_entry_point_providers(): discovers pip/pipx-installed memory provider packages_load_entry_point_provider(): loads a memory provider from its entry point (handlesregister_memory_provider,register, andMemoryProvidersubclass patterns)discover_memory_providers(): appends entry-point providers after directory-based onesload_memory_provider(): falls through to entry-point loading when directory lookup fails2. pipx over uv (
hermes_cli/memory_setup.py)uv pip installwithpipx installfor plugin dependencieshermes updatedoesn't break plugin pathsTesting