Mnemosyne memory provider for Hermes Agent — local-first, zero-cloud memory
Project description
Mnemosyne for Hermes Agent
Local-first memory provider for Hermes Agent. 23 tools. Zero cloud. Zero latency.
Mnemosyne gives Hermes Agent a local-first memory layer that captures conversation, tool calls, execution paths, decisions, outcomes, and corrections. Then surfaces it all with intent-aware hybrid recall. SQLite on your machine. No cloud. No API keys. No latency.
The Problem
Agent workflows lose context across sessions. A few ways this bites:
- Prior decisions and constraints vanish between sessions
- Tool-call context isn't preserved in raw transcripts
- Failures get repeated because nobody remembered the fix
- Project context gets buried in long chat history
- Cross-session memory becomes noise without structure
- Conversation-only memory misses the execution path: what the agent did, not just what was said
What Mnemosyne Changes
Mnemosyne adds structured, local-first, agent-native memory to Hermes through the mnemosyne memory provider.
It gives Hermes:
- Automatic capture: every turn, in the background, after the response is sent. Conversation, decisions, tool calls, outcomes.
- Hybrid search: vector similarity + FTS5 full-text + importance scoring. All tunable per-query. Bias toward recency, relevance, or both.
- Episodic consolidation:
mnemosyne_sleepcompresses old working memories into long-term summaries so the working set stays small and recall stays sharp. - Knowledge graph: subject-predicate-object triples with BFS graph traversal. Link memories semantically.
- Multi-agent validation: agents can attest, update, or invalidate each other's memories with provenance tracking.
- Shared surface: compact cross-agent metadata for multi-agent workflows.
- Zero cloud: SQLite on your machine. No network calls. No API keys. No quota limits.
When using Mnemosyne, disable Hermes' built-in file-based memory to avoid duplication:
hermes tools disable memory
Mnemosyne handles everything: capture, recall, consolidation, knowledge graph, multi-agent validation. The built-in MEMORY.md/USER.md system is redundant and just burns tokens. One provider. One memory layer.
How It Works
Mnemosyne runs on three stages:
1. Capture
After Hermes completes a turn, the Mnemosyne provider stores the full interaction (user message, assistant response, tool calls, and available execution context) in a local SQLite database with vector embeddings.
Each memory gets tagged with importance (0.0-1.0), scope (session or global), veracity (stated, inferred, tool, or imported), and optional metadata. Memories can carry expiration dates and named entities for fuzzy recall.
This is how Hermes builds memory from what it says and what it does.
2. Recall
Recall is intentional. Agents decide when to recall, what scope, and how many results. There is no automatic retrieval dumping context into every prompt.
When mnemosyne_recall fires, Mnemosyne runs hybrid search: vector similarity finds semantic matches, FTS5 full-text finds keyword matches, and importance scoring boosts what matters. All three weights are tunable per-query so you can bias toward recency, relevance, or both.
Returned context can include prior decisions, constraints, failure modes, project patterns, and execution outcomes: without stuffing irrelevant history into the prompt.
3. Consolidate
mnemosyne_sleep compresses old working memories into episodic summaries. Think of it as a nightly cleanup that knows what to keep and what to summarize. The working set stays small. Recall stays sharp. Long-running agents don't drown in their own history.
Quickstart
Prerequisites: Hermes Agent (pipx install), Python 3.10+, no API keys needed.
Install
pipx install mnemosyne-hermes
hermes config set memory.provider mnemosyne
hermes memory status
That's it. The entry point in mnemosyne-hermes registers with Hermes' memory
provider discovery system (hermes_agent.memory_providers). No symlinks. No
directory copying. No plugin.yaml gymnastics. The provider surfaces
automatically on the next Hermes start.
Verify:
hermes memory status
# Should show:
# Provider: mnemosyne
# Plugin: installed ✓
How it works
When you install via pipx, the package registers two entry points:
hermes_agent.memory_providers— discovered by Hermes'discover_memory_providers()sohermes memory statussees it as an installed pluginhermes_agent.plugins— discovered by Hermes'PluginManagerfor tool and CLI registration
Hermes checks pipx-installed packages alongside directory-based plugins. No extra setup steps needed.
Development install
git clone https://github.com/AxDSan/mnemosyne.git
cd mnemosyne
pip install -e .
pipx install -e integrations/hermes # replaces hook with editable path
Configuration
No required config. Everything defaults to ~/.mnemosyne/. Optional overrides:
| Variable | Default | Description |
|---|---|---|
MNEMOSYNE_HOME |
~/.mnemosyne |
Storage directory |
MNEMOSYNE_VEC_WEIGHT |
0.5 |
Vector similarity weight in hybrid recall |
MNEMOSYNE_FTS_WEIGHT |
0.3 |
Full-text search weight |
MNEMOSYNE_IMPORTANCE_WEIGHT |
0.2 |
Importance score weight |
MNEMOSYNE_AUTO_SLEEP_ENABLED |
false |
Auto-consolidate after N turns |
MNEMOSYNE_AUTO_SLEEP_THRESHOLD |
50 |
Turns between auto-consolidation |
MNEMOSYNE_PROFILE_ISOLATION |
false |
Separate DB per Hermes profile |
MNEMOSYNE_SYNC_TURN_USER_LIMIT |
500 |
User content truncation in sync_turn() (0 = no limit) |
MNEMOSYNE_SYNC_TURN_ASSISTANT_LIMIT |
800 |
Assistant content truncation in sync_turn() (0 = no limit) |
MNEMOSYNE_FACT_RECALL_ENABLED |
false |
Merge LLM-extracted facts into standard recall |
MNEMOSYNE_PREFETCH_CONTENT_CHARS |
0 |
Per-memory prefetch content cap (0 = full content) |
Or in ~/.hermes/config.yaml:
memory:
provider: mnemosyne
mnemosyne:
auto_sleep: true
sleep_threshold: 30
Tools
23 tools. All surfaced through Hermes' tool system.
Core memory: remember, recall, sleep, stats, get, update, forget, invalidate, validate
Knowledge graph: triple_add, triple_query, graph_query, graph_link
Multi-agent: shared_remember, shared_recall, shared_forget, shared_stats
Working notes: scratchpad_write, scratchpad_read, scratchpad_clear
Ops: export, import, diagnose
Test the Memory Loop
Ask Hermes to do a multi-step task:
"Investigate why the payment sync test is failing and fix it."
Hermes inspects files, runs commands, identifies a failing fixture, makes a decision, applies a fix, and observes the result.
After the turn, Mnemosyne stores the full execution path: the failure, the decision, the fix, the outcome, and the pattern.
In a new session:
"A similar payment sync test is failing again. Check prior fixes before changing anything."
Hermes calls mnemosyne_recall, finds the relevant prior failure and fix, and doesn't repeat the mistake.
Fail-Soft By Design
If Mnemosyne's database is unavailable or disk is full, the provider logs the error and Hermes continues answering. Memory is additive: it never blocks the user.
Memory issues are logged but never surface as user-facing errors.
Contributing
We welcome contributions. See the Contributing Guidelines for code style, standards, and submitting pull requests.
To build from source:
git clone https://github.com/AxDSan/mnemosyne.git
cd mnemosyne
pip install -e .
pip install -e integrations/hermes
Support
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mnemosyne_hermes-0.1.1.tar.gz.
File metadata
- Download URL: mnemosyne_hermes-0.1.1.tar.gz
- Upload date:
- Size: 39.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
042fd6dbde9694d89ce422f910e87568ff38d2bc0d8d6cc1a6fc9410abab2d29
|
|
| MD5 |
bd2f74c141fe95a9bb4f3bebf5b8d074
|
|
| BLAKE2b-256 |
bf75d4b9c397715a50ae4c9ae1de74144beb608110e450d2ee527fadaf3b3caf
|
File details
Details for the file mnemosyne_hermes-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mnemosyne_hermes-0.1.1-py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8993277a7b9a61a55b2179ec732ddafc4c63cd276ac2cc1f31ea83c56106f305
|
|
| MD5 |
ec36148cf4fd7276d18e502aa425903f
|
|
| BLAKE2b-256 |
cb09a2f7bc3761b3129908a47596fb0c73aad37b741ccaa586b3b40cc89ac865
|