惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
V
V2EX
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
The Cloudflare Blog
T
Tailwind CSS Blog
H
Help Net Security
腾讯CDC
爱范儿
爱范儿
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
C
Check Point Blog
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
The Multi-Agent Memory Problem: Why Retrieval-Time Infere...
Anuran Roy · 2026-06-24 · via DEV Community

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:

  1. Agent generates output or receives input
  2. Text is embedded and stored in a vector index
  3. At retrieval, a similarity search returns the "most relevant" chunks
  4. 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.