MCPcopy Index your code
hub / github.com/28naem-del/mnemosyne

github.com/28naem-del/mnemosyne @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
402 symbols 790 edges 56 files 61 documented · 15% updated 37d ago★ 883 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Mnemosyne

Mnemosyne

Cognitive Memory OS for AI Agents

The first AI memory system that thinks like a brain

npm version downloads license TypeScript GitHub stars

Quick StartFeaturesComparisonAPIDeployWhy Mnemosyne?


Every AI agent today has amnesia. Every conversation starts from zero. They can't learn from mistakes. They can't build expertise. They can't share what they know with other agents. This is the single biggest bottleneck to autonomous AI.

Mnemosyne is not another vector database wrapper. It's a 5-layer cognitive architecture that gives your agents persistent, self-improving, collaborative memory — inspired by how the human brain actually stores, retrieves, and strengthens memories over time.

This matters now because agents are moving from demos to production. Stateless agents can't operate in production. They need memory that thinks.

10 cognitive features

Decay, reasoning, consolidation, Theory of Mind, reinforcement learning... 10 capabilities that exist only in research papers. We ship them all.

$0 per memory stored

Zero LLM calls during ingestion. Full 12-step pipeline runs algorithmically in <50ms. Competitors charge ~$0.01 per memory via LLM.

Free knowledge graph

Temporal entity graph with auto-linking, path finding, and timeline reconstruction. Built-in. Mem0 charges $249/mo for theirs.

Production-proven: 13,000+ memories across a 10-agent mesh with sub-200ms retrieval. Not a demo. Not a roadmap. Running right now.


Quick Start

npm install mnemosy-ai
import { createMnemosyne } from 'mnemosy-ai'

const m = await createMnemosyne({
  vectorDbUrl: 'http://localhost:6333',
  embeddingUrl: 'http://localhost:11434/v1/embeddings',
  agentId: 'my-agent'
})

await m.store("User prefers dark mode and TypeScript")  // 12-step pipeline, <50ms
const memories = await m.recall("user preferences")      // multi-signal ranked
await m.feedback("positive")                              // memories learn from use

Your agent now has persistent memory that gets smarter over time. That's it.

Only hard requirement: Qdrant (docker run -d -p 6333:6333 qdrant/qdrant). Redis and FalkorDB are optional. See full quickstart.


Features

33 features across 5 layers. Every feature is independently toggleable — start simple, enable progressively.

⚙️ Infrastructure (L1)

Feature What it does
Vector Storage 768-dim embeddings on Qdrant with HNSW indexing. Sub-linear search scaling to billions of vectors
2-Tier Cache L1 in-memory (50 entries, 5min TTL) + L2 Redis (1hr TTL). Sub-10ms cached recall
Pub/Sub Broadcast Real-time memory events across your entire agent mesh via Redis channels
Knowledge Graph Temporal entity graph on FalkorDB with auto-linking, path finding, and timeline reconstruction
Bi-Temporal Model Every memory tracks eventTime (when it happened) + ingestedAt (when stored) for temporal queries
Soft-Delete Memories are never physically deleted. Full audit trails and recovery at any time

🔧 Pipeline (L2)

Feature What it does
12-Step Ingestion Security → embed → dedup → extract → classify → score → link → graph → broadcast
Zero-LLM Pipeline Classification, entity extraction, urgency detection, conflict resolution — all algorithmic. $0 per memory
Security Filter 3-tier classification (public/private/secret). Blocks API keys, credentials, and private keys from storage
Smart Dedup & Merge Cosine ≥0.92 = duplicate (merge). 0.70–0.92 = conflict (broadcast alert). Preserves highest-quality version
Entity Extraction Automatic identification: people, machines, IPs, dates, technologies, URLs, ports. Zero LLM calls
7-Type Taxonomy episodic, semantic, preference, relationship, procedural, profile, core — classified algorithmically

🌐 Knowledge Graph (L3)

Feature What it does
Temporal Queries "What was X connected to as of date Y?" — relationships carry since timestamps
Auto-Linking New memories automatically discover and link to related memories. Bidirectional. Zettelkasten-style
Path Finding Shortest-path queries between any two entities with configurable max depth
Timeline Reconstruction Ordered history of all memories mentioning a given entity
Depth-Limited Traversal Configurable graph exploration (default: 2 hops) balancing relevance vs. noise

🧠 Cognitive (L4)

Feature What it does
Activation Decay Logarithmic decay model. Critical memories stay for months. Core and procedural are immune
Multi-Signal Scoring 5 independent signals: similarity, recency, importance×confidence, frequency, type relevance
Intent-Aware Retrieval Auto-detects query intent (factual, temporal, procedural, preference, exploratory). Adapts scoring weights
Diversity Reranking Cluster detection (>0.9), overlap penalty (>0.8), type diversity — prevents echo chambers in results
4-Tier Confidence Mesh Fact ≥0.85, Grounded 0.65–0.84, Inferred 0.40–0.64, Uncertain <0.40
Priority Scoring Urgency × Domain composite. Critical+technical = 1.0, background+general = 0.2

🚀 Self-Improvement (L5)

Feature What it does
Reinforcement Learning Feedback loop tracks usefulness. Auto-promotes memories with >0.7 ratio after 3+ retrievals
Active Consolidation 4-phase autonomous maintenance: contradiction detection, dedup merge, popular promotion, stale demotion
Flash Reasoning BFS traversal through linked memory graphs. Reconstructs multi-step logic: "service failed &rarr; config changed &rarr; rollback needed"
Agent Awareness (ToMA) Theory of Mind for agents. "What does Agent-B know about X?" Knowledge gap analysis across the mesh
Cross-Agent Synthesis When 3+ agents independently agree on a fact, it's auto-synthesized into fleet-level insight
Proactive Recall Generates speculative queries from incoming prompts. Injects relevant context before the agent asks
Session Survival Snapshot/recovery across context window resets. Agent resumes with full awareness. Zero discontinuity
Observational Memory Compresses raw conversation streams into structured, high-signal memory cells. Like human working memory
Procedural Memory Learned procedures stored as first-class objects. Immune to decay. Shared across the entire mesh
Mesh Sync Named, versioned shared state blocks. Real-time broadcast propagation to all agents

Deep dive into every feature: docs/features.md


AGI-Grade Capabilities

These 10 capabilities exist almost exclusively in academic papers and closed research labs. Mnemosyne ships all of them as production infrastructure.

Capability Industry Status Mnemosyne
Flash Reasoning (chain-of-thought graph traversal) Research paper only Production
Theory of Mind for agents Research paper only Production
Observational memory compression Research paper only Production
Reinforcement learning on memory Research paper only Production
Autonomous self-improving consolidation Not implemented anywhere Production
Cross-agent shared cognitive state Not implemented anywhere Production
Bi-temporal knowledge graph Research paper only Production
Proactive anticipatory recall Not implemented anywhere Production
Procedural memory / skill library Not implemented anywhere Production
Session survival across context resets Not implemented anywhere Production

Comparison

Full analysis: COMPARISON.md • Detailed docs: docs/comparison.md

Feature-by-Feature

Feature Mnemosyne Mem0 Zep Cognee LangMem Letta
Pipeline & Ingestion
Zero-LLM ingestion pipeline ❌ LLM ❌ LLM ❌ LLM ❌ LLM ❌ LLM
12-step structured pipeline Partial Partial
Security filter (secret blocking)
Smart dedup with semantic merge
Conflict detection & alerts
7-type memory taxonomy Partial
Entity extraction (zero-LLM) LLM-based LLM-based LLM-based
Cognitive Features
Activation decay model
Multi-signal scoring (5 signals)
Intent-aware retrieval
Diversity reranking
4-tier confidence system
Priority scoring (urgency × domain)
Flash reasoning chains
Reinforcement learning
Active consolidation (4-phase)
Proactive recall
Session survival
Observational memory
Knowledge Graph
Built-in knowledge graph ✅ Free $249/mo
Temporal graph queries
Auto-linking (bidirectional)
Path finding between entities Partial
Timeline reconstruction
Bi-temporal data model
Multi-Agent
Real-time broadcast (pub/sub)
Theory of Mind (agent awareness)
Cross-agent synthesis
Knowledge gap analysis
Shared state blocks (Mesh Sync)
Infrastructure
2-tier caching (L1 + L2)
Soft-delete architecture
Procedural memory (skill library)
CLI tools

Score: Mnemosyne 33/33 • Mem0 5/33 • Zep 3/33 • Cognee 5/33 • LangMem 0/33 • Letta 4/33

Pricing

Mnemosyne Mem0 Zep Letta
Self-hosted Free (MIT) Free (limited) Free (limited) Free
Knowledge graph Free (FalkorDB) $249/mo (Pro) N/A N/A
Per memory stored $0.00 (zero LLM) ~$0.01 (LLM call) ~$0.01 (LLM call) ~$0.01 (LLM call)
100K memories $0 ~$1,000 ~$1,000 ~$1,000
Multi-agent Free Enterprise pricing N/A N/A

Architecture

Mnemosyne Mem0 Zep Cognee LangMem Letta
Approach Cognitive OS (5 layers) Vector store + LLM Session memory + LLM Knowledge ETL + LLM Conversation buffer Self-editing memory
LLM dependency None (embedd

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 236
Method 86
Interface 56
Class 24

Languages

TypeScript100%

Modules by API surface

src/index.ts26 symbols
src/cognitive/pattern-miner.ts25 symbols
src/cache/layer-cache.ts24 symbols
src/graph/temporal-sequences.ts23 symbols
src/cognitive/preferences.ts20 symbols
src/broadcast/synthesis.ts20 symbols
src/core/bm25.ts18 symbols
src/graph/falkordb.ts15 symbols
src/cognitive/dream.ts15 symbols
src/core/qdrant.ts13 symbols
src/cognitive/toma.ts11 symbols
src/cognitive/retrieval.ts11 symbols

For agents

$ claude mcp add mnemosyne \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page