mnemosyne-oss/mnemosyne
Zero-cloud AI memory that works everywhere. SQLite-backed. One pure-Python dependency.
What it is
Mnemosyne is an open-source memory system for AI agents. AI assistants normally forget everything between conversations; Mnemosyne gives them a persistent memory that survives across sessions, so an assistant can remember your preferences, past decisions, and project context.
It's local-first: everything lives in one SQLite database file on your machine. No cloud service, no external database server, no telemetry. It installs with a single pip install and works with many AI tools (Claude Code, Cursor, Codex, OpenWebUI, and anything that speaks the MCP protocol).
The problem it solves
AI agents are stateless by default. Each new conversation starts from zero. Mnemosyne fixes this by giving agents a structured memory with three tiers (called BEAM — Bilevel Episodic-Associative Memory):
- Working memory — hot, recent context that gets automatically injected before every AI call, with time-based eviction of old items.
- Episodic memory — long-term storage. When you store a fact, it's embedded (converted to a numerical representation of its meaning) and searched using a hybrid of semantic similarity and keyword matching.
- TripleStore — a temporal knowledge graph that records relationships ("Maya assigned to auth-migration") with validity dates, so the agent can answer "who was working on X as of February?"
How it works
- Storage: everything in one SQLite file, using the
sqlite-vecextension for vector search and FTS5 for full-text search. No separate vector database, no ANN index, no extra infrastructure. - Hybrid scoring: search results are ranked by 50% semantic similarity + 30% keyword match + 20% importance score — all computed inside SQLite.
- Compression: embeddings (384-dimension float vectors) are binarized down to 48 bytes each — a 32x reduction — so memory stays small even with millions of entries. The README reports storage growing sub-linearly: 20,000 messages take only 7.2 MB.
- Interfaces: a Python SDK (
remember()/recall()), a CLI (mnemosyne store,mnemosyne recall,mnemosyne export), and a built-in MCP server so any MCP-compatible client can use it.
Privacy & security
- Local-first by default — data never leaves your machine unless you explicitly enable sync.
- No telemetry — zero tracking, zero analytics.
- Optional sync between devices with client-side encryption (AES-128-CBC or XSalsa20-Poly1305). The sync server sees only metadata (timestamps, event IDs) — never the memory content itself.
Usage
from mnemosyne import remember, recall
# Store a fact
remember("User prefers dark mode interfaces", importance=0.9)
# Search later
results = recall("interface preferences", top_k=3)
Or via CLI:
mnemosyne store "User likes dark mode"
mnemosyne recall "preferences"
Performance
The README reports benchmark results on LongMemEval and BEAM (both academic memory benchmarks). The notable claim is that retrieval recall stays flat (20% Recall@10) as the corpus grows from 100K to 10M messages, and that the system abstains rather than fabricating answers when the corpus lacks the information (100% abstention accuracy). The README is careful to note the absolute recall number is low and that the flatness — not the level — is the meaningful result.
Bottom line
Mnemosyne is a practical, self-contained memory layer for AI agents: one pip install, one SQLite file, no cloud dependency, and broad compatibility with existing AI tools via MCP. It's aimed at developers who want their AI assistants to actually remember things without sending data to a third party.
Related
- Project
- Project
- Project
- Project
- Project