Contract Memory Compiler: Resolve, Then Traverse
cs.AI
Submitted: 2026-09-26
Updated: 2026-09-26
License: http://creativecommons.org/licenses/by/4.0/
The gist: External memory lets language-model agents answer questions about histories too long for the answer model's context window.
Terminology
Abstract
External memory lets language-model agents answer questions about histories too long for the answer model's context window. Updates create a harder problem than retrieving a recent fact: changing one relation can redirect a multi-hop question to records about an entity absent from the question. We study this update-dependent evidence selection problem and introduce the Contract Memory Compiler (CMC). Before seeing a question, CMC uses a language model to identify relations in the history and record where each one was stated. It applies later updates to determine the current relations, follows them from entities named in the question, and passes the corresponding original records to the answer model in one call. Thus the current state determines which evidence is read, rather than merely refreshing values in a previously selected context. To the best of our knowledge, CMC achieves state-of-the-art multi-hop accuracy on FactConsolidation, reaching 78.25% overall and 61.0% at 262K. With the extracted relations and answer model held fixed, selecting evidence before resolving updates reduces multi-hop accuracy to 21.50%. We also introduce MQuAKE-MemStream, a derived dataset of ordered memory streams built from MQuAKE-Remastered counterfactual cases.
Sources
- MemFlow: Intent-Driven Memory Orchestration for Small Language Model Agents
- MemTxn: A Transaction Boundary for Source-Supported Updates and Complete-State Recovery in Agent Memory
- MemCompiler: Compile, Don't Inject -- State-Conditioned Memory for Embodied Agents
- From Local to Global: A Graph RAG Approach to Query-Focused Summarization
- MemoryArena: Benchmarking Agent Memory in Interdependent Multi-Session Agentic Tasks
- RULER: What's the Real Context Size of Your Long-Context Language Models?
- Infini Memory: Maintainable Topic Documents for Long-Term LLM Agent Memory
- Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agents
- When Your Agent Opens the Chat App: Agent-Controlled Search over Raw Chat Logs Rivals Structured Memory
- Stop When Memory Suffices: Evidence-Conditioned Progressive Execution for LLM Agents
- SimpleMem: Efficient Lifelong Memory for LLM Agents
- Benchmarking Natural Language Understanding Services for building Conversational Agents
- MemGPT: Towards LLMs as Operating Systems
- Convomem Benchmark: Why Your First 150 Conversations Don't Need RAG
- Zep: A Temporal Knowledge Graph Architecture for Agent Memory
- Reliable Post-Retrieval Assembly for Agent Memory: Separating Evidence Extraction from Policy Execution
- Supra Cognitive Modes: A Routed Architecture for Agent Memory
- StateFuse: Deterministic Conflict-Preserving Memory for Multi-Agent Systems
- SodaMem: Evidence-Grounded Temporal Graph Memory for LLM Agents
- InfMem: Learning System-2 Memory Control for Long-Context Agent
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems