mnemosyne-oss/mnemosyne

The Zero-Dependency, Sub-Millisecond AI Memory System for Hermes Agents and Everyone Else!

What it solves

AI agents often struggle with long-term context and memory retention. Mnemosyne provides a universal memory layer that allows agents to store and recall information without requiring external cloud services or complex infrastructure.

How it works

Mnemosyne uses a three-tier architecture called BEAM (Bilevel Episodic-Associative Memory):

  • Working memory: A hot context layer with TTL-based eviction for immediate session needs.
  • Episodic memory: Long-term storage using a hybrid search approach (vector similarity + keyword search) powered by SQLite.
  • TripleStore: A temporal knowledge graph that tracks relationships and versions over time.

It utilizes Information-theoretic binarization (MIB) to compress high-dimensional embeddings into small binary formats, allowing for high-speed retrieval directly within SQLite.

Who it’s for

  • AI Agent Developers: Anyone building custom agents in Python using an SDK.
  • Power Users: Users of existing tools like Cursor, Claude Code, Windsurf, or OpenWebUI via the Model Context Protocol (MCP).
  • Privacy-Conscious Users: Those who want local-first memory with optional client-side encryption for synchronization.

Highlights

  • Zero-dependency: Works with a single pip install and uses a single SQLite file.
  • High Performance: Achieves sub-millisecond latency and high recall scores on memory benchmarks.
  • Universal Integration: Supports MCP, Python SDK, and various plugins for popular AI interfaces.
  • Privacy-First: Local-first by default with no telemetry and optional encrypted synchronization.