Published by the Alchemyst AI engineering team. We built Alchemyst AI, the context layer described in this post. This is not a neutral third-party review - we have a direct commercial interest in this topic. We've done our best to link to independent sources and represent competing approaches accurately. Read accordingly.
If you've shipped more than one AI agent to production, you've probably hit this: two agents that share the same underlying LLM give contradictory answers about the same company policy. Or an agent that worked fine in staging starts hallucinating customer details under real load. Or a new agent onboarded three months after the first one doesn't know anything the first one learned.
These aren't prompt engineering failures. They're a memory architecture problem - specifically, a problem with when and how context gets scoped.
This post breaks down the architectural decision at the center of it, compares the main approaches we evaluated (Mem0, Zep, and what we built), and shares what we learned shipping a production multi-agent system. We'll link to external benchmarks and third-party analyses throughout so you can verify the claims that matter.
The Core Problem: Write-Time vs. Retrieval-Time Scoping
Most memory solutions for AI agents work roughly like this:
- Agent generates output or receives input
- Text is embedded and stored in a vector index
- At retrieval, a similarity search returns the "most relevant" chunks
- Those chunks get stuffed into the next prompt
This is retrieval-time inference - the system decides what context is relevant at the moment it's needed, using embedding similarity as the proxy for relevance.
The problem is that embedding similarity and semantic relevance are not the same thing. A policy document from six months ago and a superseded draft from last week may have nearly identical embedding distances from a query. The retrieval system has no native mechanism to know which one should govern behavior.
This is a well-documented limitation of vector-search retrieval for knowledge-intensive tasks. The REALM and RAG papers (Guu et al., 2020; Lewis et al., 2020) originally framed RAG as a solution for open-domain QA - a use case where approximate recall is acceptable and there's no cost to surfacing an outdated answer. Production enterprise agents have the opposite requirement: precision and recency matter more than coverage.
For a grounded overview of how retrieval-augmented generation works and where it breaks down, Pinecone's documentation on approximate nearest neighbor search and the survey by Gao et al. (2023), "Retrieval-Augmented Generation for Large Language Models: A Survey" (available on arXiv), both cover the failure modes in detail. The short version: vector similarity is a proxy, and proxies fail at the margins of real workloads.
What the Three Main Approaches Actually Do
We evaluated Mem0, Zep, and the architecture we ended up building (Alchemyst AI) when designing our context layer. Here's an honest characterization of each.
Mem0
Mem0 is an open-source memory layer that extracts facts from conversations using an LLM extraction step, stores them as discrete memory items, and retrieves via vector similarity. It is the most widely used tool in this category and has strong community support.
What it's good at: per-user conversational memory, single-agent applications, rapid prototyping. The extraction step adds more structure than raw embedding-and-search.
Where it gets complicated at scale: in a multi-agent deployment, each agent typically maintains its own memory scope. Mem0's default architecture does not provide an organization-wide shared knowledge base that all agents read from - you'd need to build that coordination layer yourself. Its own docs and GitHub issues surface this as an open architecture question for teams moving beyond single-agent use.
Zep
Zep is a memory store that emphasizes temporal awareness - it tracks when facts were recorded and can surface recency signals during retrieval. It's designed for long-running conversational applications and has a well-structured enterprise offering.
What it's good at: conversation history, temporal ordering of user facts, production-grade infrastructure.
Where it gets complicated: Zep is still primarily a retrieval-time system - it uses temporal metadata as an additional signal on top of vector search, but the relevance decision still happens at retrieval. For use cases where context must be governed by explicit business rules rather than similarity + recency, you still have to implement that governance layer.
What We Built: Write-Time Context Scoping
After evaluating both tools, the core architectural decision we made was to scope context at write time rather than infer relevance at retrieval time.
Write-time scoping means: when a piece of context is written into the store - a policy, a customer record, a workflow state - a human or a structured process explicitly assigns it scope (which agents can access it, under what conditions, with what priority). The retrieval system doesn't decide what's relevant. That decision was already made when the context was written.
This approach trades flexibility for determinism. You can't surface unexpected connections across documents the way a vector search might. But every retrieval decision is fully traceable: you can audit exactly what context was available to an agent at any point in time, and why.
For teams building in regulated industries - finance, healthcare, legal - auditability is frequently a compliance requirement, not a nice-to-have.
Real-World Benchmarks: LongMemEval and ConvoMem
We have rigorously tested our architecture using standardized memory benchmarks to validate the cost-performance efficiency of our approach [1].
LongMemEval Performance
LongMemEval evaluates the effectiveness of memory systems over prolonged durations, testing their ability to preserve, refresh, and access information across multiple sessions. In our testing against competitors like Supermemory and Zep, Alchemyst achieved near-perfect accuracy on critical metrics while maintaining an unprecedented cost advantage [1].
| Category | Supermemory Accuracy | Zep Accuracy | Alchemyst Accuracy |
|---|---|---|---|
| Single-session user | 97.1% | 92.9% | 95.59% |
| Single-session assistant | 96.4% | 80.4% | 96.36% |
| Temporal reasoning | 76.7% | 62.4% | 75.57% |
| Multi-session continuity | 71.4% | 57.9% | 72.93% |
Note: For knowledge updates, Alchemyst intentionally relies on domain-specific logic implemented by the developer rather than naive data overwrites, prioritizing business logic safety [1].
ConvoMem Performance
ConvoMem tests multi-message synthesis and implicit reasoning across large conversational datasets. Here, retrieval quality and ingestion speed are critical.
| Metric | Alchemyst (Standard) | Alchemyst (Fast) | SuperMemory |
|---|---|---|---|
| Accuracy | 80.00% | 70.00% | 50.00% |
| Recall | 80.00% | 55.00% | 50.00% |
| MRR | 0.656 | 0.300 | 0.467 |
| Ingest Median Latency | 1,385 ms | 1,389 ms | 2,976 ms |
Alchemyst Standard achieved an 80% accuracy rate compared to SuperMemory's 50%. More importantly for real-time agent deployments, Alchemyst processes new memories into searchable context in less than half the time of competitors (1,385ms vs. 2,976ms) [1].
The Pareto Frontier: Cost vs. Performance
The most glaring issue with scaling retrieval-time memory systems is unit economics. As agents process millions of tokens of history, the costs compound rapidly.
Based on our analysis of industry pricing per 1 million tokens [1]:
- Zep: ~$12.50 per million tokens
- Supermemory: ~$6.33 per million tokens
- Alchemyst: ~$0.06 per million tokens
Alchemyst sits on the Efficiency Frontier (the Pareto Frontier) for AI context layers. We deliver top-tier recall accuracy at a fraction of the market cost. Developers no longer have to choose between expensive "smart" agents and affordable agents that suffer from amnesia.
Moving from Isolated Bots to Coordinated Systems
If you're building a simple single-turn Q&A bot, a basic vector database or retrieval-time system is likely sufficient. However, as organizations move toward autonomous, multi-agent systems that need to reason, plan, and execute complex tasks using shared context, the architecture must evolve.
This matters immensely for real-time applications. Consider any scenario requiring real-time agents such as live customer support or dynamic coding assistants. These agents cannot afford latency spikes from massive vector searches, nor can they afford the hallucinations caused by outdated context. A write-time scoped memory layer ensures that when a real-time agent needs a fact, it retrieves the deterministically correct, pre-scoped piece of context instantly, with sub-2-second ingestion latencies.
By shifting the burden of relevance from retrieval time to write time, we give developers the control they need to build agents that are accurate, reliable, and genuinely production-ready.













