Agent Memory Architecture in 2026: 4 Patterns Benchmarked
The bottleneck in 2026 isn’t model size. It’s whether your agent remembers anything from the last conversation. Chroma’s 2025 “context rot” study tested 18 models of that generation (GPT-4.1, Claude Opus 4, Gemini 2.5 among them) and found their performance “grows increasingly unreliable as input length grows,” often in surprising, non-uniform ways (Chroma Research, 2025). Today’s models have bigger windows, but nobody has shown the effect going away. Stuffing more tokens into the prompt isn’t a memory strategy. It’s a tax with diminishing returns.
That’s why mem0 raised $24M, Letta raised $10M, and ICLR 2026 ran a full workshop on “Memory for LLM-Based Agentic Systems” (ICLR, 2026). An entire stack layer, agent memory architecture, has emerged in about two years. This guide compares the four memory patterns that matter: scratchpad, vector recall, tiered memory with a controller, and learned consolidation. With benchmarks. With trade-offs. With the architectural reasoning behind each one.
Key Takeaways
- In the “Lost in the Middle” study, multi-document QA accuracy dropped by more than 20% when the answer sat mid-context (Liu et al., TACL 2024). Full-context is not a memory strategy.
- mem0 hits 66.88% J score on LOCOMO with 91% lower p95 latency vs full-context (arXiv 2504.19413, 2025).
- On the DMR benchmark, MemGPT (93.4%) and Zep (94.8%) crush a 35.3% fixed-context baseline (Packer et al., 2023; Rasmussen et al., 2025). These are 2023-2025 results on GPT-4-class models, so read the gaps, not the absolute numbers.
- Architecture choice depends on conversation depth, latency budget, and whether you need temporal reasoning.
primer on what agentic AI actually is
Why Do Agents Forget? The Memory Problem in 2026
Agents forget because the LLM’s context window is a working memory, not a long-term store. It both costs money and degrades accuracy as it grows. Gartner predicted in June 2025 that over 40% of agentic AI projects will be canceled by the end of 2027, citing escalating costs, unclear business value, and inadequate risk controls (Gartner, 2025). MIT’s 2025 NANDA report on enterprise GenAI is even harsher. Just 5% of integrated AI pilots were extracting millions in value, and the core gap it names is memory-shaped: most GenAI systems “do not retain feedback, adapt to context, or improve over time” (MIT NANDA, 2025).
The naive answer, “just use a 1M token context window,” collapses on cost and latency. At its April 2025 launch, OpenAI said GPT-4.1 took about fifteen seconds to first token at 128K tokens and about a minute at 1M, and at $2 per million input tokens a full window cost roughly $2 per request (OpenAI, 2025). The models have changed since; the math mostly hasn’t. In October 2026, Claude Sonnet 5.5 and GPT-6.1 Sol both list input at $2 per million tokens (Claude pricing, 2026; OpenAI pricing, 2026), so a full 1M-token prompt is still about $2 before a single output token, and Gemini 3.1 Pro doubles its input rate above 200K tokens (Google, 2026). And accuracy still drops. The “Lost in the Middle” paper found GPT-3.5-Turbo’s multi-document QA accuracy could fall by more than 20% when the relevant document sat mid-context (Liu et al., TACL 2024).

Source: OpenAI GPT-4.1 launch, 2025
So we need an architectural answer, not a bigger window. Real agents, the kind that hold a multi-month relationship with a user, push state out of the prompt and into a managed memory system. The interesting question is how.
why caching is the other half of LLM cost control
My take: Long context isn’t memory. It’s an expensive scratchpad. Treating context-window scaling as a memory roadmap is why so many production agents quietly fall over after week three.
What Are the 4 Memory Architectures for AI Agents?
The four memory architectures map to a maturity curve: in-prompt scratchpad, vector recall, tiered memory with a controller, and learned consolidation. Each one solves a problem the previous one created. Each one has measurable benchmark numbers. And each one is a real bet a funded company is making in 2026.

Here’s the lineage at a glance:
| Architecture | Storage | Retrieval | Best For | Representative |
|---|---|---|---|---|
| 1. Scratchpad | In-prompt | None (it’s just there) | Single-turn, short tasks | LangChain ConversationBufferMemory |
| 2. Vector recall | External vector DB | Embedding similarity | Q&A over docs, FAQ | Pinecone + RAG |
| 3. Tiered memory | Multi-tier (RAM/disk) | Controller-managed paging | Long conversations | MemGPT, Letta |
| 4. Learned consolidation | Episodic + semantic + graph | Distilled summaries | Personal assistants, CRM | mem0, Zep, A-Mem |
Now let’s open each one up.
Architecture 1: Scratchpad (The In-Context Notepad)
The scratchpad is the simplest agent memory architecture: append every message and tool result to the prompt and let the model re-read it. It works until it doesn’t. For a single multi-step task (“research this company, draft the email, check it”), the scratchpad is the right answer. State lives in tokens, the model has full visibility, and there’s nothing to engineer.
The wall is the context window. As the conversation grows, you hit three problems at once: token cost rises linearly, latency rises super-linearly past 100K, and accuracy degrades because of “lost in the middle.” Once your assistant runs more than ~30 turns or ingests a few large tool outputs, the scratchpad becomes the most expensive part of your bill and the least reliable part of your stack.
Common patches make it survive a bit longer. Recursive summarization compresses old turns into a running summary, but in the MemGPT paper a fixed-context baseline working from summaries of past sessions scored just 35.3% on the DMR benchmark with GPT-4 Turbo, vs 93.4% for an architecture that actually pages memory (Packer et al., arXiv 2310.08560, 2023). Sliding windows drop the oldest turns: fast, but the agent forgets your name by Tuesday. Token-budget summarization with recency weighting buys time, not unboundedness.
When I shipped my first multi-day agent, a research assistant that ran for hours per task, the scratchpad strategy held for about 90 minutes before the context filled up and the per-call cost crossed $0.40. We switched to vector recall the next sprint. Why pay to re-read 80K tokens of irrelevant history every step?
My verdict: scratchpad memory is fine for ephemeral, single-session tasks. It’s not memory in the sense of “the agent remembers you across sessions.” For that, you need to externalize.
Architecture 2: Vector Recall, Semantic Retrieval Over an External Store
Vector recall pushes history into an external vector database and pulls back relevant chunks at each step using embedding similarity. It’s the same RAG pattern that powers document Q&A, applied to conversational state. Past messages, tool outputs, and user facts get embedded into a store like Pinecone, Qdrant, Chroma, or Weaviate. At each turn, the agent embeds the current query, retrieves the top-k semantically similar chunks, and injects them into the prompt.
Vector recall is the dominant pattern in production today because it’s simple to bolt on, and because RAG infrastructure was already there. The mem0 paper benchmarked a tuned RAG configuration on LOCOMO and recorded a J score of 60.97% (Chhikara et al., arXiv 2504.19413, 2025). That’s better than recursive summarization, worse than what comes next, and substantially cheaper than full-context.

But vector recall has known failure modes that show up the moment you use it for an agent rather than for FAQ search:
- No temporal reasoning. “What did we discuss last Tuesday?” embeds nothing useful. Vector similarity isn’t time-aware.
- No update semantics. When the user changes their preference (“actually I’m vegetarian now”), both the old and new fact retrieve. The agent has to reconcile in-prompt, and often doesn’t.
- No reasoning over relationships. “Who else from my team is in this thread?” requires graph queries, not similarity. Embeddings flatten the structure.
- Chunk-boundary errors. A 500-token chunk drops half the relevant context every time you split mid-thought.
Vector recall is the right architecture for FAQ-style retrieval and document grounding. It’s the wrong architecture as the only memory layer for a conversational agent, which is why every serious memory product today either replaces it or wraps it in something more structured.
when graph retrieval beats plain vector RAG
Architecture 3: Tiered Memory With a Controller: MemGPT, Letta, and the OS Metaphor
Tiered memory borrows the operating-system metaphor: treat the context window like RAM, treat external storage like disk, and let an LLM-controlled “memory manager” page data between them. This is the MemGPT thesis. MemGPT scores 93.4% on the Deep Memory Retrieval (DMR) benchmark with GPT-4 Turbo, against 35.3% for recursive summarization (Packer et al., arXiv 2310.08560, 2023). The architecture is the difference.
How it works in practice:
- Main context (RAM): the prompt itself, holding system instructions, working memory, and the most recent turns.
- Recall storage (recent disk): full message history outside the prompt, queryable.
- Archival storage (cold disk): long-term knowledge, user facts, prior conclusions.
- Controller: the LLM itself, equipped with tools to read, write, search, and evict between tiers.
The controller decides what to load based on the current task. When working memory hits a token threshold, it summarizes and evicts. When the user asks something the in-prompt context doesn’t answer, it issues a search_recall or search_archival call. The agent learns to manage its own memory, the way an OS process learns to use mmap.

Source: MemGPT paper, Packer et al., 2023
Letta is the production-grade descendant. Founded by the MemGPT authors and out of UC Berkeley, Letta raised $10M seed in September 2024 led by Felicis with angels including Jeff Dean and Clem Delangue (TechCrunch, 2024). It’s the reference implementation for “stateful agents.”
A-Mem (Zettelkasten-inspired agentic memory, accepted to NeurIPS 2025) extends the tiered idea by linking notes via dynamic, agent-generated cross-references, closer to a knowledge graph than a flat archive (Xu et al., arXiv 2502.12110, 2025).
The trade-off with tiered memory is operational complexity. You’re now running an agent loop that issues memory-management tool calls, which adds latency and burns tokens on the management itself. For deep, long-running conversations, months of dialogue with a single user, it’s worth it. For a chatbot that handles 5-turn sessions, it’s overkill.
how multi-agent systems split state across roles
Architecture 4: Learned Consolidation: mem0, Zep, and Episodic-to-Semantic Distillation
Learned consolidation borrows from cognitive science. Human episodic memory (what happened) gets distilled into semantic memory (what’s true) over time. mem0, Zep, and A-Mem all encode that distinction explicitly: raw events go into one store; extracted facts and preferences go into another; the agent retrieves from both with different policies.
The mem0 paper put real numbers on it. On LOCOMO, mem0 hits a J score of 66.88% vs 60.97% for the strongest RAG baseline, a +26% relative improvement on LLM-as-Judge over OpenAI’s memory feature (Chhikara et al., arXiv 2504.19413, 2025). More importantly: 91% lower p95 latency (1.44s vs 17.12s) and 90% fewer tokens vs full-context. That trade-off, slightly less than full-context accuracy for dramatically less cost, is the headline number for the entire architecture.

Zep adds a temporal knowledge graph. Each fact has a validity window: when it was asserted, when it was contradicted, when it expired. That gives the agent the “what did we agree last Tuesday” answer that vector recall fundamentally can’t produce. On the DMR benchmark, Zep hits 94.8% with gpt-4-turbo and 98.2% with gpt-4o-mini (Rasmussen et al., arXiv 2501.13956, 2025). On LongMemEval, Zep delivered up to 18.5% accuracy gains while reducing latency by 90%, with a 184% jump on preference questions and 38.4% on temporal reasoning (Zep blog, 2025).
The shared mechanism across these three:
- Capture: every interaction is logged as a raw episode.
- Extract: an LLM pass distills facts, preferences, decisions, and entities.
- Reconcile: new facts get reconciled against existing ones (update vs append vs supersede).
- Index: episodic events go to a vector store; semantic facts go to a structured store (often a graph); temporal data gets time-stamped.
- Retrieve: at query time, the agent pulls from all three with different weights.
This is more engineering than vector recall. The pay-off is a memory that resembles how humans remember (“I think Sarah prefers vegetarian, last updated three weeks ago”) rather than a similarity-ranked dump of every message that mentioned food.
What I took from it: The mem0 result that matters isn’t the +26% accuracy. It’s the 91% latency drop. Most production agents will accept a 6-point accuracy trade for one-tenth the response time. That’s the architectural wedge.
How Do These Architectures Compare on Benchmarks?
On the Deep Memory Retrieval benchmark, the most directly comparable cross-architecture metric, Zep leads at 94.8% (gpt-4-turbo), MemGPT trails at 93.4%, and recursive summarization sits at 35.3%. The numbers vary across LOCOMO, DMR, and LongMemEval (different setups, different cuts of the data), so the right reading is “tiered and consolidated architectures both beat their baselines by ~60 percentage points,” not “Zep beats MemGPT by 1.4 points.”

Sources: MemGPT, 2023; Zep, 2025
A few caveats worth taking seriously:
-
Benchmark heterogeneity. LOCOMO uses ~9K tokens per conversation across up to 35 sessions; the best raw LLM in the original paper, GPT-4-turbo, scored 32.4 F1 against a human ceiling of 87.9 (Maharana et al., arXiv 2402.17753, 2024). DMR is a different evaluation. Don’t compare J scores to F1 scores directly.
-
Vendor papers test their own systems. Zep tested Zep. mem0 tested mem0. Both papers are reproducible and on arXiv, but the framing is structurally vendor-positive.
-
Latency matters as much as accuracy. mem0’s 1.44s p95 vs full-context’s 17.12s is a 12x speedup. That changes which UX is feasible. Real-time chat tolerates 1.5s; nobody waits 17.
-
Dated models. Every number above was produced on 2023-2025 models (GPT-4 Turbo, gpt-4o-mini, GPT-4o). As of October 2026 I haven’t seen a like-for-like rerun on current models such as Claude Opus 5.5 or GPT-6, so treat absolute scores as historical and the gaps between architectures as the durable signal.
The headline I’d take to a design review: the tiered and consolidated systems here score around 90% on DMR-style long-conversation recall, and mem0 kept p95 latency under 2 seconds. That’s the architectural payoff.
What Should You Use? When Each Architecture Wins
Pick the architecture by conversation depth, latency budget, and whether you need temporal reasoning. There’s no universal best, just a best for your workload. Here’s how I’d decide today.
Use scratchpad when: the task is single-session, sub-30-turn, and ephemeral. Multi-step research agents, code-edit loops, single-prompt workflows. Don’t over-engineer.
Use vector recall when: the agent’s job is grounded Q&A over documents, FAQs, or a knowledge base, and the conversational state is light. RAG infrastructure already handles this well. Acceptable if “what did we agree” isn’t a feature.
Use tiered memory (MemGPT, Letta) when: you have long-running, multi-session conversations and you want the agent to manage its own memory budget. Personal assistants that hold a relationship, support agents that know a customer’s full history, research assistants that span weeks. The controller overhead pays for itself when conversations cross the 100K-token mark.
Use learned consolidation (mem0, Zep, A-Mem) when: you need facts and preferences to update over time, you need temporal reasoning, or you’re building consumer-facing memory features. By its October 2025 Series A, mem0 reported 41,000+ GitHub stars, 13M+ Python downloads, and growth from 35M API calls in Q1 2025 to 186M in Q3 2025, which says a lot about where production is heading (mem0, 2025).
In practice, most production stacks combine architectures. A typical setup: scratchpad for the active turn, vector recall for RAG over docs, and learned consolidation for user-level facts. The architectures aren’t competing. They’re layered.
how to build a multi-agent system as one person
What’s Driving the Memory Gold Rush in 2026?
Three forces converged: consumer apps shipped memory features, papers gave us comparison benchmarks, and capital flowed toward the layer. OpenAI started testing ChatGPT memory in February 2024 and opened it to Free, Plus, Team, and Enterprise users in September 2024 (OpenAI, 2024). Anthropic gave Team and Enterprise plans automatic memory first, extended it to Pro and Max on October 23, 2025 (MacRumors, 2025), and opened it to free users on March 2, 2026 (The New Stack, 2026). Cursor and other dev tools followed. The product expectation is now “the assistant remembers.”

Sources: TechCrunch, 2025; TechCrunch, 2024; CB Insights
Academic legitimization tracks the funding. ICLR 2026 hosted the “Memory for LLM-Based Agentic Systems” (MemAgents) workshop on April 27, 2026, with eight keynotes and two poster sessions on encoding, retrieval, and consolidation (ICLR, 2026). The LOCOMO benchmark normalized cross-architecture comparison. A-Mem hit NeurIPS 2025 as a poster (Xu et al., arXiv 2502.12110). A vocabulary is forming.
For deeper context from the people building these systems, three talks worth your time:
The mem0 founding team’s deep-dive on building production memory:
Frequently Asked Questions
What is agent memory architecture?
Agent memory architecture is the system that lets an LLM-based agent remember information across turns or sessions, beyond what fits in the prompt. The four common patterns are scratchpad (in-prompt), vector recall (RAG-style retrieval), tiered memory with a controller (MemGPT, Letta), and learned consolidation (mem0, Zep). Each trades off cost, latency, and accuracy (Packer et al., arXiv 2310.08560, 2023).
Is RAG the same as agent memory?
RAG is one type of agent memory: vector recall over an external store. It works for grounded Q&A but breaks down on conversational state because it has no temporal reasoning, no update semantics, and no graph structure. mem0’s 2025 LOCOMO results show its learned-consolidation architecture beat the best tuned RAG setup by ~6 J-score points and offer 91% lower p95 latency (mem0 paper, arXiv 2504.19413, 2025).
MemGPT vs mem0: which should I use?
MemGPT (and its production descendant Letta) is a tiered architecture: it pages between in-prompt and external storage like an OS. mem0 is a learned-consolidation architecture: it distills episodes into facts. MemGPT/Letta wins on long-conversation reasoning and self-managed context. mem0 wins on fast retrieval, factual updates, and operational simplicity. Many production stacks use both.
Why isn’t a 1M-token context window enough?
Because cost and latency grow with context length, and accuracy drops. At launch in 2025, GPT-4.1 at 1M tokens cost ~$2 per request and took about a minute to first token (OpenAI, 2025), and October 2026 models like Sonnet 5.5 still charge about $2 for a full 1M-token prompt. Chroma’s 2025 context rot study found all 18 models it tested grew less reliable as input length grew (Chroma, 2025). Memory architecture solves the structural problem; bigger windows just defer it.
What is the LOCOMO benchmark?
LOCOMO is a long-conversation memory benchmark from Snap Research (ACL 2024) that tests 300-turn conversations averaging ~9K tokens across up to 35 sessions. The best raw LLM in the paper, GPT-4-turbo, scored 32.4 F1 against a human ceiling of 87.9, which is the empirical proof that long-conversation memory is an unsolved problem at the model layer (Maharana et al., arXiv 2402.17753, 2024).
how ChatGPT, Claude, Gemini and Grok handle memory for end users
How to Choose Your Memory Architecture
The agent memory architecture stack didn’t exist 18 months ago. Now it has benchmarks, four distinct patterns, three funded vendors, and a dedicated ICLR workshop. If you’re shipping anything beyond a single-turn chatbot, you need to pick a pattern, and the pick has measurable consequences for latency, cost, and what your agent can actually remember.
The short version of how to choose:
- Start with scratchpad. Don’t over-engineer.
- Add vector recall when you need RAG. Cheap and known.
- Move to tiered memory when conversations get long. MemGPT/Letta let the agent manage itself.
- Move to learned consolidation when facts need to update. mem0 and Zep give you temporal reasoning.
The work of the past year (A-Mem at NeurIPS 2025, mem0’s $24M seed and Series A, the ICLR MemAgents workshop) points at the same conclusion: memory is the layer that makes agents stateful enough to be useful. Build the layer. Don’t keep paying the long-context tax.
designing what goes into the context window in the first place