Practical guide · Agent evaluation

How to evaluate AI agent memory

Evaluate the full memory lifecycle with separate measures for each stage. Test what the agent saves, what it refuses to save, how it replaces stale facts, what it retrieves, whether it uses evidence correctly, and whether deletion really removes later access. A correct answer can still expose a private fact or act on information the user revoked.

Published December 3, 2026 · 15 minute read

The short answer

Build stateful test episodes that span several sessions. Seed useful and forbidden facts, add irrelevant history, change one fact, ask a question or require an action, then revoke or delete information. Score capture, update, retrieval, reasoning, action, governance and efficiency separately. Run the same episodes with no memory, full recent context and oracle evidence so you can locate the failing stage instead of blaming the whole system.

Write the memory contract first

A test needs an explicit rule for each piece of information. Define who owns it, which users or agents may retrieve it, how long it may remain, what replaces it, and which actions may depend on it. Without that contract, a system can look helpful while retaining secrets, mixing users, or preferring an old value over a correction.

HEAMS argues that memory systems should be tested across performance, efficiency, privacy, security and user sovereignty. Its experiments found that strong task scores can coexist with weak privacy, security or deletion behavior. Keep those dimensions separate in the release report.

Useful memory

Facts, preferences, decisions and recovery state that the product is allowed to retain and that improve a named future task.

Forbidden memory

Secrets, data from another scope, expired information, revoked preferences and content the user or policy says must not persist.

Memory evaluation waterfall

Use this waterfall to identify where a failure entered the system. Each row has a different control and metric. One blended accuracy score cannot tell you whether the write policy, index, retriever, model or action layer caused the result.

AI agent memory evaluation stages, probes and metrics
StageProbeMeasureCritical failure
CapturePresent useful and forbidden facts in the same session.Useful-write recall, write precision, blocked-retention rate.The system stores a fact it must reject.
UpdateCorrect a fact after several distractor sessions.Latest-value accuracy and stale-use rate.A revoked or superseded value controls the answer.
RetrieveAsk a question with labeled supporting memories.Recall@k, ranking quality and cross-scope retrieval.Another user's or workspace's memory appears.
Read and reasonSupply oracle evidence without relying on retrieval.Answer accuracy, evidence support and abstention.The model invents a fact when memory has no answer.
ActRequire a tool decision that depends on prior sessions.Final-state success and policy violations.The agent takes an irreversible action from stale memory.
Forget and governDelete one fact while preserving nearby allowed facts.Deletion efficacy, preservation and leakage.Deleted information remains retrievable or actionable.
ScaleIncrease sessions, noise, entities and conflicting updates.Accuracy, latency, tokens and storage by volume.A capacity cliff creates unsafe answers or actions.

Build stateful episodes, not isolated questions

MemoryAgentBench evaluates accurate retrieval, test-time learning, long-range understanding and selective forgetting through incremental multi-turn interactions. That structure is closer to a persistent product than a static question over one long document.

  1. Seed: provide allowed facts, preferences or task state and mark what may persist.
  2. Distract: add unrelated sessions, similar entities and facts that must remain separate.
  3. Change: correct a value, introduce a conflict or change the allowed scope.
  4. Query: ask for a fact, explanation or abstention with labeled evidence.
  5. Act: require a bounded tool decision that exposes whether the agent used the right memory.
  6. Revoke: delete or expire one fact and verify both removal and preservation.
  7. Attack: attempt poisoning, scope leakage or a request to recover deleted information.

MemoryArena goes beyond recall by making later actions depend on earlier interactions and feedback. Include at least one action-bearing case when the production agent uses memory to choose tools, purchases, schedules, messages or access decisions.

Use controls to isolate the broken stage

No memory

Establish whether the task can be solved from the current request alone. A memory system should earn its storage and risk.

Recent or full context

Show whether a simple context policy beats the persistent store at the tested history length and cost.

Oracle evidence

Give the model the labeled memories directly. If it still fails, retrieval is not the main problem.

LongMemEval separates long-term memory into indexing, retrieval and reading, and tests extraction, multi-session reasoning, temporal reasoning, updates and abstention. Preserve that separation in your harness so one improvement does not hide a regression elsewhere.

Worked example: a cross-session support agent

A customer tells a support agent that shipments should go to the office and that billing messages must never include a home address. Two sessions later, the customer changes the shipping preference to parcel collection. After another session, the customer asks the agent to prepare a replacement order.

Capture

The system may store the current shipping preference and the billing restriction. It must keep the private home address out of billing context and unrelated workspaces.

Update

Parcel collection must supersede office delivery. The earlier preference may remain in an audit history only if policy permits, but it cannot drive the next order.

Retrieve and reason

The agent should retrieve the current preference and billing restriction, ignore unrelated conversations, and ask for missing parcel-point details instead of inventing them.

Act

The replacement order must use the chosen parcel point. The billing message must not expose the home address, even when the final order is otherwise correct.

Forget

After a deletion request, the old office preference must not appear in search, generated responses or later actions. The billing restriction should remain if the user did not delete it.

Measure capacity and efficiency beside accuracy

MemBench tests factual and reflective memory across participation and observation, then measures effectiveness, efficiency and capacity. Run volume sweeps rather than one comfortable history size. Record write latency, retrieval latency, tokens, storage growth and cost for both successful and failed tasks.

Report critical gates separately from averages. Cross-user leakage, retention of forbidden information and action from a revoked fact should block release even when aggregate recall improves. For variable behavior, repeat each episode and state how many runs must pass.

Memory evaluation worksheet

Future task: Which later answer or action should memory improve?

Write policy: What may be stored, rejected, corrected or summarized?

Scope: Which user, workspace, agent and tool may retrieve each fact?

Evidence: Which memories support the expected answer or action?

Update: Which value wins after a conflict or correction?

Abstention: When should the agent say memory has no answer?

Deletion: What must disappear, and which neighboring facts must remain?

Budget: What limits apply to latency, tokens, storage and cost?

Start with the agent test-set workflow to source representative episodes and label expected outcomes. Use the agent trajectory evaluation guide when memory drives tool calls, arguments, approvals or action order. Feed reviewed failures into the agent observability workflow so production incidents become regression cases.

The existing agent memory research guide explains what notes, consolidation and knowledge wikis are for. This page owns the separate release decision: whether a chosen memory design works safely on your cases.

Primary sources

  1. HEAMS: Holistic Evaluation of Agent Memory Systems
  2. MemoryArena: Benchmarking Agent Memory in Interdependent Multi-Session Agentic Tasks
  3. MemoryAgentBench: Evaluating Memory in LLM Agents
  4. LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory
  5. MemBench: Comprehensive Evaluation of Memory in LLM-based Agents