AI agent memory

AI Agent Memory - Why Agents Forget the Workflow Mid-Task

Christopher Kliebenstein · July 16, 2026

Every agentic AI pitch now carries a line item called memory. When an agent loses the thread mid-task, executives blame the model for being too small.

In 2026 agent memory stopped being a context-window setting and became infrastructure a C-suite has to buy and govern.

Short answer: Agents lose the thread because their memory was never architected. A bigger context window degrades in reliability as it fills, so it makes a weak fix. The durable fix is a set of decisions: what persists, where it is stored, how long it lasts, and who can reach it. In 2026 those decisions became infrastructure you buy and govern.

We build and evaluate agent memory for operators funding agentic AI, and the failures almost always trace back to how the memory was designed.

Why do AI agents forget the workflow mid-task?

An agent forgets because the instruction it needs has slid into the part of the context window that models read worst: the middle.

Liu et al., "Lost in the Middle" (TACL 2024) found that model performance is highest when the relevant information sits at the start or the end of the context, and it drops sharply when that information is buried in the middle. A long session pushes an early instruction straight into the dead zone. The agent still holds the instruction. It just cannot reliably act on it.

Constraints decay in a telling pattern. A preprint from Gamage (arXiv, April 2026) is single-author and not yet peer-reviewed, so read it as an early signal rather than settled science. Across 4,416 trials over 12 models and 8 providers, it found that "omission" rules, the ones an agent has to keep suppressing, held at 73% compliance at conversation turn 5 and fell to 33% by turn 16. "Commission" rules, the ones that require an action, stayed near 100%. That matches what operators see. The agent keeps doing the thing you asked and quietly stops honoring the thing you told it never to do. It is one reason prompt-based guardrails fail once a session runs long: the rule is still in the context, but the model has stopped acting on it.

Does a bigger context window fix agent memory?

A larger context window does not fix memory. Past a point it makes reliability worse.

Chroma Research tested 18 LLMs and found that performance degrades unevenly as input grows, so a model advertised at 200K tokens is often unreliable well before it reaches 200K. They call it context rot. The number on the spec sheet describes how much you can load. It says nothing about how much the model can actually use.

The benchmark evidence is blunt. On LongMemEval (Wu et al., ICLR 2025), which runs 500 questions across multi-session chat histories of roughly 115K tokens, advanced long-context models including GPT-4o, Llama 3.1, and Phi-3 lost 30 to 60% of their performance when they read the full history, compared with an oracle setup that handed them only the relevant facts. Stuffing the transcript into the window is a measurably worse way to remember than retrieving the few facts that matter.

What is the difference between short-term and long-term agent memory?

Short-term memory is the current session. Long-term memory is what survives across sessions. Splitting the two is what turns memory into something you can govern.

Short-term memory is the working context of a single task. Long-term memory is the store an agent writes facts into and retrieves from days or months later. AWS draws exactly this line in Bedrock AgentCore Memory, a managed service that separates session memory from cross-session memory. Once the two are apart, retention, access, and deletion become policies you set on the long-term store, instead of properties you hope the model happens to have.

Why did agent memory become infrastructure in 2026?

In 2026 the major clouds shipped managed memory as a provisioned service. That moves the decision from an engineering detail up to a governance one.

AWS Bedrock AgentCore Memory frames memory as infrastructure to provision, and AWS has added governance features to AgentCore Memory over the course of 2026. Google's Vertex AI Memory Bank, in public preview since July 8, 2025, treats the problem as context-window inefficiency, or context rot, and extracts, consolidates, and retrieves facts asynchronously through Gemini instead of replaying whole transcripts. The extraction method underneath came out of peer-reviewed research (Google Research, ACL 2025). Both are managed services in preview or recent launch, so treat commercial status as something to confirm with the vendor.

The reason this lands on your desk now is the adoption curve. Gartner projects that 40% of enterprise applications will feature task-specific AI agents by 2026, up from under 5% in 2025. Every one of those agents needs a memory decision behind it.

Getting an agent to sound human is a different battle from getting it to remember. Our human-writing method is a free Claude skill - grab it with your email.

What benchmarks measure AI agent memory?

Three benchmarks became the working standard for testing memory in 2026: LoCoMo, LongMemEval, and BEAM.

The vendor Mem0 describes that trio as the standard set and reports on the LoCoMo benchmark 90% lower token consumption (1.8K versus 26K tokens per query) and 91% lower p95 latency (1.44s versus 17.12s) against full-context prompting. Those are the supplier's own published figures, so treat them as a vendor claim to verify rather than a settled result. The point for a buyer is that a test exists. You can ask any memory vendor for its LongMemEval and LoCoMo scores and hold them against the context-stuffing baseline. That is the comparison Mem0's benchmark write-up lays out.

Do AWS and Google's managed memory services replace Mem0 or Zep?

No independent comparison exists, so treat "replace" as an open question and decide on your own requirements.

There is no neutral, non-vendor benchmark that puts AWS Bedrock AgentCore Memory, Vertex AI Memory Bank, and third-party layers like Mem0 or Zep head to head, and there is no verified pricing comparison across them either. Anyone handing you a clear winner is selling one of them. The useful move is to hold every option to the same bar: retention, access, deletion, ownership, and benchmarked recall. That bar is yours to set.

What should you demand before you approve an agent-memory line item?

Memory is a governance decision with five questions attached. Get them answered before you sign.

  1. What persists, and what gets dropped? An agent that remembers everything is a liability, and one that remembers nothing is the forgetting problem you started with. Ask which facts the system writes to long-term memory and which it lets expire.
  2. Where does it live, and who owns the store? In your cloud tenant, the vendor's, or a shared one. Ownership decides what happens to the memory if you switch vendors or the contract ends.
  3. How long is it retained, and can you force deletion? A right-to-delete is a legal requirement for regulated data, and plenty of memory stores were never built for it. If the vendor cannot delete a specific customer's memory on request, that is a finding.
  4. Who can read it? Access control on the long-term store decides whether one agent's memory of a customer can surface inside another user's session. Ask for the access model in writing.
  5. How is recall measured? Ask for the system's LongMemEval and LoCoMo numbers against a full-context baseline. A vendor that cannot produce them is asking you to fund memory on faith.

Answer those five and you have bought infrastructure you can govern. Skip them and you have bought a feature that will surprise you later, usually in an audit.

Frequently asked questions

What is AI agent memory, and how is it different from a bigger context window? Agent memory is the system that decides what an agent keeps across a task and across sessions, plus where it stores those facts and how it retrieves them. A context window is only the model's working space for a single prompt. Chroma Research shows that enlarging the window degrades reliability as it fills, so more window does not equal more memory.

Why do AI agents forget instructions given earlier in a task? Because the instruction drifts into the middle of a long context, where models read worst, per Liu et al. (TACL 2024). Rules the agent must keep suppressing decay faster still: a 2026 preprint by Gamage, single-author and not yet peer-reviewed, measured "omission" compliance falling from 73% to 33% between turns 5 and 16.

Does a 1M-token context window solve the agent-memory problem? No. LongMemEval (ICLR 2025) found leading long-context models lost 30 to 60% of their accuracy reading a full history versus retrieving only the relevant facts. A bigger window raises how much you can load; reliable recall comes from retrieving the right facts.

What benchmarks measure AI agent memory? LoCoMo, LongMemEval, and BEAM are the three named most often in 2026. LongMemEval tests recall across multi-session histories; the vendor Mem0 publishes LoCoMo results for its own system. Ask any memory vendor for its scores on these against a full-context baseline before you buy.

Do AWS Bedrock AgentCore Memory and Vertex AI Memory Bank replace tools like Mem0 or Zep? There is no independent benchmark or pricing comparison across them, so no honest answer names a winner. AWS and Google both offer managed memory in preview or recent launch. Evaluate each against your own requirements for retention, access, deletion, ownership, and benchmarked recall.

Get the free human-writing skill. It is the method we use to make AI drafts read like a person wrote them, packaged as a Claude skill you can run. Leave your email and we will send the link. Send me the skill. Prefer to follow along first? Just the newsletter.

Sources

  1. Chroma Research, "Context Rot: How Increasing Input Tokens Impacts LLM Performance" (July 2025). trychroma.com
  2. Liu et al., "Lost in the Middle: How Language Models Use Long Contexts," TACL Vol. 12 (2024). aclanthology.org
  3. Wu et al., "LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory," ICLR 2025. arxiv.org
  4. Gamage, "Omission Constraints Decay While Commission Constraints Persist in Long-Context LLM Agents," arXiv preprint (April 2026, single-author, not peer-reviewed). arxiv.org
  5. AWS, "Bedrock AgentCore Memory" documentation (2025-2026). docs.aws.amazon.com
  6. Google Cloud, "Vertex AI Memory Bank in public preview" (2025). cloud.google.com
  7. Google Research, topic-based memory extraction, ACL 2025. arxiv.org
  8. Mem0, "State of AI Agent Memory 2026" and "AI Memory Benchmarks in 2026" (vendor-published figures). mem0.ai, mem0.ai
  9. Gartner, "40% of Enterprise Apps Will Feature Task-Specific AI Agents by 2026" (August 26, 2025). gartner.com

By Christopher Kliebenstein. We build and run AI-native workflows for operators who want them working in production.