Mnemon graph-based memory for Hermes Agent wraps
mnemon v0.1.xas a nativeMemoryProvider. Gives Hermes a four-graph memory store (temporal, entity, causal, semantic) with importance decay, dedup, soft-delete, and optional vector recall via Ollama.
For those who want to give this Hermes Agent Memory Provider plugin a spin, head to Hermes-WebTop and start a GitHub Codespace to try it.
- Why this plugin?
- Prerequisites
- Install / activate
- How it works
- Tools
- Troubleshooting
- Development
- License
Hermes ships with a built-in ~2 kchar session memory — fine for a single turn, but it flushes on compress and doesn't remember across sessions. Mnemon adds:
| Feature | Built-in Hermes | Hermes + Mnemon |
|---|---|---|
| Unlimited retention | ✗ | ✓ |
| Importance decay | ✗ | ✓ |
| Semantic / vector recall | ✗ | optional ✓ |
| Cross-session persistence | ✗ | ✓ |
| Multi-agent graph sharing | ✗ | ✓ |
| Soft-delete / forget | ✗ | ✓ |
| Named stores per profile | ✗ | ✓ |
| Dependency | Version | Install |
|---|---|---|
| mnemon | ≥ 0.1.3 | curl -fsSL <mnemon install url> | sh |
| (optional) Ollama | latest | ollama pull nomic-embed-text |
| Hermes Agent | ≥ 0.9.0 | see Hermes docs |
| Python | ≥ 3.11 | system Python or uv |
Verify prerequisites:
mnemon --version # ≥ 0.1.3
python --version # ≥ 3.11# From this repo root
cp -r mnemon ~/.hermes/plugins/
# Activate in config:
hermes config set memory.provider mnemon
# Or edit ~/.hermes/config.yaml → memory.provider: mnemonmkdir -p ~/.hermes/plugins
ln -sfn /path/to/hermes-plugin-mnemon/mnemon ~/.hermes/plugins/mnemon
hermes config set memory.provider mnemonEdits in this repo are live on Hermes restart — no copy step needed.
pip install hermes-plugin-mnemon
# Then symlink or copy into Hermes' plugin dir:
hermes-plugin-mnemon install # placeholder — user copies manuallyNote. Hermes discovers plugins in
~/.hermes/plugins/, not insite-packages. A pip install puts the code there but you still need one manual copy or symlink step. For teams that shareconfig.yamlacross machines, add a small post-install script (hermes-plugin-mnemon install) that performs the symlink automatically.
| Hermes hook | What the plugin does |
|---|---|
initialize(session_id, …) |
Derives fixed store from agent_identity, ignores session_id; creates store if missing and inits ID index |
prefetch(query) |
Background mnemon recall with intent detection; 30 s TTL cache |
sync_turn(user, asst) |
Background mnemon remember on every turn |
on_memory_write(action, target, content, …) |
Mirrors built-in memory add/replace into mnemon |
on_pre_compress(messages) |
Persists last 10 key turns before compression |
on_session_switch(new_id, …) |
Resets recall cache, updates store env |
shutdown() |
Clears recall cache |
<profile> ← fixed per-profile store (survives restarts)
Each Hermes profile gets its own dedicated store that is reused across sessions,
so memory persists. Override manually with MNEMON_STORE=your-name env var
(takes precedence over the profile‑derived name).
Three tools are registered on each Hermes session when mnemon is active:
{"text": "...", "category": "general", "importance": 3, "entities": [], "tags": []}Store an insight in Mnemon.
Categories: decision · preference · fact · insight · context · general
Importance: 1–5 (auto: decision → 4, others → 3)
{"query": "...", "intent": "GENERAL", "limit": 8}Recall insights by natural language query.
Intents: WHY · WHEN · ENTITY · GENERAL
{"insight_id": "uuid-from-recall"}Soft-delete an insight by its ID. Post-delete, it disappears from recall results only (underlying store rows are untouched — pruned on store rebuild).
# Is mnemon on PATH?
which mnemon && mnemon --version
# Store health
mnemon status
# Hermes reports provider status
hermes memory status
# Manual store smoke-test
MNEMON_STORE=test mnemon remember "hello" --cat fact --imp 3
MNEMON_STORE=test mnemon recall "hello" --limit 3pip install ".[dev]"
pytest tests/ -vAll mocks are in tests/test_mnemon.py. The actual subprocess.run(["mnemon", …])
call is patched so the suite passes on any machine — even without mnemon installed.
hermes-plugin-mnemon/
├── .github/
│ └── workflows/
│ └── ci.yml ← ruff + pytest + build on every push
├── tests/
│ ├── __init__.py
│ └── test_mnemon.py ← 337 lines, 22 tests
├── mnemon/
│ ├── __init__.py ← full plugin logic (381 lines)
│ └── plugin.yaml ← plugin metadata for Hermes
├── pyproject.toml
├── README.md
└── LICENSE ← MIT
MIT — see LICENSE. © 2026 Nous Research.