This release is a pre-release and may not be stable for production use.
The Universal Memory Layer for Any AI Agent — Zero-Dependency, Sub-Millisecond, Fully Private
pip install mnemosyne-memory==4.0.0b3 Copy PIP instructions
Zero-cloud AI memory that works everywhere. SQLite-backed. One pure-Python dependency.
Mnemosyne is a universal, Hermes-first memory layer that works with any agent framework (Claude Code, Cursor, Codex, OpenWebUI, OpenClaw, or your own custom agent). One pip install, one SQLite database. No external services required.
See docs/integrations/ for complete setup guides per platform.
pip install mnemosyne-memory # With all features (vector search + MCP server) pip install "mnemosyne-memory[all]" # Upgrade pip install --upgrade mnemosyne-memory Add to your agent MCP-based (Cursor, Claude Code, Codex, Windsurf):
{ "mcpServers": { "mnemosyne": { "command": "mnemosyne", "args": ["mcp"], "env": {} } } } Python SDK (any agent):
from mnemosyne import remember, recall remember("User prefers dark mode interfaces") results = recall("user preferences") OpenWebUI: Drop a 1-line bridge file into data/tools/.
OpenClaw: Add provider: mnemosyne.integrations.openclaw:create_provider to config.
Mnemosyne is measured on BEAM (ICLR 2026), in one SQLite file with no cloud dependency. A LongMemEval (ICLR 2025) run is pending.
Read the version labels. These are point-in-time results, not a claim about the current build. The BEAM numbers were measured on v3.0.0 (May 2026) and predate polyphonic recall, enhanced recall, SHMR, and the persona tier. They have not been re-run since. Re-running BEAM and LongMemEval on the current tree is tracked as an open task.
A 98.9% Recall@All@5 figure from an April 2026 run was listed here until September 2026. No methodology or run log for it exists in any of the project repositories, so it has been withdrawn until LongMemEval is re-run on the current tree with a published, reproducible setup (#584).
Per-ability (100K): IE 91.5% · MR 87.5% · TR 75.0% · ABS 100.0% · CR 50.0% · KU 50.0% · EO 25.0% · IF 62.5% · PF 54.5% · SUM 55.6%
Judge caveat: Mnemosyne's run used Llama 3.3 70B with a DeepSeek V4 Flash judge, while Hindsight's published 73.4% used Llama-4-Maverick. Scores produced under different judges are not directly comparable, so the 65.2% and 73.4% figures in the same row should be read with that in mind. Hindsight leads on this benchmark as published. See beam-benchmark.md for the full methodology.
This measures raw retrieval in isolation, with no answer synthesis, so it is a different quantity from the end-to-end QA scores above and is not comparable to them.
The notable property is that recall holds flat as the corpus grows by two orders of magnitude, and that storage grows sub-linearly: episodic compression delivers 9.4x savings. Abstention accuracy is 100%, meaning the system declines rather than inventing an answer when the corpus does not contain one. The absolute 20% Recall@10 is low, and the flatness rather than the level is the result worth citing.
If Mnemosyne is installed in an isolated venv, activate that venv or invoke its bin/mnemosyne executable before running these commands.
# MCP server (works with any MCP client) mnemosyne mcp # stdio (default) mnemosyne mcp --transport sse --port 8080 # SSE (web clients) mnemosyne mcp --transport streamable-http --port 8080 # Streamable HTTP (native MCP http) # A non-loopback streamable-http bind also requires MNEMOSYNE_MCP_ALLOWED_HOSTS # (and, for browser clients, MNEMOSYNE_MCP_ALLOWED_ORIGINS) -- see docs/cli-reference.md. # Direct memory ops mnemosyne store "User likes dark mode" mnemosyne recall "preferences" mnemosyne stats mnemosyne sleep # Run consolidation # Export / import mnemosyne export backup.json mnemosyne import backup.json # Sync (bidirectional memory sync between instances) mnemosyne sync --db-path /path/to/mnemosyne.db --remote https://my-vps:8765 Python API from mnemosyne import remember, recall # Store a fact remember("User prefers dark mode interfaces", importance=0.9, source="preference") # Store globally (visible across all sessions) remember("User email is user@example.com", importance=0.95, scope="global") # Store with expiry remember("Temp token: abc123", importance=0.8, valid_until="2026-12-31") # Search results = recall("interface preferences", top_k=3) # Temporal recall (recency boost) results = recall("deployments", temporal_weight=0.5, temporal_halflife=48.0) # Entity extraction remember("Met with Abdias about the v2 release", extract_entities=True) # LLM-driven fact extraction remember("User said they prefer Python for backend work", extract=True) # Temporal triples (knowledge graph), scoped to a bank so it shares the # bank's MCP tools instead of writing a standalone triples.db. from mnemosyne.core.triples import TripleStore kg = TripleStore.for_bank("default") kg.add("Maya", "assigned_to", "auth-migration", valid_from="2026-01-15") kg.query("Maya", as_of="2026-02-01") # Memory banks (per-domain isolation) from mnemosyne.core.banks import BankManager BankManager().create_bank("work") work_mem = Mnemosyne(bank="work") work_mem.remember("Sprint review on Friday") Advanced: BEAM Direct Access from mnemosyne.core.beam import BeamMemory beam = BeamMemory(session_id="my_session") beam.remember("Important context", importance=0.9) beam.consolidate_to_episodic( summary="User likes Neovim", source_wm_ids=["wm1"] ) results = beam.recall("editor preferences", top_k=5) Architecture +------------------------------------------------------------+ | Any AI Agent | | (Hermes - Claude Code - Cursor - Codex - OpenWebUI - MCP) | +------------------------+-----------------------------------+ | MCP / SDK / Plugin +------------------------v-----------------------------------+ | Mnemosyne BEAM | | +------------+ +--------------+ +--------------------+ | | | Working | | Episodic | | TripleStore | | | | Memory |->| Memory | | (Temporal KG) | | | | (hot ctx) | | (long-term) | +--------------------+ | | +------------+ +------+-------+ | | | | | +----------v----------+ | | | SQLite DB | | | | (single file) | | | | sqlite-vec + FTS5 | | | | MIB binary vectors | | | +---------------------+ | +-------------------------------------------------------------+ BEAM (Bilevel Episodic-Associative Memory):
Hybrid scoring: 50% vector similarity + 30% FTS5 rank + 20% importance, all inside SQLite.
Binary vectors: Information-theoretic binarization (MIB) compresses 384-dim float32 embeddings into 48 bytes -- 32x reduction. Hamming distance entirely within SQLite. No ANN indices, no external vector DB.
You are solely responsible for the content stored in Mnemosyne. Mnemosyne Sync supports optional client-side encryption. When disabled, memory content travels over TLS and is stored according to your infrastructure's security settings.
When client-side encryption is enabled, the remote sync server sees only metadata (event IDs, timestamps, operation types, device IDs). Memory content, importance scores, source fields, and vector embeddings are all encrypted before transmission. The server cannot read your memories.
Full documentation: docs/security.md / docs/sync.md
Comparison: Mnemosyne is the only memory system with client-side encryption of sync payloads as a core feature. Zep offers BYOK for data-at-rest but manages the key server-side. Every other system (Mem0, Letta, Honcho, Supermemory) relies solely on self-hosting and TLS for privacy.
Default embeddings are English-optimized (bge-small-en-v1.5). For non-English or multilingual recall, swap the model:
# Low-resource local multilingual embeddings export MNEMOSYNE_EMBEDDING_MODEL=sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 # Larger FastEmbed E5 multilingual embeddings export MNEMOSYNE_EMBEDDING_MODEL=intfloat/multilingual-e5-large # Or Chinese-specific embeddings export MNEMOSYNE_EMBEDDING_MODEL=BAAI/bge-small-zh-v1.5 See docs/configuration.md#custom-embedding-models for tradeoffs (RAM, speed, dimension changes).
When used with Hermes Agent, Mnemosyne exposes provider tools for the memory lifecycle, lifecycle hooks for automatic context injection, and MCP support.
For the full Hermes setup guide, see docs/hermes-integration.md. That is the canonical, most up-to-date reference.
Hardware guidance: Core alone runs on a Raspberry Pi 4 (4 GB) with ~300 MB free for LLM. [embeddings] needs at least 2 GB free RAM. [all] recommends 8 GB+.
Privacy note on remote embedding endpoints. Embeddings go to a remote API whenever MNEMOSYNE_EMBEDDING_API_URL points at a custom (non-OpenRouter) endpoint, the model name is API-shaped (openai/*, text-embedding*), or MNEMOSYNE_EMBEDDINGS_VIA_API is truthy; on the OpenRouter default (or an OpenRouter URL) the last two are what route, and with no URL set the OpenRouter default is used. That service receives the text of your memories and of your recall queries (working-memory content, summaries, annotations, and search queries) for vectorization. For privacy-sensitive or local-first deployments prefer a local-embedding profile ([embeddings] or [all]); use a remote endpoint only when you accept that the embedding provider sees your content.
source ~/.hermes/hermes-agent/venv/bin/activate python -m ensurepip --upgrade python -m pip install --upgrade pip python -m pip install mnemosyne-hermes mkdir -p ~/.hermes/plugins/mnemosyne ln -sfn "$(~/.hermes/hermes-agent/venv/bin/python -c 'import pathlib, mnemosyne_hermes; print(pathlib.Path(mnemosyne_hermes.__file__).resolve().parent)')"/* ~/.hermes/plugins/mnemosyne/ hermes config set memory.provider mnemosyne After installing, verify the provider in the active Hermes profile and start a new session or restart the gateway:
hermes memory status Do not use hermes tools disable memory: that disables the memory toolset, including provider tools. In current Hermes versions, built-in memory and an external provider are separate mechanisms; hermes memory off disables the external provider only. Keep existing built-in memory as a rollback/reference point during a transition and confirm the active provider with hermes memory status.
See docs/hermes-integration.md for the full setup guide.
The provider tool inventory is version-specific. Confirm the active provider with hermes memory status, then inspect the runtime tool surface:
hermes tools list | grep mnemosyne_ Mnemosyne exposes memory, knowledge-graph, multi-agent-surface, working-note, and operational tools. Treat the runtime list as authoritative. The installer or wrapper registers the plugin manifest under $HERMES_HOME/plugins/mnemosyne, where Hermes discovers it.
Updating: For the persistent side-venv wrapper path, use the side venv rather than a bare pip:
export HERMES_HOME=/opt/data # Replace with the active Hermes home VENV="$HERMES_HOME/.mnemosyne/venv" "$VENV/bin/python" -m pip install --upgrade 'mnemosyne-memory[embeddings]' mnemosyne-hermes "$VENV/bin/mnemosyne-hermes" install --mode wrapper --force --python "$VENV/bin/python" hermes gateway restart The forced install regenerates the wrapper plugin files and does not modify the Mnemosyne database.
For a direct or source install, use pip install --upgrade mnemosyne-hermes && hermes gateway restart or git pull && pip install --upgrade integrations/hermes && hermes gateway restart (source).
Bidirectional, delta-based memory sync between Mnemosyne instances. Designed for desktop-to-VPS sync, team collaboration, and backup.
# Start a sync server on your VPS mnemosyne sync-serve --port 8765 --api-key "your-secret-key" # On your local machine, sync bidirectionally mnemosyne sync --remote https://my-vps:8765 # With client-side encryption export MNEMOSYNE_SYNC_KEY=$(mnemosyne sync-generate-key) mnemosyne sync --remote https://my-vps:8765 --encrypt # Check sync status mnemosyne sync-status --remote https://my-vps:8765 When encryption is enabled, the remote server sees only metadata (event IDs, timestamps, operation types). Memory content is encrypted before leaving your machine and can only be decrypted with your key.
Full documentation: docs/sync.md / docs/security.md
Full docs: docs/ . Changelog: CHANGELOG.md . Releases: GitHub Releases . Integrations: docs/integrations/
Mnemosyne development is supported by paid sponsorships and by companies providing compute credits (LLM, embedding, GPU), hosting, and developer tooling. See the full list, tiers and sponsorship policy at mnemosyne.site/partners.
The Compute Partner position is currently open. It is held by one inference provider at a time, whose credits run the nightly recall benchmarks and multi-model parity tests, in exchange for the top placement in this README, the partners page and a dedicated documentation page.
Compute Partners are disclosed material connections under FTC Endorsement Guides (16 CFR Part 255). Sponsors have no editorial control over benchmark methodology or results.
Sponsorship is paid, in cash or in credits, and every placement is disclosed. To ask about the Compute Partner position or a Sponsor slot, email sponsors@mnemosyne.site or open an issue tagged sponsorship.
Discord: Join the Mnemosyne community . Issues: GitHub Issues
"The faintest ink is more powerful than the strongest memory." -- Hermes Trismegistus
llm embeddings mcp openclaw sync media test all dev
ai memory sqlite agent llm context embeddings vector-store honcho zep mcp openwebui openclaw cursor claude-code codex hermes model-context-protocol sync encryption
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.




