MemContract: Contract-Sensitive Evaluation for Mutable Agent Memory

Charley Li, Alice CaoNeurIPS 2026

TL;DR

Knowing how to remember a fact is only half the battle for AI agents; knowing how to update, retire, or truly forget it is where most systems quietly fall apart. MemContract introduces an evaluation framework that treats agent memory like a strict software contract, pinpointing exactly why agents cling to outdated rules—and proving that a simple audit log can fix most of the damage.

What Problem Does This Paper Address?

Imagine telling an AI assistant that your company’s 30-day refund policy just changed to 14 days. Tomorrow, a customer asks for a refund on day 20, and the agent cheerfully approves it using the old policy. Why? Did the agent fail to write the new rule, fail to mark the old rule as inactive, or just grab the wrong chunk of text during retrieval?

Existing long-term memory benchmarks generally test whether an agent gets the final answer right at the end of a long conversation. While useful, answer-level scoring treats memory like a black box. When an update fails, engineers are left guessing where the state transition broke down. Furthermore, real-world memory isn't just "overwrite and forget": sometimes deprecated rules must be kept strictly for historical queries, deleted data must be scrubbed from summaries, and agents must prove how a fact evolved over time.

Methods

Instead of just grading final answers, the authors introduce MemContract, which evaluates memory through six explicit, executable operations: Store, Retrieve, Revise, Deprecate (soft-invalidate so it is only used for historical queries), Erase (hard-delete), and Prove-origin (return the complete, ordered chain of edits and sources).

How a single service-policy record transitions across MemContract's operations and observables.

What makes this novel is how it isolates failures:

  • Prerequisite Conditioning: If an agent fails to Revise a record, MemContract checks whether it ever successfully Stored and Retrieved the original value first, separating basic recall bugs from true mutation bugs.
  • Residue Auditing: For Erase, an adversarial probe agent fires 25 targeted queries (paraphrases, multi-hop reconstructions, contextual cues) at the exposed interface to ensure deleted facts aren't lurking in summaries or scratchpads.
  • Causal Interface Interventions: Keeping the underlying storage databases completely fixed, the authors add or withhold audit logs and status fields at the agent interface to test what actually drives mutation reliability.

The authors test 12 systems—7 controlled architectures (from No-Memory and ChromaDB RAG to Neo4j Graph Memory) and 5 contemporary frameworks (A-MEM, Mem0, Mem0-graph, Memory-R1, and Zep/Graphiti)—across six LLM backbones.

Datasets

  • MemContract Benchmark (New): 1,080 multi-session tasks (180 per operation across easy, medium, and hard tiers) spanning 3–10 sessions in four domains. It injects distractor sessions and rotates entity aliases/keys to prevent agents from relying on session-local shortcuts.
  • Downstream Decision Suite (New): 240 multi-session episodes (retail/airline service, web navigation, scheduling) where policy corrections and changed user preferences directly impact task completion.
  • External Benchmarks: Curated 120-item and 100-item subsets of LongMemEval and LoCoMo to compare contract sensitivity against established conversational memory benchmarks.

Key Insights and Ideas

  • Basic recall is a solved commodity; state mutation is the real bottleneck. Almost every structured memory system looks great when storing and retrieving static facts, creating a false sense of security. The systems only diverge wildly when information changes or requires a paper trail.
  • It’s not the database—it’s the audit trail. Graph databases naturally outperform hybrid RAG+KV systems on memory updates. However, the "aha moment" comes when the authors strip Graph Memory of its revision counters and source annotations (tanking its score) and bolt a simple append-only audit log and status field onto Hybrid RAG+KV—closing nearly three-quarters of the performance gap without changing the underlying storage engine.
Figure 3: Graph–Hybrid paired macro contrasts. The original interface uses the more conservative template-cluster CI; the two interventions use their reported paired task CIs. Changing Hybrid’s audit- state capability and tuning both interfaces test distinct mechanisms. Intervals are not equivalence tests.
  • Mutation scores predict real-world agent reliability. Even after statistically controlling for how well a system stores and retrieves information, its ability to mutate state strongly predicts whether an agent will succeed on downstream multi-session tasks—or embarrassingly enforce superseded policies.

Key Results

  • Narrow recall vs. wide provenance: Across the 10 structured memory systems (using GPT-4o), Store and Retrieve scores span just 3.7 and 3.9 percentage points (all clustering around 82%–88%), whereas Prove-origin spans a massive 33.2 points (from 15.7% for RAG to 48.9% for Zep/Graphiti). Overall balanced contract satisfaction is led by Zep/Graphiti (69.4%) and controlled Graph Memory (67.6%), while standard RAG trails at 40.6%.
Full-pool success rates across all six contracts for the twelve evaluated memory systems.
  • Exposing mutation state repairs deficits: Withholding audit affordances drops Graph Memory from 67.6% to 61.9%. Conversely, exposing status and an append-only log boosts Hybrid RAG+KV from 62.4% to 66.3%, shrinking the 5.2-point gap down to 1.3 points—a much larger convergence than equal-effort prompt/schema tuning alone (which leaves a 4.1-point gap).
  • Downstream impact: Across 240 downstream episodes, mutation scores hold a 0.83 partial correlation with task success after controlling for recall. On 138 episodes involving policy corrections, standard RAG applies outdated, superseded policies 41.3% of the time, compared to just 8.7% for Graph Memory and 8.0% for Zep/Graphiti.
Figure 2: Downstream association across ten structured memory systems (upper panel, reported 95% intervals) and superseded-policy use on 138 correction-bearing episodes (lower panel). Mutation and recall denote their respective family means. The upper panel shows aggregate and adjusted estimates; the lower panel isolates the stale-policy outcome.

Limitations and Future Work

  • Out-of-scope failure modes: MemContract focuses on English tasks across four domains and intentionally excludes ~8.7% of real-world memory issues found in open-source bug reports—specifically summarization quality, cross-user access control, and concurrent write conflicts.
  • Empirical vs. certified deletion: The 25-probe Erase suite measures practical semantic recovery at the agent's interface; it is not a formal cryptographic or storage-level deletion certificate.
  • Sample size in correlations: Downstream correlation intervals are computed over a cohort of ten structured systems, resulting in wide confidence intervals that should be interpreted alongside the concrete policy-error rates. Application designers can extend this work by weighting the six contract profiles to match their specific production workloads.

Summary updated

BibTeX
@inproceedings{li2026memcontract,
  author = {Charley Li and Alice Cao},
  title = {{MemContract: Contract-Sensitive Evaluation for Mutable Agent Memory}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=BT1m6pIA81},
}
Figure