memvid vs xerj
Local search and memory tools for AI agents compared
memvid and xerj are Rust projects that help AI agents retrieve information and retain memory without requiring a separate database service. memvid packages memory and search indexes in a portable file, while xerj indexes local files and serves search through an Elasticsearch-compatible API and MCP server.

memvid: Give AI Agents Portable, Single-File Memory
Memvid is a Rust-based, single-file memory layer for AI agents, designed to replace complex RAG pipelines and server-based vector databases. It packages data and search indexes together, using Tantivy for full-text search and HNSW for vector search.

xerj: Local-First Search for Code and AI Agents
XERJ is a Rust search engine and MCP server for AI agents, combining BM25, vector and hybrid search behind an Elasticsearch-compatible API. It indexes local code and other files for code search, RAG and agent memory, and runs on Linux, macOS and Windows.
| memvid | xerj | |
|---|---|---|
| Language | Rust | Rust |
| License | Apache-2.0 | Apache-2.0 |
| Stars | 17.3k | 13.2k |
| Forks | 1.5k | 947 |
| Last analyzed | Oct 30, 2026 | Oct 23, 2026 |
Key differences
- memvid stores data and search structures together in a single `.mv2` file; xerj indexes folders and serves search through a running binary.
- memvid focuses on portable agent memory and knowledge retrieval; xerj also targets code search, symbol lookup, reference coding, and log and document search.
- memvid offers optional Tantivy full-text and HNSW vector search; xerj provides BM25, vector, and hybrid search, with an offline lexical embedder by default.
- memvid lists CLI, Node.js, and Python SDKs alongside its Rust crate; xerj ships as a single binary for Linux, macOS, and Windows and includes an MCP server.
- memvid is described as quiet recently, with limited issue handling; xerj has high recent commit and release activity but is less than six months old and changing quickly.
- Both projects use Rust and Apache-2.0 licensing; memvid has 17.3k stars and xerj has 13.2k stars.
Choose memvid if you…
- want memory data and indexes packaged in one portable file.
- need to inspect or query earlier memory states using append-only Smart Frames.
- want optional PDF, image, or audio capabilities through feature flags.
Choose xerj if you…
- need local code search with symbols, line locations, and definition lookup.
- want an Elasticsearch-compatible API and MCP tools in one binary.
- need to index mixed files incrementally or search logs and documents alongside code.
Compare the numbers side by side, or add more projects
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.