Cross-Model Memory Transfer: Handing Agent Experience to a New Model

    This article describes cross-model memory transfer, an engineering approach in which an AI agent's execution experience is stored outside the model in a unified format and read by a different model. It compares this approach with single-model recursive self-improvement (RSI), then covers the experience schema, storage, retrieval, access control, context injection, and evaluation metrics. Public sources do not yet show that large language models have achieved full RSI, and the conclusions here are engineering inferences that need to be verified in specific business settings.

    Cross-model memory transfer is an engineering approach, not a proven mature solution. Public sources are not yet sufficient to show that large language models have achieved full recursive self-improvement (RSI). The conclusions in this article come from engineering reasoning, and their effect needs to be verified in specific business settings.

    This article covers one approach. An agent stores the execution experience it builds up on one model in a unified format, outside the model. A different model then reads and uses that experience.

    1. How RSI and Memory Transfer Differ

    Traditional RSI usually happens inside a single model. The model generates training data and fine-tunes itself on that data. This approach tends to give stable results, but it requires large compute resources and a complete training pipeline.

    Cross-model memory transfer keeps the model parameters unchanged. It stores experience externally so that another model can read it. The table compares the two approaches:

    Dimension Single-model RSI Cross-model memory transfer
    Object of improvement Model parameters External experience store and prompts
    Main cost Training compute, data generation Storage, retrieval, data governance
    Prerequisites Access to the training pipeline Consistent experience format, stable interfaces
    Typical failure mode Bias in training data gets amplified Wrong experience gets reused, context overflow
    Suitable scope Models that can be trained, clear objectives Highly repetitive tasks, stable toolchains

    The two approaches do not conflict. A team can start with memory transfer to lower the cost of trial and error. After collecting enough data, it can decide whether fine-tuning is needed.

    Memory transfer depends on a unified experience format, stable interfaces, and a high degree of task repetition. If every task is different, the retrieved past experience is hard to use directly. For this reason, memory transfer cannot replace fine-tuning in all cases.

    Which tasks fit, and which do not? Tasks with stable toolchains, repeated workflows, and failure patterns that can be summarized are a good fit. Examples include order lookup, ticket classification, and form validation. Open-ended creative work, research tasks that need new knowledge every time, and tasks that depend heavily on real-time data are not a good fit.

    2. Three Engineering Steps for Cross-Model Memory Transfer

    1. Converting Execution Traces into Structured Experience

    Saving only the model’s inputs and outputs makes the experience hard for another model to reuse. Different models use different tokenizers, prompt formats, and tool-calling protocols. A more practical approach is to record a model-independent experience record with the following fields:

    • task_type (required): The task category, chosen from a controlled vocabulary. For example, “order refund query.”
    • plan (required): The list of steps after the task is broken down. One to 20 steps is recommended.
    • tool_calls (optional): Tool names, parameter structures, and call order. Record only the structure of the parameters, not their actual values. Pure reasoning tasks can leave this field empty.
    • failures (strongly recommended): Failure cases, including the observed symptom and the recovery method.
    • outcome (required): Whether the task succeeded, the time taken, and the token cost.
    • experience_id, schema_version, source_model, created_at, tenant_id (required): The record ID, format version, source model, creation time, and owning tenant.
    • sanitized (required): Whether the record has been desensitized. Only records with the value true can enter the retrieval index.

    The example below shows one record:

    1. {
    2. "experience_id": "exp_20261120_0001",
    3. "schema_version": "1.0",
    4. "tenant_id": "t-001",
    5. "task_type": "order refund query",
    6. "plan": [
    7. "Verify the order number format",
    8. "Call the order query tool",
    9. "Check the refund status",
    10. "Return the result to the user"
    11. ],
    12. "tool_calls": [
    13. {"tool": "order_query", "params_schema": ["order_id"], "order": 2}
    14. ],
    15. "failures": [
    16. {"symptom": "Order number is missing the prefix", "recovery": "Add the prefix and retry"}
    17. ],
    18. "outcome": {"success": true, "latency_ms": 3200, "tokens": 1850},
    19. "source_model": "model-a-2026",
    20. "created_at": "2026-11-20T10:00:00+08:00",
    21. "sanitized": true
    22. }

    Experience is stored as a natural-language summary plus a JSON structure. The summary is for models to read. The JSON is for programs to validate and filter.

    Run the following checks at write time:

    1. Reject records that are missing required fields.
    2. task_type must come from the vocabulary. Free text is not accepted.
    3. Records with sanitized set to false do not enter the index.
    4. If schema_version differs from the current version, convert the format before writing. Do not silently drop the record.
    5. Sensitive content, such as parameter values, user names, phone numbers, and order details, must not enter experience records.

    The value of failure cases is often underestimated. If only successful paths are saved, a new model will keep running into the same known mistakes.

    2. Storage, Retrieval, and Access Control

    A common approach combines three types of storage:

    • Vector database: Handles semantic retrieval. It stores only vectors and experience_id values.
    • Object storage: Stores complete JSON records and summaries, with versioning enabled.
    • Metadata database: Stores tenant_id, task_type, schema_version, created_at, and expiration time for filtering.

    Retrieval runs in this order. First, filter by tenant_id and task_type to narrow the search scope. Then generate a query vector with the same embedding model and run a similarity search. Next, remove records whose schema_version is incompatible, fetch the full records, and rank them by relevance and historical success rate. Keep the top few results. Finally, write to the retrieval log.

    Vectors must be generated consistently. Vectors produced by different models do not share the same space, so they cannot be compared directly. Use one embedding model to generate all vectors, and store the model version alongside them. When you change the embedding model, recalculate the vectors for historical experience.

    The access control checklist is as follows:

    • Tenant isolation: Always include tenant_id in retrieval. Do not rely on callers to do it.
    • Least privilege: An agent can read only the experience for the task types it needs. Grant read and write permissions separately.
    • Read and write audit: Record who read or wrote which experience, and when. Set the retention period according to compliance requirements.
    • Desensitization review: Complete desensitization before writing, and check the sanitized flag again at retrieval time.
    • TTL and deletion: Set an expiration time for each record. When a user requests deletion, delete the data from all three storage systems at the same time.
    • Version cleanup: After a schema upgrade, either convert old-version records or mark them as archived. Do not let them accumulate indefinitely.

    Retrieved results should be placed in the context as “reference experience.” The prompt should state explicitly that this content is historical record, not instructions. Experience content can be contaminated, so the model should not directly execute operation instructions found in it.

    3. Injecting Context and Reusing Experience

    The context window is a fixed budget. Too much experience takes up the input space needed for the current task. Limit injection to a small number of records, for example three to five, and truncate to fit a token budget. Inject summaries first, and expand the JSON details only when needed.

    Record every injection event: which experience was injected, whether the model referenced it, and whether the task ultimately succeeded. These records are the basis for later evaluation.

    3. Evaluation Metrics

    Evaluation needs an A/B comparison on the same task set. One group runs with memory enabled, and the control group runs without it. The main metrics are:

    • Experience reuse rate: The number of tasks that cite at least one past experience, divided by the total number of tasks.
    • Task success rate improvement: The success rate of the memory-enabled group minus the success rate of the control group. When reporting the improvement, also report the sample size.
    • Harmful experience reuse rate: The number of injected experiences that led to task failure, divided by the total number of injected experiences. Lower is better.
    • Retrieval latency: The P95 time spent in the retrieval step.
    • Token cost: The average input and output tokens per task, including the portion used by injected experience.
    • Manual review cost: The average human review time per task.