Mnemosyne

Local-first long-term memory for AI agents: one SQLite file that keeps what an agent learned together with the evidence it came from, so corrections retire stale lessons.

Stars
★ 162
Last updated
13d ago
FARS reviewed
Oct 30, 2026
License
MIT
Primary language
TypeScript

At a glance

How it runs
CLIMCP serverLibrary / SDK
Works with
Universal · cross-platformClaude CodeCodex (Partial support)
Cost
Free, no paid service needed
Setup effort
Low · running in minutes
You'll need
Node.js ≥22.16npxShell / CLINetwork accessLocal filesystemMCP Server
Typical use
A Claude Code or Cursor user whose coding agent should remember project decisions across sessions without shipping memory to a third-party service.
Not a fit if
  • Teams that need multi-tenant hosted memory with enterprise identity and remote TLS.
  • Projects that cannot depend on a pre-release channel for the features they need.
  • Teams expecting managed synchronization, model training or official native framework integrations.
Website
mnemosy.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-10

What does this agent do, and when should you use it?

Mnemosyne (npm package mnemosy-ai) is a local-first, long-term memory layer for AI agents whose entire state lives in a single SQLite file. Every record carries a source URI and a trust tier, and when a source is corrected the procedures and skills recorded as depending on it are retired while the superseded version stays inspectable. The project ships a TypeScript SDK (createLocalMemory from mnemosy-ai/local), a mnemosy CLI, an MCP server exposing 16 memory_* tools, and an authenticated HTTP service with a Python client and live inspector. The local engine needs no model API key, database server or Docker, and runs offline. Stable is 2.0.0; the 3.0.0-rc.4 pre-release on the npm next channel adds inferred dependency proposals, a poisoning gate, outcome-gated reversible consolidation with signed receipts, and opt-in precision controls. It is MIT-licensed TypeScript from Aristotle Intelligence Inc., with documented integrations for Claude Code, Cursor and Codex.

The end-to-end flow is store, correct, compile, recall, audit. A host opens a store with createLocalMemory({ path, workspaceId, agentId }), then writes facts, procedures or skills with memory.store({ text, kind, key, source, trust, visibility, dependencies }), optionally declaring which records a new one depends on. memory.correct(id, { text, source, reason }) replaces a source and flips dependent records to invalidated; memory.get(id) still returns the old version for inspection. memory.compile({ query, maxTokens }) returns a budgeted context block with citations and uncertainty that the host passes to its own model. Retrieval defaults to scoped BM25, with opt-in embeddings, hybrid fusion and cross-encoder reranking; indexMode accepts exact, auto, sqlite-vec or hnsw, and any candidate an index proposes is re-authorized and rescored against the stored vector. The CLI provides mnemosy demo (five offline self-measuring moments), mnemosy mcp (start the MCP server), mnemosy bisect (given records a failed retrieval should have returned, find the ones that pushed them out) and mnemosy learning-demo. MemoryRuntime with RECOMMENDED_SKILL_PROMOTION_POLICY governs skill candidates and controller-recorded trials. In 3.0, the dependencies module proposes undeclared dependencies inferred from successful co-use for review, a poisoning gate screens a reproducible 227-case attack suite, and consolidation runs as a signed diff replayed against recorded outcomes, kept only if coverage does not drop and no invariant breaks, with a one-command rollback. mnemosy-ai/bridge wraps an existing memory service read-only for shadow, assist and preferred routing during migration, and eleven export profiles support full import with preview, atomic apply, guarded undo and whole-database backups.

  1. A Claude Code or Cursor user whose coding agent should remember project decisions across sessions without shipping memory to a third-party service.
  2. A team whose specification changes often and needs procedures derived from the old spec to stop being served as current guidance.
  3. An engineer debugging recall quality who must identify which record pushed a known-correct answer out of the results, using mnemosy bisect.
  4. A platform team building its own agent runtime in TypeScript that needs a budgeted context block with citations and uncertainty annotations.
  5. A security-minded team that runs the 227-case poisoning suite and the consolidation gate before trusting any accumulated store.
  6. A team migrating off an existing memory service while requiring the old store to stay untouched and routable back.
  7. An operator who needs a private-by-default, single-file store with checkpoints, profile fields and freshness probes for a long-running assistant.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npm install mnemosy-ai
  • npx --no-install mnemosy demo
  • npm install mnemosy-ai@next
  • npx -y -p [email protected] mnemosy demo
Config files
.mcp.json
Runtime
Node.js 22.16+
Install notes cover
Docker

How do you install or deploy this agent?

Requires Node.js ≥22.16 with npx on PATH. The first npx launch downloads the package from the network; the offline demos run afterwards without a key or server.

npm install mnemosy-ai
npx --no-install mnemosy demo

For the 3.0 pre-release (3.0.0-rc.4):

npm install mnemosy-ai@next
npx --no-install mnemosy demo

Run an exact version without installing into the project:

npx -y -p [email protected] mnemosy demo

Build from a source checkout:

git clone --branch v2.0.0 --depth 1 https://github.com/28naem-del/mnemosyne.git
cd mnemosyne
npm ci --ignore-scripts
npm run build
npm run demo

How do you use this agent?

The fastest first working invocation is the offline demo, which needs no API key, model or Docker:

npx -y -p mnemosy-ai@next mnemosy demo

Connect the memory to Claude Code (the repository is also a plugin marketplace: claude plugin marketplace add 28naem-del/mnemosyne):

claude mcp add mnemosyne -- npx -y -p mnemosy-ai@next mnemosy mcp --db ./.mnemosyne/memory.sqlite --workspace my-project --agent assistant

Or register the same server in the project's .mcp.json:

{
  "mcpServers": {
    "mnemosyne": {
      "command": "npx",
      "args": [
        "-y", "-p", "mnemosy-ai@next", "mnemosy", "mcp",
        "--db", "./.mnemosyne/memory.sqlite",
        "--workspace", "my-project", "--agent", "assistant"
      ]
    }
  }
}

Embed it in your own code with the TypeScript SDK:

import { createLocalMemory } from 'mnemosy-ai/local';

const memory = createLocalMemory({
  path: './agent-memory.sqlite',
  workspaceId: 'catalogue',
  agentId: 'designer',
});

const brief = memory.store({
  text: 'Product images must be 1200 by 900 pixels.',
  kind: 'fact',
  key: 'catalogue.image-size',
  source: { uri: 'brief://catalogue/v1' },
  trust: 'observed',
  visibility: 'workspace',
});

const procedure = memory.store({
  text: 'Export catalogue product images at 1200 by 900 pixels.',
  kind: 'procedure',
  source: { uri: 'run://designer/export' },
  trust: 'observed',
  dependencies: [brief.id],
  visibility: 'workspace',
});

memory.correct(brief.id, {
  text: 'Product images must be 1600 by 1200 pixels.',
  source: { uri: 'brief://catalogue/v2' },
  reason: 'The delivery specification changed.',
});

console.log(memory.get(procedure.id)?.status); // invalidated
const context = memory.compile({ query: 'catalogue product images', maxTokens: 2048 });
console.log(context.text);
memory.close();

mnemosy mcp requires --db, --workspace and --agent. Add --read-only to omit every mutation tool; memory_forget appears only with --allow-destructive. The database file is created with mode 0600 and its parent directory with 0700, so add .mnemosyne/ to .gitignore.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

What are this agent's strengths and limitations?

Pros
  • Evidence is first-class: every record keeps its source URI and trust tier, corrections retire dependents, and the superseded version stays inspectable rather than being overwritten.
  • No infrastructure: one SQLite file, no database server, no Docker, no model API key, and the demos run fully offline.
  • Four entry points over the same store — TypeScript SDK (createLocalMemory), mnemosy CLI, MCP server with 16 memory_* tools, and authenticated HTTP with a Python client and live inspector.
  • Publishes reproducible measurements alongside its misses: 409/500 on LongMemEval-S, LoCoMo recall@10 73.57 vs Mem0 OSS 63.72, plus unmet targets (p95 139–223 ms at 1M records against a 50 ms goal).
  • Auditable safety controls: 0/167 escapes and 0/60 false quarantines on the 227-case poisoning suite with consolidation on, 1000/1000 replay determinism, bisect blame precision 1.00 at 2,000 records.
  • MIT-licensed, and the Claude Code integration is labelled Tested (Claude Code 2.1.301 lists 16 tools after install).
Limitations
  • Two release lines: stable 2.0.0, while the headline 3.0 capabilities live in the 3.0.0-rc.4 pre-release on npm next, so adopting them means tracking a release candidate.
  • 3.0 is breaking and moves the legacy Vector Engine to mnemosy-ai-legacy, which the README says is not yet on npm — existing Vector Engine users have no published migration target.
  • Workspace and agent IDs are trusted controller selectors, not tenant authentication; remote TLS and enterprise identity are left to your deployment, and databases plus plain backups are unencrypted unless you use --encrypt bundles.
  • The consolidation gate is off by default in the standard MCP setup, and MCP exposes no consolidation, bisect or outcome recording, so those features require the SDK.
  • Integration evidence is uneven: Cursor is documented but untested, Codex was verified as configuration only (server never run inside a session), and Hermes is untested.
  • Some published numbers are known-weak or unreproducible: recall latency was measured only on a loaded machine with an uncommitted harness, and contextual reranking lands 0.82 points short of its own 72.80% gate.
  • Requires Node.js ≥22.16 and shares a name with the unrelated Python project mnemosyne-oss/mnemosyne, which misroutes issues and search results.

How does this agent compare with similar options?

The repository publishes a matched benchmark against Mem0 OSS: same corpus, same chunks, same K, same packing budget, all scored in one process, with losses printed in the same tables. On LoCoMo, Mnemosyne with its bundled reranker reaches recall@10 of 73.57 versus 63.72 for Mem0 OSS (given Mnemosyne's reranker); on LongMemEval-S the two tie at recall@20 96.67. Fast mode without the reranker trails Mem0 at every K on LoCoMo by under one point and on MRR, and Mem0 has the higher LongMemEval-S MRR (COMPARISON.md). Zep Cloud was measured in a separate matched run on 29 October 2026 covering LoCoMo only, on the free plan via episode search, with results and disclosures in COMPARISON.md and reports/matched-run-2026-10-29-zep.md. Graphiti was not run. All of these are retrieval-coverage figures without a reader or judge, not answer accuracy.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Mnemosyne This agent 56 · Major gaps CLIFree ★ 162 13d ago TypeScript Claude Code
Remnic Agent Memory 73 · Some gaps CLIFree + model costs ★ 235 today TypeScript ChatGPT · Codex · Claude Code · OpenAI API
agent-memory 60 · Some gaps — ★ 4.3k 11d ago Python Codex · Claude Code
Mnemo Cortex 75 · Good Self-hosted serviceFree ★ 161 4d ago Python Codex · Claude Code · Claude.ai

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
56/ 100 5-point scale 2.8 / 5
Trust 19/29
Reliability 6/14
Adaptability 10/18
Convention 10/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust19 / 29 · 3.3/5

README, SECURITY.md and configuration.md show MCP authority fixed at launch (--read-only, --allow-destructive, --no-capture, --no-recall); models cannot pick workspaces or raise trust; DB file 0600 and dir 0700; HTTP defaults to loopback with token revocation; backups can be encrypted; forgetting and rollback boundaries are documented. Deductions: workspace/agent IDs are not authentication, plaintext storage and backups are the default, and dependency security rests on CI npm audit plus optional peers with no pinned vulnerability disposition, so each item scores 2 rather than 3.

Reliability6 / 14 · 2.1/5

Docs are candid about failure boundaries (bisect refuses hnsw, merge failures error out, CI verifies the packed artifact), but dependency availability is a real risk: 3.0 moves the legacy vector engine to the unpublished mnemosy-ai-legacy, hnswlib-node/sqlite-vec are optional native deps, and @huggingface/transformers is an optional peer, so install paths can fail; concrete failure-message formats are thinly evidenced in the visible files. Hence dependency_availability 1 and failure_messages 1.

Adaptability10 / 18 · 2.8/5

README covers Claude Code, Cursor, Codex and Hermes with Tested/Documented labels and states capability boundaries (MCP lacks consolidation/bisect, gate off by default). Trigger precision is weaker: which memory_* tool to call is left to the host model, with no trigger policy or prompt constraints in the repo, so trigger_precision scores 1.

Convention10 / 18 · 2.8/5

Documentation structure is complete (quickstart, configuration, SECURITY, CHANGELOG, CLAIMS, BENCHMARKS-TRUST), install notes are detailed and distinguish stable vs pre-release, known limitations (latency miss, 0.82-point gate shortfall, slower overlap scorer) are disclosed, and MIT license is present. Deductions: naming stability suffers from the 3.0 breaking change and package split; maintenance responsibility is thin because the publisher is unverified, only an email and company name are given, and there is no LTS commitment, so maintenance_responsibility scores 1.

Effectiveness7 / 13 · 2.7/5

Output usability is good: CLI/SDK/MCP/HTTP entry points, a self-measuring demo printing PROOF lines, and 15 examples. Marginal value is clear (evidence chains, correction propagation, replay). Cost-benefit needs caution: Node >=22.16, optional model downloads, native dependency builds, and several benchmarks use synthetic corpora or fixtures the controls were designed against, so realized benefit is scenario-dependent; cost_benefit scores 1.

Verifiability4 / 8 · 2.5/5

CLAIMS.md and BENCHMARKS-TRUST.md map each claim to a protocol and command and explicitly list non-claims and unmet gates, separating fact from inference well. Cross-source corroboration is limited: most numbers come from self-built synthetic corpora and self-chosen fixtures, and the Mem0 comparison is a single-process self-run with no independent third-party reproduction, so cross_source_corroboration scores 1.

Risks and how to mitigate them
  • Publisher identity is unverified; the npm name mnemosy-ai is unrelated to the Python project mnemosyne-oss, so confirm provenance before installing.
  • 3.0 is a breaking pre-release that moves the legacy vector engine to the unpublished mnemosy-ai-legacy; read the migration notes before upgrading.
  • The local database and plain backups are plaintext, and forgetting cannot erase old backups, exports, or prompts already sent to a model.
  • Several benchmarks use synthetic corpora or public fixtures the controls were designed against, not independent reproduction; validate recall and performance gains yourself.
  • The consolidation gate is off by default in the standard MCP setup and must be enabled explicitly from the SDK.
Evidence confidence: Low Reviewed Oct 30, 2026 Reviewed revision d9119c4ee927
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/28naem-del-mnemosyne.svg)](https://followagents.com/en/agents/28naem-del-mnemosyne)
<a href="https://followagents.com/en/agents/28naem-del-mnemosyne"><img src="https://followagents.com/badge/28naem-del-mnemosyne.svg" alt="FARS review"></a>

FAQ

Do I have to pay for LLM calls to use it?
No. The local engine, the CLI demos and the default retrieval path call no model and need no API key. Paid models only enter when you hand compile output to your own model, or when you reproduce the repository's answer-accuracy evaluation (which used claude-sonnet-4.6 as reader and claude-haiku-4.5 as judge).
What happens to a learned procedure when its source is corrected?
Records declared as depending on the corrected source are set to invalidated and stop being eligible as current guidance, while the old record remains inspectable. The 3.0 pre-release can go further: it infers undeclared dependencies from successful co-use and proposes them for review, and once accepted they participate in invalidation. A premise guard additionally holds anything co-used with a changed premise, which is what drives stale procedures to 0 in the dependency suite.
Can I give an agent read-only access?
Yes. Launch the server with --read-only to omit every mutation tool; memory_forget is registered only when --allow-destructive is also passed. Over MCP a model cannot switch workspace, raise its own trust tier, or report its own skill trial results.
Should I install 2.0.0 or 3.0.0-rc.4?
npm install mnemosy-ai installs stable 2.0.0; the inferred-dependency proposals, poisoning gate, reversible consolidation and precision controls require npm install mnemosy-ai@next (3.0.0-rc.4). Both expose the same MCP tools. 3.0 is a breaking release and the legacy Vector Engine is no longer in the main package.
Can it serve as a multi-tenant hosted memory service?
Not as shipped. Workspace and agent IDs are trusted selectors, not authentication; the HTTP service supplies scope-bound bearer auth, but remote TLS and enterprise identity are deployment work you must do. Databases and plain backup bundles are unencrypted, and forgetting cannot erase older backups or prompts already sent to a model.
Is Mnemosyne open source?
Yes. The source code is on GitHub (28naem-del/mnemosyne) under the MIT licence.
Is Mnemosyne safe to use?
FollowAgents' FARS review (Oct 30, 2026) scored Mnemosyne 19/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Mnemosyne still maintained?
Yes. The latest commit on GitHub is from 2026-11-10, within the last 30 days.
Who makes Mnemosyne?
Mnemosyne is published on GitHub by the account 28naem-del. FollowAgents has not verified which person or company is behind that account.
What is Mnemosyne's official website?
The project's GitHub repository lists https://mnemosy.ai as its website. That link is set by the repository owner; the source code itself is on GitHub (28naem-del/mnemosyne).
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts