Open source · Apache-2.0 · MCP-native

Your agent forgets everything.
Memry doesn't.

The self-hostable memory layer for AI agents. One pip install, one SQLite file, plugged into Claude Code, Cursor, or any MCP client - extraction, reconciliation, and an audit trail your agents can trust.

$ pip install memry && memry mcp
zero serviceszero API keys requiredyour infrastructure
~/.memry/memry.db
14:02:11episode"I'm Ada, data engineer at Northwind in Munich"
14:02:12ADDUser works at Northwind as a data engineer
14:02:12ADDUser lives in Munich
14:02:12NONEduplicate skipped · "prefers uv over pip"
09:17:40episode"big news - I moved to Amsterdam last month"
09:17:41SUPERSEDEUser lives in Munich · kept in history
09:17:41ADDUser lives in Amsterdam ← superseded_by
09:20:03recall"where does ada live" → Amsterdam (0.3 ms)

Get started

Two minutes from install to remembering.

01 · INSTALL

One package

pip install memry (or straight from source: pip install git+https://github.com/cosmin-novac/memry.git). Python 3.11+, no other services.

02 · CONNECT

Plug into your agent

Claude Code: claude mcp add memry -- memry mcp. Claude Desktop, Cursor, Windsurf: add the memry mcp command to your MCP config.

03 · UPGRADE

Optional brain

Works with zero keys (verbatim + keyword search). Set ANTHROPIC_API_KEY or OPENAI_API_KEY and extraction, reconciliation, and entity resolution switch on by themselves.

04 · USE

Just talk

Tell your agent something worth keeping, then ask about it in a fresh session. Inspect anytime: memry list, memry entities proposals, or the dashboard via memry serve.

How it works

Real memory, not a vector dump.

Most "memory" is retrieval over raw chat logs. Memry keeps the raw episodes and distills them into reconciled, contradiction-aware facts - so your agent recalls what's true now, with the receipts for how it got there.

01 · RECORD

Episodes first

Every message is stored immutably before anything is derived. Memories are an index; episodes are the source of truth.

02 · EXTRACT

Facts, not transcripts

An LLM distills self-contained facts with type, importance, and entities. No LLM key? Verbatim mode still works.

03 · RECONCILE

Supersede, don't delete

Duplicates are skipped, refinements merge, contradictions invalidate the old memory and link its successor. Bi-temporal, fully audited.

04 · RECALL

Explainable retrieval

BM25 + vectors fused by reciprocal rank, boosted by recency and importance. Every result shows its score signals.

Features

Everything a memory layer should have. Nothing you have to operate.

MCP-native

Eight tools over stdio or streamable HTTP. Claude Code, Claude Desktop, Cursor, Windsurf, Codex - one server, every agent, shared memory.

One SQLite file

Episodes, memories, FTS5 index, embeddings, and events in a single file. Back it up with cp. No vector DB, no Postgres, no cloud.

Works with zero keys

BM25 keyword search plus deterministic hash embeddings out of the box. Add ANTHROPIC_API_KEY or OPENAI_API_KEY and extraction upgrades itself.

Temporal memory

valid_from · invalid_at · superseded_by on every fact. "Forgotten" means invalidated and auditable - never silently destroyed.

Provenance & history

Every memory links to the exact episodes it came from, and every mutation is an event you can replay with history().

Forgetting built in

Importance decays on a half-life; a sweep soft-forgets stale trivia so ten-month-old noise stops crowding out what matters.

Scoped & multi-agent

user / agent / run scoping, mem0-compatible. Point several agents at one server and they share what they learn.

Pluggable everything

Anthropic, OpenAI, or Ollama for extraction; OpenAI, Voyage, Ollama, or local hashing for embeddings; swappable storage backends - including a Mem0 adapter.

Entities, disambiguated

Three ambiguous "Jonas" mentions stay three entities. Merges happen only when identity is clear, or when you confirm a recorded merge proposal.

Scales when you need it

Optional HNSW vector index (memry[ann]) and a PostgreSQL + pgvector backend (memry[postgres]) for multi-writer fleets.

Multi-tenant ready

Per-tenant API keys with transparent namespacing and strict isolation, plus category filters on every search surface.

Benchmark it yourself

A built-in eval harness (recall@k, MRR, latency) runs offline in CI. Format LoCoMo or LongMemEval into JSONL and compare configs honestly.

Two ways in

An MCP server for agents. A Python API for you.

any MCP client

{
  "mcpServers": {
    "memry": {
      "command": "memry",
      "args": ["mcp"]
    }
  }
}
# or for Claude Code:
$ claude mcp add memry -- memry mcp

python

from memry import MemoryStore

store = MemoryStore()
store.add("I'm Ada. I moved to Amsterdam.",
          user_id="ada")

hits = store.search("where does ada live?",
                    user_id="ada")
ctx = store.reconstruct_context(
    "plan my commute", user_id="ada",
    token_budget=1200)   # drop into any prompt

Compare

Honest comparison, self-hosted editions.

MemryMem0 OSSZepRecall MCP
LLM extraction + reconciliationyesyesyes-
Temporal invalidation (supersede, not delete)yesplatform onlyyes-
Provenance: fact → source episodeyespartialyes-
Hybrid retrieval (BM25 + vector + recency)yesyesgraphyes
Memory decay / forgettingyesplatform onlyretentionyes
Works with zero API keysyesnonoyes
Runs without extra servicesSQLite onlyneeds vector DBBYOCSQLite
Built-in eval harnessyes---
LicenseApache-2.0Apache-2.0proprietaryopen source

Feature availability as of July 2026, self-hosted/OSS editions; see docs/research/competitive-analysis.md in the repo for sources.

Self-host

Your agents. Your memories. Your infrastructure.

Memory is the most personal data an agent touches. Memry keeps it in a file you own, on a machine you control, under a license that can't be revoked.

  • REST API + dashboard + MCP endpoint in one process
  • Bearer-token auth with MEMRY_API_KEY
  • Backup = copy one file (or memry export)
  • Fully offline with Ollama, or fully keyless
# bare metal
$ pip install memry
$ memry serve --host 0.0.0.0 --port 8787
→ dashboard  http://localhost:8787/
→ REST API   http://localhost:8787/api/v1
→ MCP        http://localhost:8787/mcp

# or docker
$ docker compose up -d

Research-grade

Built to be studied, not just used.

Memry doubles as a memory-systems research codebase: raw episodes are never thrown away, so better extraction pipelines can be replayed over history; every ranking signal is exposed; and the eval harness compares providers, weights, and even competing backends (a Mem0 adapter ships in the box) under identical conditions. Hierarchical compression, belief revision, and memory-type routing are on the open roadmap - contributions welcome.