SuperAPI AI Directory

memvid

Memvid is a single-file memory layer for AI agents, designed to replace complex RAG pipelines and server-based vector databases. It packs data, embeddings, search structures, and metadata into a single .mv2 file, enabling serverless, portable long-term memory and fast retrieval. The project adopts a Smart Frames design inspired by video encoding, supporting append-only writes, timeline backtracking, branching, and compression. Benchmarks show it leads in accuracy on the LoCoMo dataset, with outstanding performance in multi-hop and temporal reasoning, and latency as low as 0.025ms P50. It supports the Rust language, provides local ONNX text embeddings and OpenAI API embeddings, and can handle multimodal data such as text, images, and audio. It is suitable for long-running AI agents, enterprise knowledge bases, offline systems, code understanding, and other scenarios.

Open website

About this tool

Memvid is a single-file memory layer designed for AI agents, providing instant retrieval and long-term memory capabilities. It replaces complex RAG pipelines and server-based vector databases with a serverless, single-file approach, giving agents persistent, versionable, and portable memory.

Key capabilities:

  • Single-file storage: all data, embeddings, search structures, and metadata are packed into a single .mv2 file, with no auxiliary files such as .wal, .lock, or .shm.
  • Smart Frames: inspired by video encoding, memories are organized as an append-only sequence of immutable frames, each containing content, timestamp, checksum, and basic metadata, supporting efficient compression, indexing, and parallel reads.
  • Live memory engine: supports continuously appending, branching, and evolving memory across sessions.
  • Capsule context (.mv2): self-contained, shareable memory capsules that can have rules and expiration times set.
  • Time-travel debugging: can roll back, replay, or branch any memory state.
  • Smart recall: local memory access under 5ms, with predictive caching.
  • Codec intelligence: automatically selects and upgrades compression methods.
  • Model-agnostic, multimodal, and fully offline-capable.

Benchmark performance (based on the LoCoMo dataset, 10 conversations of about 26K tokens each):

  • 35% higher accuracy than other memory systems (SOTA).
  • 76% higher than the industry average on multi-hop reasoning and 56% higher on temporal reasoning.
  • Latency P50 of 0.025ms, P99 of 0.075ms, and 1,372x higher throughput.
  • Benchmarks are fully reproducible, with open-source evaluation using LLM-as-Judge.

Usage:

  • Language support: Rust (1.85.0+).
  • Installation: install Rust via rustup.rs, add the dependency to your project, and enable the required features.
  • Build: supports debug, release, and builds with specified features; tests and integration tests can be run.
  • Examples: the examples/ directory contains examples for creation, writing, search, timeline operations, PDF document ingestion and search, CLIP visual search, Whisper audio transcription, and more.
  • Text embeddings: the vec feature supports local ONNX text embeddings, requiring manual download of model files. BGE-small (384 dimensions) is recommended; BGE-base (768 dimensions), Nomic (768 dimensions), and GTE-large (1024 dimensions) are also supported. Model names can be bound to prevent mixing, and bindings are persisted,A ModelMismatch error is reported when they do not match.
  • API embeddings: the api_embed feature supports generating embeddings via the OpenAI API, and an OpenAI API key must be set.
  • For the file format specification, see MV2_SPEC.md.

Applicable scenarios: Long-running AI agents, enterprise knowledge bases, offline-first AI systems, codebase understanding, customer support agents, workflow automation, sales and marketing copilots, personal knowledge assistants, healthcare/legal/financial agents, auditable and debuggable AI workflows, custom applications.

Limitations and notes:

  • Currently, Rust language support is mainly provided; usage in other languages is not yet available.
  • Local text embeddings require manually downloading model files.
  • Memvid v1 (QR code-based memory) is deprecated, and related references are outdated information.
  • The license is Apache License 2.0.
  • Details such as fees, pricing, and platform support are not yet available.