Local-first, persistent memory for AI agents — in a file you own.
Give Claude Code, Cursor, Codex, or any MCP client a memory that survives restarts.
One SQLite file. No cloud, no API keys, no vendor lock-in.
English · 简体中文 · Español · 日本語 · 한국어 · Français · Deutsch · Português · Русский · हिन्दी · العربية
Website · Handbook · Docs · Discord · Twitter/X
npx -y @mem-os/sdk store "Prefers pnpm over npm" --db ./memos.db # store
npx -y @mem-os/sdk search "package manager" --db ./memos.db # recallimport { MemOS } from "@mem-os/sdk";
const memos = new MemOS(); // one SQLite file, zero config
await memos.store("Prefers pnpm over npm");
const hits = await memos.search("package manager");Works with Claude Code · Cursor · Codex · Gemini CLI · Hermes · OpenClaw · Cline · Zed · Goose · Kilo · Ollama · LangChain · CrewAI · any MCP client. memos connect <harness> writes the config for you — see the harness matrix.
Why it is different: the memory is a single SQLite file on your disk (export it, back it up, delete it) · no network calls required · typed graph edges, temporal validity, trust scores, and provenance · MIT, no paid tier.
| Benchmark | Result |
|---|---|
| LongMemEval-S, full 500 | 99.4% Hit@20 · 98.3% evidence recall · 96.4% all-evidence@20 |
| ConvoMem, 387 scored | 91.0% Hit@10 · 89.4% evidence recall@10 |
| LoCoMo, full 1,986 | 65.0% Hit@10 · 59.8% evidence recall@10 |
Evidence-ID scored, no LLM judge. The LoCoMo conversations 0–1 subset (304 questions) reaches 79.8% Hit@10; the full-set number is the headline. Canonical source: website/data/benchmarks.json, generated from the raw artifacts in docs/artifacts/. Commands and caveats: benchmarks/README.md.
New here? Ingest your notes in 60 seconds — install, point at a folder, search it.
Installing? Agent-readable install contract · Harness matrix · MCP compatibility policy · per-harness snippets
Contributing? Good first issues · CONTRIBUTING.md · open benchmark leaderboard
# TypeScript / Node.js
npm install @mem-os/sdk
# or run it without installing
npx -y @mem-os/sdk init --yes
# Python HTTP server
pip install mem-os-python
memos-server # http://localhost:7400The npm package tracks tagged releases and can briefly lag main. The GitHub source is the canonical, always-current build (v1.6.27). For the latest source build, see Installation.
npx -y @mem-os/sdk connect claude-code --write
npx -y @mem-os/sdk connect cursor --write
npx -y @mem-os/sdk connect codex --writeconnect writes the real MCP config, keeps a backup, and prints the restart step. For every supported harness, see the harness matrix.
| Capability | What it means |
|---|---|
| One file you own | A single SQLite database; copy it, back it up, encrypt it, delete it |
| Hybrid retrieval | SQLite FTS5 + embeddings, fused and relevance-gated |
| Graph memory | Typed edges: relates_to, contradicts, supports, derived_from, temporal_precedes |
| Temporal validity | validFrom / validTo and point-in-time search |
| Trust and provenance | Source, trust score, version timeline, quarantine queue |
| Context packs | Token-budgeted memory bundles with citations |
| Consolidation | Dedupe, archive, summarize clusters, decay stale memories without losing history |
| MCP native | stdio and Streamable HTTP, with a published compatibility policy |
| Four surfaces | TypeScript SDK, CLI, MCP server, HTTP API — all on the same store |
| Adapters | OpenAI, Anthropic, Vercel, LangChain, CrewAI, Ollama |
| Portability | Import ChatGPT/Claude memory, export JSON/Markdown/Obsidian, backup/restore |
| Image memory | Captions plus optional CLIP pixel search |
| I want to… | Read |
|---|---|
| Install in five minutes | Installation |
| Point it at my notes | Ingest your notes |
| Connect my coding agent | Harness matrix |
| Understand nodes, trust, time, packs | Memory model |
| Look up a command, tool, or route | CLI · MCP tools · HTTP API |
| Operate a store | Security model · Operations |
| See benchmark details | Results in plain English |
| Understand the architecture | ARCHITECTURE.md |
| See what is planned | ROADMAP.md |
Retrieval-only, evidence-ID scored, no reader model and no LLM judge:
| Benchmark | Result |
|---|---|
| LongMemEval-S, full 500 | 99.4% Hit@20 · 96.4% all-evidence@20 |
| ConvoMem, 387 scored | 91.0% Hit@10 · 89.4% evidence recall@10 |
| LoCoMo, full 1,986 | 65.0% Hit@10 · 59.8% evidence recall@10 |
End-to-end is reported separately: 78% on a 50-question LongMemEval-S sample, self-judged with the same model. It is not comparable to vendor numbers produced with a gpt-4o judge.
The full methodology, per-category breakdowns, and the reproducible leaderboard live in Benchmark Results and benchmarks/README.md. Raw artifacts are committed under docs/artifacts/.
| Project | Role |
|---|---|
| universal-mcp-toolkit | MCP transport, server registry, and tool routing |
| memos | Graph-based persistent memory across sessions |
| llm-guardian | Token folding, budgets, and provider proxies |
Each project works standalone. The integrations are optional: umt link memos exposes this store as an MCP server, and Guardian can inject a MemOS context pack when MEMOS_NAMESPACE is set. Nothing here requires the other two.
MIT — use it anywhere, for any purpose, no attribution required.