feat: add MemPalace memory provider plugin - #6871
Conversation
Integrates MemPalace (https://github.com/milla-jovovich/mempalace) as a pluggable memory provider for Hermes Agent. Features: - 4-layer memory stack (L0 identity → L3 deep semantic search) - Verbatim conversation storage via ChromaDB (no summarization) - Temporal knowledge graph with entity resolution (SQLite) - 5 agent tools: palace_search, palace_store, palace_browse, palace_kg, palace_status - Full lifecycle hooks: sync_turn, on_session_end, on_pre_compress, on_memory_write - Zero API calls, local-only, free Based on MemPalace by Ben Sigman — 96.6% LongMemEval R@5 (highest published). Requires: pip install mempalace
|
mempalace updated to 3.1.0 today - more updates coming soon |
|
Thanks @bensig — verified the plugin against mempalace 3.1.0 locally, no changes needed. Compatibility check (mempalace 3.1.0):
The plugin has no version pin on |
|
This needs further review before it can be merged into core — no tests, heavy dependency chain (chromadb), and we'd want to verify the external package. For now, we'd recommend publishing this as a standalone plugin repo and sharing it in our Discord. That way users can install it independently and it can iterate faster without being tied to our release cycle. Happy to revisit for core inclusion once it has test coverage and some community usage. |
What does this PR do?
Adds MemPalace as a memory provider plugin for Hermes Agent, following the existing
MemoryProviderABC inagent/memory_provider.py.MemPalace is a local-only memory system that stores conversations verbatim in ChromaDB with semantic search — no summarization, no extraction, no API calls. It holds the highest published LongMemEval recall score (96.6% R@5, independently reproduced). The philosophy: store everything, make it findable.
This plugin bridges MemPalace's 4-layer memory stack and temporal knowledge graph into the Hermes lifecycle, giving agents deep cross-session recall without any cloud dependencies or subscriptions.
Related Issue
N/A — new plugin contribution. Happy to create a tracking issue if preferred.
Type of Change
Changes Made
3 new files in
plugins/memory/mempalace/:__init__.py(~550 lines) — FullMemoryProviderimplementation:MemPalaceProviderclass implementing all abstract methods + optional hookspalace_search,palace_store,palace_browse,palace_kg,palace_statusmempalace(graceful degradation if not installed)sync_turn$HERMES_HOME/config.yamlplugin.yaml— Plugin manifest declaringon_session_end,on_pre_compress,on_memory_writehooksREADME.md— Documentation with architecture diagrams, tool reference, config options, and palace structureArchitecture
4-Layer Memory Stack
~/.mempalace/identity.txt)palace_browsepalace_search/ prefetch5 Agent Tools
palace_searchpalace_storepalace_browsepalace_kgpalace_statusPalace Organization
How to Test
Install the dependency:
Enable the provider:
Verify the plugin loads:
Test lifecycle hooks:
Clean up:
Checklist
Code
feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — plugin includes README.mdcli-config.yaml.exampleif I added/changed config keys — N/A (config is plugin-scoped underplugins.mempalace)CONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/Aos.path.expanduser,os.makedirs,threading(all cross-platform). ChromaDB and SQLite are cross-platform.Screenshots / Logs
Initialization
Store + Search
Knowledge Graph
System Prompt Block (~900 tokens)
Credits: