# Mnemosyne

By **axdsan** · Software & Tools

Zero-dependency, SQLite-backed AI memory layer for agents, MCP-ready, local-first, and benchmarked against BEAM and LongMemEval.

- Source: https://github.com/AxDSan/mnemosyne
- Repository: https://github.com/AxDSan/mnemosyne
- Install: `pip install mnemosyne-memory pip install "mnemosyne-memory[all]" mnemosyne mcp`
- Tags: open-source, agent, memory, mcp, sqlite, local-first, python, self-hosted
- Pricing: free
- Upvotes: 1

## Features

- Built-in MCP server (stdio and SSE transport modes)
- Python SDK with remember() and recall() as primary API
- 3-tier BEAM architecture: working memory, episodic memory, TripleStore
- Binary vector compression (MIB): 32x size reduction via Hamming distance in SQLite
- Temporal knowledge graph with version chains via TripleStore
- Per-domain memory banks for isolation across contexts
- Bidirectional sync with optional XChaCha20-Poly1305 client-side encryption
- CLI for direct memory ops, stats, export/import, and consolidation (sleep)

---

## Why it matters
Most agent memory solutions demand Postgres, Docker, or a SaaS subscription before a single fact gets stored. Mnemosyne collapses the whole stack into one SQLite file and one `pip install`, removing the infrastructure tax that makes persistent agent memory painful to ship.

## The big picture
Mnemosyne is a universal memory layer built for the Hermes agent framework but usable with any agent. Per the README, it supports 8+ platforms including Cursor, Claude Code, OpenAI Codex CLI, Windsurf, OpenWebUI, and OpenClaw, via MCP (stdio or SSE) or a direct Python SDK import. No external services required.

## How it works
The core is BEAM (Bilevel Episodic-Associative Memory), a 3-tier system: working memory for hot context (TTL-based eviction), episodic memory for long-term storage (sqlite-vec + FTS5 hybrid search), and a TripleStore for temporal knowledge graphs with version chains. Hybrid scoring blends 50% vector similarity, 30% FTS5 rank, and 20% importance, all inside SQLite. Binary vector compression (MIB) shrinks 384-dim float32 embeddings to 48 bytes, a 32x reduction, using Hamming distance inside SQLite with no ANN index.

## By the numbers
Per the README, Mnemosyne scores 98.9% Recall@All@5 on LongMemEval (ICLR 2025) and 65.2% on the BEAM end-to-end QA benchmark (ICLR 2026). Recall holds flat across dataset scales from 100K to 10M tokens. Episodic compression delivers 9.4x storage savings. The system reports 100% abstention accuracy: it never hallucinates on unknowns.

## Zoom in
The Python API is minimal by design: `remember()` and `recall()` cover the main path. Advanced features include scoped global memories, expiry dates on facts, entity extraction, LLM-driven fact extraction, per-domain memory banks, and direct BEAM access for custom consolidation workflows.

## Yes, but
The README benchmarks are self-reported, and recall@10 sits at 20% flat across scales in the BEAM retrieval table, a number worth understanding before assuming the system surfaces everything relevant in a given query. The `[all]` install flag adds vector search as an optional dependency, meaning basic usage trades retrieval quality for zero deps.

## The bottom line
Mnemosyne is the sharpest option when you want persistent agent memory that deploys anywhere without infrastructure ceremony. MIT-licensed, local-first, no telemetry, and MCP-native out of the box, it fills the gap between raw vector databases and full managed memory services.

## FAQ

### What is Mnemosyne (AxDSan)?

Mnemosyne is a zero-dependency AI memory layer that gives any agent persistent, searchable memory backed by a single SQLite file. It uses a 3-tier BEAM architecture (working memory, episodic memory, and a temporal TripleStore) to store and retrieve facts without requiring Postgres, Docker, or any external vector database. It ships with a built-in MCP server, a Python SDK, and integration guides for Cursor, Claude Code, Codex CLI, Windsurf, OpenWebUI, and OpenClaw.

### How do I install and start using Mnemosyne?

Run `pip install mnemosyne-memory` for the base install, or `pip install "mnemosyne-memory[all]"` to include vector search and the full MCP server. For MCP-based tools like Cursor or Claude Code, add a one-line JSON block pointing to the `mnemosyne mcp` command in the platform's MCP config file. For Python agents, import `remember` and `recall` directly from the `mnemosyne` package and call them anywhere in your agent loop.

### Is Mnemosyne free and open source?

Yes, Mnemosyne is released under the MIT license with no paid tiers mentioned in the sources. It is fully self-hostable and requires no cloud account or subscription. The optional sync server can be run on your own infrastructure (Docker, bare metal, or Fly.io).

### What is Mnemosyne best suited for?

Mnemosyne is best for agent developers who need persistent cross-session memory without spinning up cloud infrastructure. It excels in local-first setups where all data must stay on-device, in MCP-native workflows (Cursor, Claude Code, Codex), and in scenarios where episodic compression and a temporal knowledge graph add real value. Per the README, it supports 8+ agent platforms out of the box.

### How does Mnemosyne compare to mem0, Honcho, or ChromaDB?

Mnemosyne is the only option in the comparison table that is local-first, zero-dependency, has a built-in MCP server, and is MIT-licensed, all at once. mem0 requires Qdrant or Postgres and scored 49% on LongMemEval vs. Mnemosyne's 98.9%; Honcho requires Postgres plus three LLMs and is AGPL-licensed; ChromaDB is a vector database only and has no memory architecture. The main area where Mnemosyne trails is raw BEAM end-to-end QA, where Hindsight scores 73.4% vs. Mnemosyne's 65.2% at the 100K scale, per the README benchmark table.

### What are the main limitations or risks of using Mnemosyne?

The BEAM retrieval recall@10 is reported as 20% flat across all dataset scales in the README's retrieval table, which means the system may not surface every relevant memory in a single query pass. Benchmark figures are self-reported and should be treated as directional until independently replicated. Vector search is an optional extra (`[all]`), so the base install falls back to keyword-only retrieval. Finally, the README notes that users are solely responsible for the content they store, and sync encryption must be explicitly enabled.

---
[View on Analog](https://analoghq.ai/pt-br/axdsan/software-tools/mnemosyne)