Memvid Portable Agent Memory
A portable single-file memory layer that gives AI agents persistent storage, fast retrieval, and rewindable history.
- Source repo
- memvid/memvid
- Stars
- ★ 17k
- Last updated
- 4mo ago v2.0.140
- FARS reviewed
- Nov 08, 2026
- License
- Apache-2.0
- Primary language
- Rust
- FA score
- 51/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformOpenAI API
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Developers building long-running assistants that must retain user facts and conversation context across sessions while keeping memory portable.
- Not a fit if
- Teams wanting vector search that works out of the box without manually downloading ONNX and tokenizer files
- Teams that cannot use a Rust 1.85.0+ toolchain
- Website
- memvid.com ↗ set on GitHub
- Maintenance
- Commits in the last 6 monthslast commit 2026-07-14latest release v2.0.140 (2026-05-27)+1.4 ★/day over 7 days
- Source review
- 51/100 · Major gaps
What does this agent do, and when should you use it?
Memvid is a Rust-based memory system that packages content, embeddings, search structures, and metadata into one .mv2 file. It stores memory as append-only Smart Frames containing immutable content, timestamps, checksums, and basic metadata, with an embedded WAL for crash recovery. Optional features cover Tantivy BM25 search, HNSW vector search, local ONNX text embeddings, CLIP image retrieval, Whisper transcription, PDF extraction, temporal parsing, and encrypted capsules. Developers can integrate it through a Rust crate, Node.js SDK, Python SDK, or CLI; its core is model-agnostic and can operate fully offline. It is a practical fit for teams seeking a local, portable alternative to server-hosted vector databases and multi-component RAG infrastructure, provided they can manage the feature flags, model files, and compute required by their chosen retrieval modes.
An application creates a .mv2 file with Memvid::create, writes content and metadata such as titles, URIs, and tags through put_bytes_with_options, and persists the update with commit. The file stores compressed frames, an embedded WAL, a table of contents, and optional lexical, vector, and chronological indexes; existing frames remain immutable while new memory is appended. A client submits a SearchRequest to mem.search and receives hits containing titles, text, and snippets. The lex feature supplies Tantivy BM25 search, while vec adds HNSW search with local ONNX text embeddings and api_embed can call OpenAI's embedding API. The clip, whisper, and pdf_extract features add image retrieval, audio transcription, and PDF text extraction respectively. Its timeline model also supports querying earlier memory states and rewinding, replaying, or branching memory.
- Developers building long-running assistants that must retain user facts and conversation context across sessions while keeping memory portable.
- Teams deploying searchable knowledge bases on edge devices or isolated systems where a remote database is unavailable.
- Engineering groups indexing source code and technical documents for lexical or semantic codebase exploration.
- Customer-support, sales, or workflow-automation teams that need to accumulate operational context and retrieve relevant history quickly.
- Medical, legal, or financial workflow designers who need immutable records and historical-state inspection for auditable memory behavior.
- Applications ingesting PDFs, images, or audio that can provision the corresponding extraction, CLIP, or Whisper features and models.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm install -g memvid-clinpm install @memvid/sdkpip install memvid-sdk
- Environment variables
OPENAI_API_KEY- Config files
Cargo.toml~/.cache/memvid/text-models~/.cache/memvid/text-models/bge-small-en-v1.5.onnx~/.cache/memvid/text-models/bge-small-en-v1.5_tokenizer.json- Runtime
- Rust 1.85.0
How do you install or deploy this agent?
The Rust core requires Rust 1.85.0 or newer. Add the base crate to Cargo.toml:
[dependencies]
memvid-core = "2.0"Enable full-text search, vector retrieval, and temporal parsing when required:
[dependencies]
memvid-core = { version = "2.0", features = ["lex", "vec", "temporal_track"] }To build the repository itself:
git clone https://github.com/memvid/memvid.git
cd memvid
cargo build --releaseOther documented distribution options are:
npm install -g memvid-cli
npm install @memvid/sdk
pip install memvid-sdk
cargo add memvid-coreBefore using the default local BGE-small model with vec, download its ONNX model and tokenizer:
mkdir -p ~/.cache/memvid/text-models
curl -L 'https://huggingface.co/BAAI/bge-small-en-v1.5/resolve/main/onnx/model.onnx' \
-o ~/.cache/memvid/text-models/bge-small-en-v1.5.onnx
curl -L 'https://huggingface.co/BAAI/bge-small-en-v1.5/resolve/main/tokenizer.json' \
-o ~/.cache/memvid/text-models/bge-small-en-v1.5_tokenizer.jsonCredentials are needed only for the optional OpenAI embedding path:
export OPENAI_API_KEY="sk-..."How do you use this agent?
This Rust example creates a memory file, writes and commits one metadata-bearing document, then searches it:
use memvid_core::{Memvid, PutOptions, SearchRequest};
fn main() -> memvid_core::Result<()> {
let mut mem = Memvid::create("knowledge.mv2")?;
let opts = PutOptions::builder()
.title("Meeting Notes")
.uri("mv2://meetings/2024-01-15")
.tag("project", "alpha")
.build();
mem.put_bytes_with_options(b"Q4 planning discussion...", opts)?;
mem.commit()?;
let response = mem.search(SearchRequest {
query: "planning".into(),
top_k: 10,
snippet_chars: 200,
..Default::default()
})?;
for hit in response.hits {
println!("{}: {}", hit.title.unwrap_or_default(), hit.text);
}
Ok(())
}When using local embeddings, bind the index to its model to prevent accidental model mixing:
mem.set_vec_model("bge-small-en-v1.5")?;The repository's documented examples can be launched directly:
cargo run --example basic_usage
cargo run --example pdf_ingestion
cargo run --example clip_visual_search --features clip
cargo run --example test_whisper --features whisper -- /path/to/audio.mp3Run the test suite with:
cargo testSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Content, metadata, the WAL, and multiple indexes live in one
.mv2file, with no.wal,.lock,.shm, or other sidecar files to coordinate. - The core is model-agnostic and exposes Rust, Node.js, Python, and CLI entry points; local ONNX embeddings support offline operation.
- Append-only immutable Smart Frames provide crash-safety properties, historical-state queries, and memory rewind or branching.
- Retrieval modes are composable across Tantivy/BM25 text search, HNSW vectors, temporal indexing, and optional PDF, image, and audio processing.
- Persistent vector-model binding detects incompatible query and index models with a
ModelMismatcherror.
- The core requires Rust 1.85.0 or newer, and teams must maintain whichever SDK or CLI integration they choose.
- Local vector search does not bundle its text models; operators must download ONNX and tokenizer files manually, with documented model sizes ranging from about 120 MB to 1.3 GB.
- Advanced functions require feature selection and extra resources such as CLIP, Whisper, Tantivy, HNSW, or the OpenAI API, increasing deployment complexity.
- The OpenAI embedding option requires network access and an
OPENAI_API_KEY, giving up the fully offline property. - The source reports latency and LoCoMo accuracy results but does not establish capacity-planning limits for a reader's specific hardware, dataset, or workload.
How does this agent compare with similar options?
Compared with a server-hosted vector database plus a multi-service RAG pipeline, Memvid colocates data, embeddings, indexes, and metadata in one local .mv2 file, reducing persistent services and sidecar files. That favors portable, offline, and history-aware applications; teams needing centrally managed multi-user database operations, independently scaled services, or a ready-made hosted platform would need to supply and evaluate that surrounding architecture themselves.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Memvid Portable Agent Memory This agent | 51 · Major gaps | Library / SDKFree + model costs | ★ 17k | 4mo ago | Rust | OpenAI API |
| MetaClaw | 49 · Major gaps | CLIFree + model costs | ★ 3.5k | 5mo ago | Python | Codex · Claude Code · OpenAI API · Claude API |
| SimpleMem: Efficient Lifelong Memory for LLM Agents | 47 · Major gaps | Library / SDKFree + model costs | ★ 3.9k | 4mo ago | Python | ChatGPT · Claude Code |
| Controllable Complex RAG | 46 · Major gaps | Library / SDKFree + model costs | ★ 1.6k | 1mo ago | Jupyter Notebook | OpenAI API |
How does FollowAgents rate this agent?
Why each dimension lost points
The code and documentation describe a local single-file library with optional features for API embeddings, encryption, and multimodal capabilities. The README says cloud embeddings require an API key and lists encryption, checksums, and signatures, supporting partial credit for least privilege, data-flow transparency, and sensitive-data handling. The materials do not describe user confirmation for writes or deletions; encryption is optional and security guidance is broad. Cargo.toml lists dependencies but provides no audit or vulnerability-mitigation evidence. WAL and immutable frames support some recovery claims, while rollback guidance is limited. A repository name and contact emails are visible, but publisher identity remains unknown and maintenance ownership is unclear.
README and CLAUDE.md broadly agree on the single-file format, WAL, core API, and features, but the README's no-sidecar claim cannot be fully checked against the partial source excerpt. Cargo.toml specifies a Rust version and optional dependencies; the README gives installation and build commands, while models may need manual downloads and some features rely on external models or APIs. The source excerpt exports a Result type and SECURITY.md describes a reporting process, but the packet offers little detail about error conditions, user-facing diagnostics, or recovery instructions.
The README covers long-running agents, offline systems, and knowledge bases, and lists CLI, Node, Python, and Rust interfaces; the supplied implementation and setup instructions focus mainly on Rust. Feature flags describe boundaries for local vector search, cloud embeddings, audio, images, and encryption. Use cases are broad, with little guidance on when to choose Memvid or when it is unsuitable. The Rust version requirement, optional features, and model-download notes provide some environment-fit guidance.
The README organizes concepts, installation, quick start, features, and file format; CLAUDE.md is contributor and coding-assistant guidance rather than product instructions for an Agent. Rust installation, features, examples, and test commands are fairly specific, and the LICENSE file clearly identifies Apache-2.0. The crate version is explicit, but no changelog is included. The README lists several language SDKs while the installation section focuses on Rust; limitations are mentioned only in scattered notes about an optional extractor on Windows ARM/WSL2, external models, and v1 deprecation. Security and support emails are present, but maintenance responsibility and update commitments are not established.
Examples show file creation, writing, committing, and retrieval, while the documentation describes retrieval and media features. Single-file persistence, indexing, and offline use may provide useful integration value, but performance and benchmark advantages are assertions in the README without supporting benchmark data or detailed evaluation methods in this packet. Model downloads, feature selection, and API configuration add costs whose tradeoffs are not explained in depth.
There is partial traceability between README setup examples, Cargo.toml features and dependencies, public modules in lib.rs, and security statements in SECURITY.md. The CI file specifies build, test, formatting, and lint steps, but this static review cannot establish that they ran or passed. The README's performance and accuracy claims lack independent support in the supplied material. Documentation distinguishes local and API embeddings, optional features, and model requirements, but the marketing claims provide too little method, scope, and limitation detail for strong verification.
- Performance, accuracy, and benchmark advantages are mainly asserted in the README; this static review did not run the code or independently validate those results.
- For sensitive memories, note that encryption must be enabled explicitly and the README recommends setting file permissions. Cloud embeddings use the OpenAI API, so assess the data-handling boundary before sending content.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Bug fixes #230 — WAL checksum mismatch after region growth Sustained put + commit workloads that grew the embedded WAL could corrupt it, surfacing as Embedded WAL is corrupted at offset N: wal record checksum mismatch (and, in some reports, runaway sparse-file growth past EOF). grow_wal_region / ensure_wal_capacity shifted the data region right by delta and updated data_end/footer_offset, but left cached_payload_end stale. rebuild_indexes then seeked to that pre-growth offset — now inside the grown WAL region — and overwrote live WAL record payloads. `cached_payloa …View on GitHub ↗ -
Release notes excerpt
v2.0.139 Release Date: March 13, 2026 Overview This release completes the fix for MV005 (Time index track is invalid: frame id out of range) by extending graceful stale frame_id handling to all search paths — find(), ask(), Tantivy, lex fallback, vec search, and temporal metadata lookups. --- 🐛 Bug Fixes MV005 crash in find() and ask() search paths — Issue #196 (continued) - v2.0.138 fixed the timeline.rs path only; stale frame_ids in Tantivy evaluation, snippet assembly, lex fallback, and temporal metadata lookups still caused hard crashes …View on GitHub ↗ -
Release notes excerpt
v2.0.138 Release Date: March 3, 2026 Overview This release fixes two SDK issues: lex_enabled/vec_enabled state not persisting after re-opening .mv2 files, and ask() crashing with "frame id out of range" on files with inconsistent time indexes. --- 🐛 Bug Fixes lex_enabled/vec_enabled reset to None on re-open — Issue #194 - Added lex_enabled and vec_enabled fields to the core Stats struct so SDKs can read runtime search engine state …View on GitHub ↗
FAQ
Does Memvid require internet access or OpenAI?
api_embed integration with OpenAI.What persistent files does it create?
.mv2 file. The documented format does not create .wal, .lock, .shm, or other sidecars.How does it prevent mismatched embedding models?
mem.set_vec_model("bge-small-en-v1.5") to persistently bind the index to a model name. Later attempts to use a different model fail with ModelMismatch.What protects data during an interrupted write?
Which non-text inputs can it process?
pdf_extract extracts PDF text, clip supports image-search embeddings, and whisper transcribes audio.Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.