Understanding the "Evolution Memory" Mechanism in LLMs: Enabling Agent Experience Inheritance Across Models
This article explains why optimized agent harnesses often fail when transferred to a new underlying model, and introduces a structured memory mechanism—Self-Improvement Memory (SIM)—that records not only the changes but also the rationale and evidence. It details the root cause, the design of memory entries, the closed-loop workflow of writing, retrieving, and reusing experience, and offers practical guidance for engineering teams looking to build agents that truly learn and inherit knowledge across model generations.
The Problem: Why Does Upgrading the Base Model Invalidate Existing Harness Logic?
In practical agent engineering, what gets iteratively optimized most often is not the billions of underlying model weights, but the outer “shell” wrapped around the model—commonly referred to in the industry as the harness. This harness includes prompt templates, tool-calling logic, interception and validation rules, retry strategies, context organization, and more. You can think of it as an “exoskeleton” for the model: the model performs reasoning, while the harness constrains that reasoning onto correct, safe, and efficient paths.
Recently, Recursive Self-Improvement (RSI) has become one of the mainstream approaches for enhancing agent capabilities. The basic idea is to have an optimizer (which may itself be driven by a large language model) repeatedly attempt and modify the harness across a large number of tasks, until its performance on a target evaluation set approaches the optimum.
The issue is that the harness produced by such optimization is highly coupled to the specific model it was optimized for. When the underlying model is changed or upgraded, a counter-intuitive phenomenon appears:
A harness that has been deeply evolved and performs well on model A, when directly applied to model B, may score lower than B’s default initial harness.
In other words, the carefully crafted “experience asset” does not appreciate when transferred across models—it becomes a liability.
Root Cause: What Is Preserved Is the “Result,” Not the “Reason”
Why does this happen? The core contradiction can be summarized in one sentence: the migration preserves only “what was changed,” but loses “why it was changed.”
When a complex harness is handed over to a new model’s optimizer, all the new optimizer sees is a pile of final-form rules, interceptors, and prompt fragments. It has no way to know:
- That a seemingly redundant validation was actually added to fix a critical bug that frequently occurred on the old model;
- That a convoluted prompt phrasing was the result of many rounds of experimentation to find an effective approach;
- That a strategy explicitly disabled was already proven to cause errors in specific scenarios.
Because these “decision motivations” are missing, the new optimizer suffers from two typical types of degradation during further iteration:
- Accidental deletion of critical logic: It removes code that actually plays an important role, reintroducing problems that had already been solved.
- Repeating known failures: It re-proposes solutions that have already been shown to be ineffective, wasting compute and dragging down performance.
The result is “the more you optimize, the worse it gets”—a negative feedback loop. This is fundamentally a knowledge representation deficiency: the optimization process produces executable code, and code only encodes “how to do it,” not “why it is done this way.”
Proposed Solution: From “Chat History” to “Structured Development Logs”
To address this discontinuity, a more complete framework upgrades self-improvement from “one-shot convergence” to “continuous evolution.” This can be called Continual Recursive Self-Improvement (CRSI). Its key component is a Self-Improvement Memory (SIM).
It is important to emphasize: SIM is not simply adding a “chat history” to the model. Unstructured conversation logs have low information density and high noise, making it difficult for the optimizer to retrieve genuinely reusable decision rationale. SIM is more like a highly structured development log—every modification to the harness must be recorded as a traceable, retrievable, and reusable structured entry.
An ideal memory entry should roughly contain the following fields:
{"change_id": "chg-0427","target": "parameter validation module before tool invocation","motivation": "the old version triggered downstream exceptions when handling empty parameters","hypothesis": "adding non-empty and type checks can reduce the error rate","action": "inserted a validation branch before invocation and added a fallback return","evidence": {"metric": "task success rate","before": 0.71,"after": 0.86},"status": "verified","do_not_repeat": ["the approach of directly relaxing parameter validation has been proven ineffective"]}
Such a memory binds the “result” (action) with the “reason” (motivation / hypothesis) and “evidence.” When the underlying model changes, the new optimizer inherits not a pile of isolated code, but a full decision archive with causal chains. It can then judge which logic must be preserved, which conclusions do not need to be re-verified, and which detours should be avoided.
This is the engineering meaning of “evolutionary experience can be inherited across model families”—what is inherited is not weights, but transferable decision knowledge.
How the Mechanism Loops: Writing, Retrieval, and Reuse of Memory
A practical SIM mechanism typically includes three phases that form a closed loop:
1. Writing (Reflection & Write)
After each round of optimization and obtaining evaluation feedback, the optimizer “writes a diary”: it records the motivation, hypothesis, action, and validation results as structured entries. The key is to explicitly record failures—falsified approaches are equally valuable assets, as they prevent future repeated trial-and-error.
2. Retrieval
Before starting a new round of optimization, the optimizer first retrieves relevant historical entries based on the current task characteristics, and injects high-relevance decision rationale into the context. Retrieval quality directly determines whether experience can be effectively recalled. It can be implemented using semantic similarity combined with tag filtering.
3. Reuse and Reconciliation
When facing a new model, the optimizer makes incremental adjustments based on historical entries rather than starting from scratch. It carefully preserves logic marked as verified, and directly avoids approaches marked as do_not_repeat. This turns “starting from zero” into “continuing from existing conclusions.”
Practical Engineering Recommendations
To bring this idea into a real system, several practices are worth noting:
- Decouple memory from code storage: The harness code goes into a version control repository, while structured memory is persisted separately. A common object storage service can be used to save log snapshots, a logging service with monitoring and alerting can track metric changes before and after each optimization round, and a message queue can decouple the “optimization execution” and “memory writing” processes when needed.
- Evidence must be quantifiable: Each memory entry should be attached to explicit evaluation metrics and before/after comparison data, avoiding subjective “pseudo-experience” entries.
- Memory governance: As entries grow, mechanisms for deduplication, merging, and invalidation are needed to prevent outdated conclusions from misleading future optimization. A periodic consistency check on the memory store is also recommended.
- Safety boundaries: The optimizer’s modifications to the harness should be restricted to a controlled scope. Changes involving tool permissions or data access should retain a human approval step, so that automated optimization does not introduce irreversible risks.
For teams building agents on enterprise-grade platforms, most of the capabilities above can be assembled using mature cloud platform components—model inference, vector retrieval, object storage, logging, and monitoring are all available on major cloud providers (for example, Baidu AI Cloud offers generic services in these categories). Teams can focus their effort on the memory structure design and the optimization strategy itself.
Conclusion
The bottleneck of RSI is never just “whether the model is strong enough,” but “whether experience can be accumulated and inherited.” When the optimization process outputs only code, every model upgrade means a reset of experience. But when the process outputs structured memory with causal chains, experience becomes an asset that can be inherited across generations.
Moving from “brute force” to “teaching the system to remember why” may be a more robust path for the continuous evolution of agents. The takeaway for developers is direct: instead of repeatedly polishing a harness tightly bound to a specific model, first build a memory mechanism that can capture decision rationale. The former may reset to zero at the next model update; the latter will keep appreciating over time.
