SkillAgentSearch skills...

Mnemosyne

Cognitive Memory OS for AI Agents — persistent, self-improving, multi-agent memory

Install / Use

/learn @28naem-del/Mnemosyne

README

npm version npm downloads License: MIT TypeScript Discord GitHub stars CI

<p align="center"> <img src="assets/mnemosyne-logo.svg" alt="Mnemosyne" width="180" /> </p> <h1 align="center">Mnemosyne</h1> <p align="center"> <strong>Cognitive Memory OS for AI Agents</strong> </p> <p align="center"> <em>The first AI memory system that thinks like a brain</em> </p> <p align="center"> <a href="https://www.npmjs.com/package/mnemosy-ai"><img src="https://img.shields.io/npm/v/mnemosy-ai?color=blue&label=npm" alt="npm version" /></a> <a href="https://www.npmjs.com/package/mnemosy-ai"><img src="https://img.shields.io/npm/dm/mnemosy-ai?color=green" alt="downloads" /></a> <a href="https://github.com/28naem-del/mnemosyne/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="license" /></a> <a href="#"><img src="https://img.shields.io/badge/TypeScript-100%25-blue?logo=typescript&logoColor=white" alt="TypeScript" /></a> <a href="https://github.com/28naem-del/mnemosyne"><img src="https://img.shields.io/github/stars/28naem-del/mnemosyne?style=social" alt="GitHub stars" /></a> </p> <p align="center"> <a href="#quick-start">Quick Start</a> &bull; <a href="#features">Features</a> &bull; <a href="#comparison">Comparison</a> &bull; <a href="docs/api.md">API</a> &bull; <a href="docs/deployment.md">Deploy</a> &bull; <a href="COMPARISON.md">Why Mnemosyne?</a> </p>

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.

<table> <tr> <td width="33%" align="center"> <h3>10 cognitive features</h3> <p>Decay, reasoning, consolidation, Theory of Mind, reinforcement learning... 10 capabilities that exist only in research papers. We ship them all.</p> </td> <td width="33%" align="center"> <h3>$0 per memory stored</h3> <p>Zero LLM calls during ingestion. Full 12-step pipeline runs algorithmically in &lt;50ms. Competitors charge ~$0.01 per memory via LLM.</p> </td> <td width="33%" align="center"> <h3>Free knowledge graph</h3> <p>Temporal entity graph with auto-linking, path finding, and timeline reconstruction. Built-in. Mem0 charges $249/mo for theirs.</p> </td> </tr> </table>

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({ text: "User prefers dark mode and TypeScript" })  // 12-step pipeline, <50ms
const memories = await m.recall({ query: "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 | | P

Related Skills

View on GitHub
GitHub Stars34
CategoryEducation
Updated1d ago
Forks4

Languages

TypeScript

Security Score

95/100

Audited on Mar 27, 2026

No findings