Vektor/Blog/Memory v2
Product · 4 min read

Why We Rebuilt Memory From Scratch

Memory v1 shipped in eight weeks. It was a thin wrapper over a vector store with a nice SDK. It got us to 200 customers, and then it started to break in ways a wrapper can't fix.

L
Lena Kovacs
Jan 22, 2025 · CTO, Vektor

The first signal something was wrong came from a support team running two agents on shared context. Agent A would summarize a customer's history. Agent B, ten seconds later, would overwrite that summary with a less useful one. The customer never saw it — but the next agent in the chain did, and answered the wrong question with total confidence.

What v1 got wrong

We had one store. Everything went into it — past turns, world facts, user preferences, learned workflows — and we asked the embedding to sort it all out at retrieval time. It mostly worked. It also blended episodic recall (“what did the user say last week”) with semantic lookup (“what's our refund policy”) in ways that quietly hurt accuracy, especially on the long-running workflows we had originally optimized for.

Three stores, not one

Memory v2 splits storage into three first-class types: episodic, semantic, and procedural. The split isn't arbitrary — it mirrors a taxonomy that has been load-bearing in cognitive psychology for fifty years and that a recent line of agent-memory research has been quietly resurrecting for LLM systems. Each store has its own write path, its own retention policy, and its own retrieval ranking; the SDK lets you address them independently, but the dashboard stitches them back into a single timeline.

Selective compression

Long-horizon agents drown in their own history. v2 compresses cold episodic memory into salience-weighted summaries on a rolling schedule — you keep the facts, drop the noise. The compression model is a distilled small LM we trained on labeled importance pairs; the rough intuition is the same one that shows up in the recent hierarchical-memory papers, where a slow tier holds the gist and a fast tier holds the verbatim window.

Optimistic locking

Back to the support team: shared memory across agents needs the same concurrency primitives as a database. v2 attaches a version stamp to every memory write. Conflicting writes surface as a span event in the trace view, so you see the collision instead of inheriting a corrupted state two hops later.

What's next

We're working on cross-tenant federated memory and on a smaller, on-device variant for latency-sensitive agents. If you're building something long-horizon — especially anything that resembles a memory hierarchy for an LLM agent — we'd love to compare notes.

Try Memory v2
Free for the first 100k vectors. No credit card.
Read the docs →
← All posts