XERJ vs memvid: one memory file or one local server?
XERJ or memvid? memvid keeps memory in one portable file with almost no dependencies and answered queries in 0.3 ms. In our test its default lexical search found 1 of 75 answers, because full questions must match every word. XERJ found 73.3% with BM25 and 94.7% with semantic recall.
Key number: memvid packages data, embeddings, search structure and metadata into a single .mv2 file. Its lex feature is full-text search with BM25 ranking through Tantivy. (as of 2026-10-31 · source: github.com/memvid/memvid)
TL;DR memvid stores agent memory in one portable .mv2 file. XERJ runs memory as a local server you call over HTTP or MCP. memvid's queries were the fastest we measured. But its default search needs every word of a question to match, so natural questions mostly came back empty.
One file vs one server
A single .mv2 file
Data, search index and metadata live in one portable file. You open it from your code with the SDK. Lexical search is BM25 through Tantivy. Vector search is a build feature.
A local search server
One binary serves memory over HTTP and MCP, next to logs, docs and code. BM25 by default. Semantic and hybrid recall in neural mode, with MiniLM built in.
Act as a coding agent. Read https://xerj.org/llms.txt, install XERJ, start a local node with --embed-mode neural, store five facts about this project with POST /_memory/project, then recall each one twice, once with key words and once as a full question, using hybrid recall, and tell me which recalls missed.
curl -fsSL https://xerj.org/get | sh
Install the single XERJ binary.
xerj --embed-mode neural
Start a local node with the built-in MiniLM embedder.
curl -s -XPOST 'http://127.0.0.1:9200/_memory/project/_recall' -H 'content-type: application/json' -d '{"query":"What is the main database for this project?","hybrid":true,"k":5}'
A full question works: hybrid recall ranks by any shared word and by meaning.
Tested side by side
Same 85 memories, same 75 questions. Top 5 is the share of questions where the right memory came back in the first five.
| memvid-sdk 2.0.160 | XERJ v1.0.0-rc.100 | |
|---|---|---|
| Top 5, default settings | 1.3% (lexical) | 73.3% (BM25) |
| Top 5, questions that reuse the memory's words | 4% | 100% |
| Top 5, semantic with MiniLM | Not tested | 94.7% |
| New value first, changed facts | 0% | 13.3%; 93.3% with recency weight |
| Median write | 67.3 ms | 11.3 ms |
| Median query | 0.3 ms | 3.8 ms |
| LLM calls per write | 0 | 0 |
| What you install | 2 Python packages | One binary |
| Storage | One .mv2 file | Index per namespace on a local node |
| License | Apache 2.0 | Apache 2.0 |
Why full questions missed
Type a question or pick one. The left side keeps only lines that hold every word. The right side ranks any shared word, like BM25 in XERJ.
Why a full question can find nothing
Four stored memories:
- The main database for Lark is PostgreSQL 16.
- The Lark API listens on port 8443 in production.
- Dana prefers pnpm over npm for JavaScript projects.
- Error tracking for Lark goes to Sentry.
With JavaScript off, here is what memvid-sdk 2.0.160 returned on our 85 memories:
- "What is the main database for Lark?": no hits
- "main database Lark": 1 hit, the PostgreSQL memory
- "What port does the Lark API listen on in production?": no hits
- "Lark API port": 2 hits
If you use memvid, search with key words, not full questions, or strip question words first.
When to pick memvid
- You want memory as one file you can copy, ship or attach.
- You want no server process at all.
- Your agent searches with key words it knows are in the memory.
- You want the smallest install.
When to pick XERJ
- Your agent asks in full sentences or in other words.
- You want semantic or hybrid recall with no extra setup.
- You want memory next to your logs, docs and code search.
- Several agents need the same memory over HTTP or MCP.
Limits on the XERJ side
- XERJ queries were slower than memvid's in this test.
- XERJ is a server, not a file you can pass around.
- XERJ runs on one node with no replication.
See the full AI agent memory benchmark for all seven projects.
Try it with XERJ
Use the Copy the prompt button and paste it into your coding agent. It stores five facts and checks both key word and full question recall.
Sources checked
All checked on 2026-10-31.
- memvid: README in memvid/memvid, commit e6bd9f7b. memvid-sdk 2.0.160 from PyPI. License Apache 2.0 from the GitHub API.
- Test runs, the all words probe and per question results: benchmarks/agent-memory.
FAQ
Why did memvid score so low?
Our questions are full sentences. memvid's lexical search returned nothing when a question held words that were not in the memory. The same key words with no question words did find the memory. We recorded both in a probe.
Is that a fair test of memvid?
It is a fair test of its default lexical search on natural questions, the same ones every system got. It is not a test of memvid's vector search, which we could not get working in the PyPI package.
Why was vector search not tested?
In memvid-sdk 2.0.160 the local embedding option returned error MV015, and a custom embedder stored no vectors, error MV011. So we report only lexical search.
Where does memvid win?
Queries took 0.3 ms median, the fastest in our test, and the SDK installs only 2 Python packages. The whole memory is one file you can copy.
Where does XERJ win?
Recall on natural questions, semantic and hybrid search with a built-in model, and writes: 11.3 ms median for XERJ BM25 against 67.3 ms for memvid.
Evidence
- Top 5: memvid lexical 1.3%, XERJ BM25 73.3%, XERJ semantic 94.7%. Same-words questions top 5: memvid 4%, XERJ 100%. New value first: memvid 0%, XERJ 13.3%, XERJ with recency weight 93.3%. —
benchmarks/agent-memory/out/summary.csv - memvid lexical find() returned nothing for full questions and found the memory for the same key words. —
benchmarks/agent-memory/probes/memvid_and_probe.json
Related
- AI agent memory compared: real tests on 7 open-source projects
- XERJ vs mcp-memory-service: two MCP memory servers, tested
- XERJ vs ReMe (Alibaba Tongyi Lab): a tested comparison
- XERJ vs Mem0: which memory fits your AI agent?
- BM25 vs vector search: which one should you use?
- What's a simple way to give an agent long-term memory on my laptop without Qdrant?
- XERJ vs agentmemory: which memory for your coding agent? · same intent: agent memory
- XERJ vs agent memory tools: Mem0, Zep, Letta and Cognee · same intent: agent memory
- Should agent memory use a knowledge graph? · same intent: agent memory