Skip to content

feat(memory): add native MemPalace memory provider plugin#24283

Closed
kjames2001 wants to merge 1 commit into
NousResearch:mainfrom
kjames2001:feat/mempalace-native-provider
Closed

feat(memory): add native MemPalace memory provider plugin#24283
kjames2001 wants to merge 1 commit into
NousResearch:mainfrom
kjames2001:feat/mempalace-native-provider

Conversation

@kjames2001

Copy link
Copy Markdown
Contributor

Summary

Add a native MemPalace memory provider plugin (plugins/memory/mempalace/) for Hermes Agent.

What this does

Replaces the MCP bridge approach with direct Python API calls to MemPalace v3.3.4, providing:

  • 5 tools exposed to the model: mempalace_search, mempalace_kg_query, mempalace_kg_add, mempalace_diary_read, mempalace_diary_write
  • Semantic search over the palace graph (L0 closets + L1 memories)
  • Knowledge Graph queries and updates (add/invalidate facts)
  • Automatic diary journaling at session end in AAAK format
  • Turn archiving into the palace via background threads
  • Background prefetch that pre-warms recall for the next turn
  • Periodic diary checkpoints every 25 turns for long-running sessions
  • Crash-safe diary writes: flat file always saved first, ChromaDB ingest is best-effort (non-fatal on failure)

Files

File Description
plugins/memory/mempalace/__init__.py MemPalaceMemoryProvider implementation (~740 lines)
plugins/memory/mempalace/plugin.yaml Plugin metadata
plugins/memory/mempalace/README.md Setup and usage docs

Configuration

memory:
  provider: mempalace

Requirements

  • Python 3.10+
  • mempalace >= 3.0 (from PyPI)
  • chromadb (installed by mempalace)

Related

  • Built for MemPalace v3.3.4
  • Backed by ChromaDB + Knowledge Graph
  • Fully local, zero API keys needed

Introduce plugins/memory/mempalace/ — a native MemoryProvider that
replaces the MCP bridge with direct Python API calls for lower
latency and richer integration.

Features:
- Semantic search over the palace graph (L0 closets + L1 memories)
- Knowledge Graph queries and updates (add/invalidate facts)
- Automatic diary journaling at session end (AAAK format)
- Turn archiving into the palace via background threads
- Background prefetch that pre-warms recall for the next turn
- Per-session turn counter with periodic diary checkpoints (every 25 turns)
- 5 tools exposed to the model: mempalace_search, mempalace_kg_query,
  mempalace_kg_add, mempalace_diary_read, mempalace_diary_write
- Crash-safe diary writes: flat file always saved first, ChromaDB
  ingest is best-effort (non-fatal on failure)

Built for MemPalace v3.3.4. Backed by ChromaDB + Knowledge Graph.
@alt-glitch alt-glitch added type/feature New feature or request comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers P3 Low — cosmetic, nice to have labels May 12, 2026
@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

Per the updated CONTRIBUTING.md, new memory providers are no longer accepted as in-tree additions to plugins/memory/:

Memory Providers: CLOSED to new in-tree additions
PRs adding to plugins/memory/ will be closed. Publish as standalone plugin into ~/.hermes/plugins/ or via pip entry point. Must implement MemoryProvider ABC (sync_turn, prefetch, shutdown, optional post_setup).

Closing this in line with that policy. The path forward is to publish it as a standalone plugin so users can install it directly without touching the Hermes source tree. Once it's published, a small docs PR adding it to the Community plugins section of the README is welcome.

Sorry for the bump — appreciate the time you put into this.

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

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants