Skip to content

kjames2001/hermes-mempalace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hermes MemPalace

Native MemPalace memory provider plugin for Hermes Agent — semantic search, knowledge graph, and diary journaling backed by ChromaDB.

MemPalace is the #1 open-source AI memory system (51K+ stars, 96.6% LongMemEval R@5). This plugin replaces the old MCP bridge with direct Python API calls — lower latency, richer integration, and real-time turn archiving instead of post-hoc cron mining.

Features

  • Semantic search over the palace graph — verbatim recall, no LLM extraction
  • Knowledge Graph with temporal validity — query, add, and invalidate structured facts
  • Automatic diary journaling at session end (AAAK format)
  • Real-time turn archiving — conversations sync to the palace as they happen
  • Background prefetch — pre-warms recall for the next turn
  • 5 exposed toolsmempalace_search, mempalace_kg_query, mempalace_kg_add, mempalace_diary_read, mempalace_diary_write
  • Setup wizard integrationhermes memory setup supported via post_setup()

Quick Start

# 1. Install MemPalace
pip install mempalace

# 2. Initialize palace (first time only)
mempalace init

# 3. Install this plugin
pip install hermes-mempalace

# 4. Activate
hermes config set memory.provider mempalace

Or use the setup wizard:

hermes memory setup
# Select "mempalace" → auto-installs, initializes, and configures

Configuration

# ~/.hermes/config.yaml
memory:
  provider: mempalace
  mempalace:
    palace_path: ~/.mempalace/palace  # or export MEMPALACE_PATH
    agent_name: jarvis                # for diary identification

How It Works

Hook What it does
prefetch() Injects semantic recall context before each LLM API call
queue_prefetch() Pre-warms next turn's recall in background thread
sync_turn() Archives completed [user→assistant] turns to palace in real time
on_session_end() Writes AAAK diary entry summarizing the session
on_memory_write() Mirrors built-in memory writes to MemPalace KG

Requirements

  • Python ≥ 3.11
  • mempalace ≥ 3.3.0 (auto-installs ChromaDB)
  • Hermes Agent (any recent version)

Install as Manual Plugin

If you prefer not to use pip, clone directly into ~/.hermes/plugins/:

mkdir -p ~/.hermes/plugins/mempalace
cp hermes_mempalace/__init__.py ~/.hermes/plugins/mempalace/
cp plugin.yaml ~/.hermes/plugins/mempalace/

License

MIT — James Huang (kjames2001)

Upstream

This plugin was contributed upstream but moved to standalone per CONTRIBUTING.md policy (memory providers are closed to new in-tree additions).

About

Native MemPalace memory provider plugin for Hermes Agent — semantic search, knowledge graph, and diary journaling backed by ChromaDB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages