Mnemosyne: Fully Local Agent Memory, No Cloud at All
Give your agent persistent memory in a single SQLite file: store a fact, recall it by keyword, fully offline.
Run this workflow
CI-verified, 2/2 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
Anyone who wants agent memory with zero cloud: everything lives in one SQLite file with vector + FTS5 keyword search. CI installs the package and runs a real remember-then-recall round-trip in keyword mode, no API key. Semantic recall and the sleep-cycle consolidation use an embedding model, so they're fenced.
Not for
- Semantic recall without the optional fastembed extra or a local model, keyword mode is the offline fallback
- Multi-user server deployments, this is a local-first store
The Stack
Tested Against
mnemosyne-memory@latestpython@3.12sqlite@3.xSide effects & data flow
- Network
- PyPI, install only
- Writes
- ./.venv/, the SQLite memory file
- Credentials
- none required
Prerequisites
- Python 3.10+
- pip
Steps
- 1
Install and run a real remember → recall round-trip
One pip install, then store a fact and recall it by keyword. Without the optional embedding extra Mnemosyne falls back to FTS5 keyword retrieval, so this round-trip works completely offline with no key. CI runs exactly this.
python3 -m venv .venv .venv/bin/pip install -q mnemosyne-memory .venv/bin/python - <<'EOF' from mnemosyne import remember, recall remember("User prefers dark mode interfaces", importance=0.9, source="preference") results = recall("interface preferences", top_k=3) text = " ".join(str(r) for r in results) assert "dark mode" in text, f"recall missed the stored fact: {text!r}" print("mnemosyne round-trip OK: recalled the stored fact in keyword mode") EOF - 2
Turn on semantic recall (the model step, not checked by CI)
Install the fastembed extra (or point it at a local model) for semantic search and the sleep-cycle consolidation. Those run embeddings, which are non-deterministic, so CI never claims them.
Eval, 2 fixtures
Last passed: verified todayround-tripcontainstimeout 600s · max $0Expected:
mnemosyne round-trip OK: recalled the stored fact in keyword modeclean-exitexit_codetimeout 600s · max $0Expected:
0
Results
~1,000 stars; the one to reach for when privacy or offline use is the whole point.
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).