Self-hosted memory engine

Associative memory for AI agents, modelled on the human mind.

Named for engraphy, the old memory-science term for laying down an engram, the trace a memory leaves in the brain. Engraphy does that for your agents.

91.4% Ahead of Mem0, Mem0-graph and Zep on every LoCoMo category under the published evaluation conventions, across two independent runs. 91.4% on LoCoMo, mean of two independent runs, measured under the same conventions as the published Mem0, Mem0-graph and Zep figures. See the full comparison

Where it runs

Self-hosted, by you

What it needs

Postgres and pgvector

How agents connect

Any MCP client

Install it in your editor, or host the whole engine.

Engraphy is a server you host. Point any MCP client at it. Embeddings run in-process, so there is no API key and no data leaves the box.

The VS Code extension talks to an Engraphy server you run. Self-hosting needs Docker, which is the supported runner: one docker compose up brings up Postgres, pgvector, the migrations and the server.

Engraphy holds everything your agent must remember.

Your agent writes what it learns. Engraphy keeps it clean, findable, and connected over time.

No duplicates

Your agent writes the same fact twice. Engraphy sees the match and stores it once.

Search by meaning

Ask in your own words. Engraphy matches on meaning and on exact terms together.

Linked facts

Engraphy links related memories into a graph. An agent walks from one fact to the next.

Private by space

Engraphy keeps every user, project, and tenant apart. The database enforces the split.

History you keep

A fact changes. Engraphy keeps the old version and links it, so you can trace the change.

Runs on your database

Run Engraphy on Postgres with pgvector. Use your own machine, or your own cloud.

Why it's different

Most agent memory is a pile of text with a search box.

Engraphy works like a database, not a scratchpad. Four things make it different.

Non-destructive dedup

Merge, but never delete

A restatement merges into the memory it repeats. A related but different fact stays its own memory, linked to the first. When a fact changes, the old one is retired and kept, not overwritten.

Universal search

Every fact is findable

Engraphy stores a detail in a typed field, such as a role, a date, or a place. Search still reaches it.

Isolation in the database

Tenants cannot leak

Postgres row-level security separates every space. An agent cannot read a memory from another space.

Supersede, not overwrite

History you can walk

Facts change over time. Engraphy records the new version and keeps the old one linked. You can always ask what was true, and when.

Benchmark

Ahead of Mem0, Mem0-graph and Zep on every LoCoMo category under the published evaluation conventions, across two independent runs.

91.4% on LoCoMo, mean of two independent runs, measured under the same conventions as the published Mem0, Mem0-graph and Zep figures. Mean of two runs, range 91.0 to 91.8. Measured on the seven LoCoMo conversations held out from all tuning.

91.8%

Leads multi-hop

vs 67.1% next-best (Mem0)

92.2%

Leads temporal reasoning

vs 58.1% next-best (Mem0-graph)

LoCoMo accuracy with the adversarial category excluded, under matched conventions. Engraphy 2,104 of 2,302 across both runs, 95% interval 90 to 92, range 91.0 to 91.8. Mean of two independent runs on the seven LoCoMo conversations held out from tuning, graded under the conventions vendored from mem0ai/memory-benchmarks at 4b61c5d. The Zep bar is Zep's own self-reported 75.14%.

By question type, under matched conventions, against Mem0, Mem0-graph and Zep.

Question typeEngraphyMem0Mem0-graphZep
Excluding adversarial91.4%66.9%68.4%75.1%
Single-hop93.3%72.9%75.7%76.6%
Multi-hop91.8%67.1%65.7%61.7%
Temporal reasoning92.2%55.5%58.1%49.3%
Open-domain (n=140)69.3%51.2%47.2%41.4%

Engraphy measured under the published conventions, mean of two runs over seven conversations; comparators as published by Mem0 (arXiv:2504.19413, Table 2), with the Zep overall taken from Zep's own higher self-reported figure of 75.14%. Category columns realigned, see the report. Open-domain is 140 questions pooled across both runs: like-for-like 69.3%, n=140, 95% interval 61 to 76.

Engraphy: runs locomo-settle-a (3 October 2026) and locomo-settle-b (9 October 2026), two independent runs of the same configuration, each re-ingesting from scratch, engine aa7daa2. 1,486 questions per run over the seven LoCoMo conversations held out from all tuning (conv-41, conv-42, conv-43, conv-44, conv-47, conv-48 and conv-50), 1,151 of them non-adversarial. Reader Claude Opus 4.8, judge Claude Sonnet 5. Competitor figures from Chhikara et al., Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory, arXiv:2504.19413, Table 2; the Zep overall of 75.14% from Zep's own published rerun. Full method in the consolidated report, raw artifacts in results/locomo/locomo-settle-a and results/locomo/locomo-settle-b.

75.4%

under Engraphy's own stricter convention, where the system is allowed to say it does not know

Mean of two runs, range 74.8 to 76.0. 1,736 of 2,302, 95% interval 74 to 77. Harder than the convention the published figures use, so this is the conservative figure, not a like-for-like one. Level with Zep's self-reported figure under our stricter convention, ahead of the published Mem0 and Mem0-graph figures.

90.3%

on LoCoMo's adversarial questions, which the system is expected to decline

Mean of two runs, range 89.9 to 90.7. The published comparisons do not report this category.

Methodology, conventions and limits

Two conventions, both reported

Matched convention reproduces the conventions the published Mem0, Mem0-graph and Zep figures were produced under, vendored verbatim from mem0ai/memory-benchmarks at 4b61c5d: the reader must commit to an answer rather than decline, the judge accepts one item of a multi-item gold answer with 14-day date and 50% duration tolerance, adversarial questions are excluded, and each answer is graded once. This is the like-for-like comparison, and the source of 91.4% (2,104 of 2,302 across both runs).

Strict convention is Engraphy's own default and the harder of the two: the reader may say it does not know, the judge requires every item of the gold answer, each answer is graded best of three, and adversarial questions are included and scored. This is the source of 75.4% (1,736 of 2,302 across both runs).

Engraphy's strict convention, by question type

Question typeEngraphyMem0Mem0-graphZep
Excluding adversarial75.4%66.9%68.4%75.1%
Single-hop83.3%72.9%75.7%76.6%
Multi-hop55.9%67.1%65.7%61.7%
Temporal reasoning76.7%55.5%58.1%49.3%
Open-domain (n=140)54.3%51.2%47.2%41.4%
Adversarial, declines correctly90.3%not reportednot reportednot reported

These put Engraphy's harder convention against figures produced under the permissive one, so they understate Engraphy relative to the like-for-like table. Under this convention multi-hop is behind all three. Ahead on single-hop, temporal reasoning and open-domain even under Engraphy's own stricter convention, where the system is allowed to say it does not know.

Why multi-hop differs between the two

Multi-hop gold answers usually list several items. The matched judge accepts one item and the strict judge requires every item, so the same stored memories and the same retrieved context score a mean of 91.8% under one rule and 55.9% under the other. The gap is a property of the grading rule, not of retrieval.

The category alignment

The Mem0 paper's per-category column headers (arXiv:2504.19413, Table 2) do not name the LoCoMo categories they hold. Of the 24 possible assignments of its four columns to LoCoMo's four non-adversarial categories, exactly one reproduces the paper's own published overall for all five systems it reports, to within 0.01: the paper's "Single-Hop" column holds LoCoMo's multi-hop category, "Multi-Hop" holds open-domain, "Open-Domain" holds single-hop, and "Temporal" holds temporal. Every per-category comparison on this page uses that assignment, applied by code in the benchmark repository rather than by hand.

Confidence intervals

95% intervals across both runs: matched, excluding adversarial, 90 to 92; strict, excluding adversarial, 74 to 77. Open-domain is 140 questions pooled across both runs, so it carries the widest interval: matched 69.3%, interval 61 to 76. Under the published conventions every margin is 16 points or more, and each run's own figure, not only the mean, sits above every competitor figure including Zep's self-reported one with its stated error. The intervals cover sampling error; the range across the two runs covers run-to-run variation. Run-to-run spread is under 1.3 points on both conventions, across two runs that each re-ingested the corpus from scratch.

How the setup differs from the published figures

Sample: 7 of LoCoMo's 10 conversations, the ones held out from tuning. The published figures cover all 10.

Runs: two independent runs, each re-ingesting the corpus from scratch. Mem0's published figure is the mean of 10.

Models: Claude Opus 4.8 reader, Claude Sonnet 5 judge. The published figures use a GPT-4o-mini reader. A reader model is part of any memory system's measured result, and neither side's figure isolates retrieval from reading.

Context budget: Engraphy competes with at most 25 memories in context, where the matched convention permits 200.

The like-for-like figure is raw: the confabulation controls that bounded the earlier three-conversation figure have not been rerun for these runs.

The Zep figure

Mem0 published 65.99% for Zep; Zep self-reports 75.14%. The higher figure is used throughout.

Mem0's 92.5%

Mem0's research page (mem0.ai/research) reports 92.5%. It states no retrieval budget, answerer or judge model, judge prompt or run count, so it is not used as a comparator.

Reproducing every figure

Verify it yourself: the public benchmark repository holds the per-question results for both runs, and every number recomputes from them with python scripts/consolidate.py results/locomo/locomo-settle-a results/locomo/locomo-settle-b. The consolidated report carries the full method and the derivation of the category alignment, and each run's PROVENANCE.md (settle-a, settle-b) records the engine commit, dataset hash, models and prompt hashes.

Contradictions merge, and the merge says so

A negation sits close in meaning to the fact it overturns, so it scores above the merge threshold and is absorbed into it. Measured at 28 of 36 pairs in our own contradiction set. The merge result names what it merged into, so the caller can repair it with supersede. The engine will not guess, because agreement is a judgment call and no model runs inside the engine.

A near-verbatim restatement can lose its text

If an incoming body overlaps the stored one at a Jaccard of 0.8 or above, it is not added as an addendum. You get addendum_added: false. Nothing is deleted, and not everything written is kept as new text.

Ranking, and how far time travel goes

The cross-encoder slot is specified and stays disabled until there is evidence it earns its cost, so ranking today is reciprocal rank fusion. Facts are retired and linked rather than overwritten, so history is walkable; full bi-temporal querying is not built.

Dataset licence

LoCoMo is published under CC BY-NC 4.0 by Maharana et al. Engraphy is not sold, so this use is non-commercial.

Accuracy measures one axis. The difference worth reading is what a memory store can do at all, next to a plain append-and-search store.

Engraphy against a typical append-and-search memory

CapabilityAppend and searchEngraphy
Duplicate handlingOn read, if at allOn write, before the row exists
The ambiguous caseGuessed, silentlyHanded back to the caller
SchemaApplication-side, if at allEnforced in Postgres
Tenant isolationA WHERE clauseRow-level security
Superseded factsOverwritten or duplicatedRetired, linked, still walkable
Worst-case readThe whole store25 capped nodes
ContradictionsAbsorbed silentlyAbsorbed, and the merge names what it hit

Against named systems rather than a shape: Engraphy compared to Mem0, Zep, Letta, Cognee and the reference MCP memory server. Each page says where the other one wins.

How it works, in two paths.

Writes check for duplicates before they land. Reads fuse two searches into one ranked result.

The write pathCheck before it lands

Writetitle, body, fields
→
Embedand index
→
Decidemerge, hold, insert

Engraphy compares each write against what it already holds. A clear duplicate merges. A clear new fact inserts. The uncertain middle is parked for a decision rather than guessed at.

The read pathTwo searches, one result

Meaningvector
+
Keywordsfull-text
→
Fuse and rankgraph on top

Semantic search and keyword search run together. Engraphy fuses them into one ranked list and removes duplicates. You can follow the graph out from any hit for more context.

Running in a few minutes.

Self-hosting runs on Docker. One command brings up Postgres, migrates the schema, and starts the server.

1
Get the code and set two secrets
git clone https://github.com/EngraphyLabs/engraphy.git && cd engraphy

# .env is git-ignored; these two passwords are all it needs
cp deploy/.env.example .env   # then edit it, or generate them:
printf 'POSTGRES_PASSWORD=%s\nENGRAPHY_APP_ROLE_PASSWORD=%s\n' \
  "$(openssl rand -hex 16)" "$(openssl rand -hex 16)" > .env
2
Bring the whole stack up
docker compose up -d

# Postgres + pgvector, then migrations, the app role, and the server.
→ MCP on http://127.0.0.1:8000/mcp/ (first run builds the images; the embedding model ships inside them)
3
Create a space, apply a pack, mint a token
docker compose --profile admin run --rm admin \
  engraphy-admin space create --id personal --display-name "My Memory" --principal me

docker compose --profile admin run --rm admin \
  engraphy-admin pack apply packs/starter/pack.yaml --space personal

docker compose --profile admin run --rm admin \
  engraphy-admin token create --space personal --principal me \
    --client-name my-editor --role readwrite
→ the bearer token prints once; paste it into your MCP client

See the full walkthrough in the developer docs: setup, building a pack, the tool reference, and deployment.