Skip to main content
One of Memvid’s core innovations is the Smart Frame, a storage primitive inspired by how video files encode information. Just as videos are composed of sequential frames that can be played, randomly seeked, or edited, without rewriting the entire file, Memvid represents AI data as an append-only sequence of semantic frames. Each frame captures meaning at a point in time, enabling efficient retrieval, temporal navigation, and incremental growth without destructive updates.

The Early Insight

Memvid was born from a real internal problem. While our team was building agentic systems for the healthcare industry, we ran into a foundational challenge: memory. We were responsible for building AI agents that could screen applicants and adapt to the unique, high-stakes requirements of healthcare staffing, reasoning over long histories of candidates, roles, facility requirements, and constantly changing constraints. The dataset wasn’t just large, it was mission-critical and evolving fast.

The Problem We Faced

For an AI agent to be useful in real-world staffing workflows, it needed to reliably remember people, conversations, decisions, and constraints over long periods of time. When someone asked:
  • “What roles has this candidate applied for in the past six months?”
  • “Have they worked night shifts before?”
  • “What requirements did this facility specify last week?”
The answer had to be exact. Not a summary. Not a best guess. Not a hallucination. That requirement exposed hard limits in existing AI memory systems. No matter which approach we tried, we ran into the same failures: On top of that, the data itself was extremely sensitive. We needed memory that could run fully on-prem, work offline, remain portable across devices, and avoid centralized infrastructure entirely. Traditional RAG pipelines weren’t just complex and expensive, they were security liabilities. None of the existing approaches met the bar.

What We Actually Needed

We needed a system that could:
  • Store unbounded, growing histories
  • Recall exact information, not semantic guesses
  • Support real-time writes as new data arrived
  • Run fully offline and on-prem
  • Be portable and self-contained
  • Minimize attack surface and infrastructure complexity
So we stepped back and asked a different question.

The Video Insight

What existing technology already handles massive, sequential data with random access, efficient compression, and decades of battle-tested reliability?
The answer was video. A two-hour film contains millions of frames, yet you can jump to any moment instantly. The file is self-contained: no database, no server, no external dependencies. Corrupted frames don’t invalidate the entire file. And decades of optimization have made video codecs extraordinarily efficient. Real-world AI memory has the same shape. Information accumulates over time. Events are sequential. You need to jump to specific moments while preserving the full historical timeline. Memory must be incrementally writable, crash-safe, and portable across machines. Video codecs have spent 40+ years solving exactly these problems:
  • Sequential data with random access: jump to any frame instantly
  • Efficient compression: 100x compression ratios via redundancy exploitation
  • Self-contained files: No external dependencies or infrastructure required
  • Crash recovery: Corrupted frames are localized, not catastrophic
  • Streaming support: Start processing data before the full file loads

From Video to Memory

So we tried something unconventional: Storing embeddings inside frames. Each interaction becomes a frame. Each applicant update, requirement change, or decision is a frame. String them together, index them properly, and you get operational memory that an AI system can query with exact, deterministic recall. That insight evolved into Memvid. We shipped it in production. It worked. And we quickly realized this wasn’t just a healthcare problem, every serious AI application faces the same challenge. So we open-sourced the solution.

Why Smart Frames as Storage Units?

Traditional systems treat documents as isolated objects. Memvid treats information as frames in a continuous, evolving knowledge stream. That difference changes everything.

The Problem with Document-Centric Storage

When documents are stored as separate objects:
  • No inherent ordering: When was doc 3 added relative to doc 1?
  • No context continuity: What was the state of knowledge at time T?
  • Fragmented storage: Metadata, vectors, and content in different places
  • Sync complexity: Keeping everything consistent is error-prone

The Frame Solution

Frames provide:

How It Works:

Here’s exactly how Memvid processes and stores your content. No black boxes.

Step 1: Frame Creation

When you call put(), Memvid creates a frame structure:

Header

  • Frame ID: 42
  • Timestamp: 1704067200
  • URI: mv2://docs/meeting-notes
  • Checksum: sha256:a1b2c3...

Metadata

  • Title: “Q4 Meeting Notes”
  • Labels: ["meeting", "q4"]
  • Track: “notes”
  • Custom: { author: "alice" }

Payload

zstd-compressed content bytes

Embeddings (optional)

384-dim vector, quantized to int8 - only if semantic search is needed

Step 2: Index Updates

After frame creation, multiple indexes are updated atomically:

Step 3: WAL Commit

Before returning success, the frame is committed to the Write-Ahead Log: If the process crashes mid-write, the WAL ensures:
  • Committed frames are recovered on next open
  • Incomplete frames are discarded cleanly
  • No corruption propagates to existing data

Step 4: Segment Compaction

Periodically, frames are grouped into segments for storage efficiency:

Traditional VectorDB: How They Store Context

To understand why frames matter, let’s see how traditional vector databases handle the same data:

The Traditional VectorDB Architecture

Problems with This Approach

What Traditional VectorDBs Actually Store

When you insert a document into Pinecone, Weaviate, or ChromaDB:
The vector is stored. Maybe some metadata. But:
  • Original content? Often discarded or stored separately
  • Temporal context? Not tracked
  • Relationship to other docs? Only through vector similarity
  • History? Non-existent

What Memvid Frames Store


Performance Benefits of Frame Architecture

The frame architecture isn’t just conceptually cleaner. It’s faster.

Why Frames Are Fast

1. Locality of Reference

Traditional systems scatter data across storage layers. Frames keep related data together:

Traditional: 3 Round Trips

  1. Query vector index (network)
  2. Fetch metadata (different server)
  3. Retrieve document (blob storage)

Memvid: 1 Seek

  1. Seek to frame offset in .mv2 file (all data co-located)

2. Segment-Based Caching

Frames group into segments that cache efficiently:
1

Time Index Lookup

Time index identifies Segment 3 contains Q4 frames
2

Single Read

Load Segment 3 into memory (one I/O operation)
3

Cache Ready

All Q4 frames now cached, subsequent queries are instant

3. Compression Efficiency

Similar frames compress dramatically when stored together: This happens because:
  • Sequential frames often share vocabulary (Zstd dictionary)
  • Embeddings quantize to int8 (75% vector size reduction)
  • Metadata schemas are consistent within segments

4. Index Co-location

All indexes live in the same file, enabling compound queries without joins:

Benchmark: Frame vs Traditional

Real-world comparison on 1M document corpus:
Why so fast? Memvid doesn’t need network calls, distributed coordination, or multi-system consistency. It’s just reading from a well-organized file.

Frame Lifecycle

Creation

When you add content, Memvid:
  1. Generates a unique frame ID
  2. Extracts and indexes text content
  3. Computes embeddings (if enabled)
  4. Records timestamp in the time index
  5. Appends to the WAL for crash safety
  6. Assigns a URI (mv2://track/title)

Retrieval

When you search or view:
  1. Query hits the appropriate index (lexical, vector, or time)
  2. Frame metadata is loaded from the TOC
  3. Payload is decompressed and returned
  4. Access is logged for analytics

Deletion

“Deleted” frames aren’t physically removed. They’re tombstoned:

Frame IDs vs URIs

Every frame has two identifiers:

Best Practices

Frame Sizing

  • Small frames (under 4KB): Great for chat messages, notes
  • Medium frames (4KB - 1MB): Documents, articles
  • Large frames (over 1MB): PDFs, images, audio

Batch Ingestion

Use put_many() for bulk ingestion (100-200x faster):

Tombstone Management

Periodically vacuum to reclaim space:

Next Steps

Memory Architecture

See how frames fit into the file structure

Time Index

Learn about temporal ordering