arXiv(opens in a new tab)cs.AISep 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2609.05339

Does Your Agent's Memory Survive a Model Upgrade? A Controlled Study of Memory Portability

Ankit Goyal, Jaideep Ray

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Model upgrades are routine; memory migrations are not. An agent can keep the same memory store and still forget: a new model may interpret old notes differently, mixed embedding versions may break retrieval, and repair may fail without the original evidence. We compare memory as the same history is preserved verbatim for long-context reading (LC-RAW), divided into chunks for retrieval-augmented generation (RAG), compressed by a model into natural-language notes (NOTES), or normalized into a fixed-schema knowledge graph (KG-fixed). The study uses 48 synthetic histories with randomized answer codes, exact scoring, and two open-weight models with sub 10 billion parameters.

Our measurements show that fixed-schema structures transfer reliably, with KG-fixed accuracy changing by only +0.0004 ± 0.0020 following a writer swap. Conversely, compressed NOTES exhibit high model coupling, with accuracy shifting asymmetrically by +9.91 or −13.28 percentage points depending on the specific migration direction. In RAG systems, partial embedding migrations using a 50/50 mixed index capture only a 4.96-point accuracy improvement, forfeiting the majority of the 11.90-point gain achieved through full re-embedding. Diagnostic decomposition attributes 80% (0.467 ± 0.014) of the NOTES accuracy deficit to information lost during initial construction, whereas retrieval failures drive 81% (0.364 ± 0.012) of the RAG deficit. Finally, store-only repair of NOTES fails to reach a 90% performance recovery target in all 48 test cases, whereas retaining the raw source history enables successful recovery in 34 of 48 cases for one tested direction. These findings highlight the necessity of direction-specific migration testing, strict embedding space isolation, and the retention of source histories for memory repair.

1 Introduction

Agents need memory because useful work rarely fits inside one interaction. Across domains, this means recalling last week's decisions for a project, preserving repository conventions and earlier tool outcomes for a coding agent, and carrying preferences, commitments, and unfinished tasks across sessions. The model's context window provides temporary working context, but it is not durable state. Replaying an entire history on every turn also becomes slow, expensive, and eventually impossible as the history grows. Agent systems therefore persist selected experience outside the model and bring relevant parts back when needed.

That external store becomes part of the agent's behavior. We study four common formats. Long-context raw history (LC-RAW) keeps the full conversation or event history. Retrieval-augmented generation (RAG) stores transcript chunks and retrieves a small set for each query. Model-written consolidated notes (NOTES) stores compressed natural-language summaries; NOTES is simply our label for this format. Fixed-schema knowledge graph (KG-fixed) stores facts as subject-predicate-object claims under a schema shared by every model. Each format makes a different trade-off:

Preprint.

raw history uses more context, retrieval can miss the right record, notes can omit evidence during compression, and a fixed schema can represent only the facts it was designed to hold. Memory is therefore not just a database attached to an agent. It is a boundary that can lose information between past experience and future decisions.

The boundary matters because memory and models have different lifetimes. A useful store may accumulate for months or years, while the models around it change much sooner. Teams adopt new language models for capability, latency, cost, context length, safety, or provider availability. They replace embedding models when retrieval quality improves, route requests across several models, and retire older endpoints. Rebuilding every historical memory after each change can be costly, and the original evidence may no longer exist. In practice, the new model often inherits the old store.

Upgrading an agent should not make it forget. Yet a memory migration is not always a simple copy operation. A new reader may interpret another model's notes differently. A new embedder may place records and queries in an incompatible vector space. A repair process may discover that consolidation discarded the only copy of a critical fact. The deployment still starts, the database still returns results, and nothing raises a migration error. Performance simply drops.

This is a different reliability problem from ordinary benchmark accuracy. Developers need to know whether a memory architecture remains usable when one component changes, which shortcuts fail silently, and what source data must be retained for recovery. A store that performs well on day one can still be a poor long-term design if it is tightly coupled to the model that created it.

Prior work has begun to study memory across models. MemCollab reports that naive cross-agent transfer can degrade performance and distills agent-agnostic memory; a trainable graph-memory study tests robustness when GPT-4o or Gemini-2.5-Pro constructs the graph; and procedural-memory work measures skill transfer across models [2, 4, 14]. Production systems also support memory import, export, re-indexing, and vector migration [1, 3, 9, 12]. But a basic engineering question remains: how do common memory formats compare under the same migration conditions? We still do not know which formats depend most on the model that created them, what an incomplete embedding migration costs, or whether a damaged store can be repaired after the raw history is gone. Appendix A gives a fuller comparison.

To answer these practical questions, we designed an experimental framework that isolates memory creation from memory reading. In our setup, the writer turns an agent's history into persistent memory, while the reader later uses that store to answer queries. After an upgrade, model A remains the writer of the existing memory and the new model B becomes its reader.

We evaluate this handoff by isolating one variable at a time: the writer-reader pair, the embedding model, or the source available for repair. For an A→BA \to B migration, we compare B reading A's store with B reading a store that B created. This keeps the reader fixed and separates migration loss from the reader's general ability. Randomized answer codes prevent answers from coming from pretraining, and exact scoring avoids the need for a model judge. Before collecting the main results, we saved four planned tests and their five-point decision threshold in a signed Git tag (Section 3.5).

Contributions. We provide: (1) a controlled comparison of four common memory formats; (2) separate measurements for each migration direction; (3) tests of model swaps, mixed embedding indexes, and repair with or without raw history; and (4) a breakdown of loss into memory writing, retrieval, and reading, followed by a practical design playbook.