Hermes + Mnemosyne: give the cheap agent a local memory
Wire Mnemosyne into Hermes as an MCP server so a budget model stops re-stuffing the same context every session, validated config + a real remember→recall round-trip.
Run this workflow
CI-verified, 3/3 fixtures passing.
Build this with your agent
One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.
Intended Use
Hermes users who want persistent local memory for a budget agent. CI validates the mcp_servers.mnemosyne block (command 'mnemosyne', args ['mcp']) parses, then installs Mnemosyne and runs a real remember-then-recall round-trip in offline keyword mode, no key. Semantic recall calls an embedding model (the [all] extra), so it is fenced.
Not for
- Semantic recall without the embedding extra, keyword mode is the offline fallback CI checks
- Multi-user server deployments, Mnemosyne is a local-first store
The Stack
Tested Against
hermes-agent cli-config.yaml.example (2026-06)mnemosyne-memory@3.7.0python@3.12Side effects & data flow
- Network
- PyPI, install only
- Writes
- ./.venv/, ./config.yaml, the SQLite memory file
- Credentials
- none required
Prerequisites
- Hermes Agent installed
- Python 3.10+
- pip
Steps
- 1
Register Mnemosyne as a Hermes MCP server, then prove the round-trip
Add an mcp_servers.mnemosyne block to config.yaml (command: mnemosyne, args: [mcp]) so Hermes launches it. Then install Mnemosyne and run a real store → recall round-trip with the mnemosyne CLI; without the embedding extra it falls back to FTS5 keyword retrieval, which is fully offline. CI runs exactly this, no key. (Confirm the launch command against the repo's Hermes integration doc, since entrypoints can change between versions.)
python3 -m venv .venv .venv/bin/pip install -q "mnemosyne-memory==3.7.0" pyyaml cat > config.yaml <<'YAML' mcp_servers: mnemosyne: command: mnemosyne args: ["mcp"] YAML .venv/bin/python - <<'EOF' import yaml cfg = yaml.safe_load(open("config.yaml")) srv = cfg["mcp_servers"]["mnemosyne"] assert srv["command"] == "mnemosyne", f"bad command {srv.get('command')}" assert srv["args"] == ["mcp"], f"bad args {srv.get('args')}" print("config OK: mcp_servers.mnemosyne -> command 'mnemosyne' args ['mcp']") EOF .venv/bin/mnemosyne store "User prefers dark mode interfaces" preference 0.9 >/dev/null OUT=$(.venv/bin/mnemosyne recall "interface preferences" 3) if printf '%s' "$OUT" | grep -q "dark mode"; then echo "mnemosyne round-trip OK: recalled the stored fact in keyword mode" else echo "recall missed the stored fact: $OUT"; exit 1 fi - 2
Turn on semantic recall (the model step, not checked by CI)
Install the embedding extra (pip install "mnemosyne-memory[all]") for semantic search and sleep-cycle consolidation. Those run embeddings, which are non-deterministic, so CI never claims them.
Eval, 3 fixtures
Last passed: verified todayconfig-okcontainstimeout 600s · max $0Expected:
config OK: mcp_servers.mnemosyne -> command 'mnemosyne' args ['mcp']round-tripcontainstimeout 600s · max $0Expected:
mnemosyne round-trip OK: recalled the stored fact in keyword modeclean-exitexit_codetimeout 600s · max $0Expected:
0
Results
On a cheap model the win is double: the agent stays coherent across days, and you stop paying to re-feed the same background into context each session. Mnemosyne is local-first (one SQLite file, no external service).
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Related workflows
- One shared memory for every coding agent: prove the configs actually point at the same server
- Validate a WrenAI semantic model's references before an agent queries through it
- Wire the DeepWiki MCP into your agent so it looks up repos instead of hallucinating
- Verify an agent-skills plugin before you ship or install it
- WebMCP: declare a site's agent tools, and gate the ones that spend money
- Wire GLM-5.2 into Hermes: valid route, 64k-context check, no key in config
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).