betaFeedback

WorksComputer Science

Composing Independently Distilled Memory and Retrieval Policies for Long-Term Agents

Abstract

Long-lived Web assistants require effective memory and retrieval mechanisms to access information from past user interactions. While these capabilities can be learned through specialized policies, it remains unclear whether specialists trained independently in different environments can be effectively composed without joint optimization. This paper investigates compositional transfer through policy distillation. Memory-writing and sequential retrieval policies are independently distilled from frontier-model action trajectories into 3B models and combined with a fixed answer generator without downstream training. On a LongMemEval-based benchmark, the distilled composition achieves 73.1% accuracy, compared with 36.2% for a composition of existing RL-trained specialists, and also outperforms the evaluated RL-trained compositions on PersonaMem-v2. Component ablations reveal that improvements in individual policies depend on their composition, highlighting the importance of cross-specialist compatibility. Further task-specific adaptation improves accuracy to 75.2% on LongMemEval through RL and 48.9% on PersonaMem-v2 through supervised distillation. These findings demonstrate the effectiveness of independent specialist distillation for modular multi-agent systems. Source code and datasets of teacher-generated memory-editing and retrieval trajectories are released to facilitate reproducibility and further research.

ACM Reference Format:

Grigorii Davydenko, Artem Sakhno, Igor Pavlov, Julia Belikova, Andrey Savchenko, Maksim Makarenko. 2026. Composing Independently Distilled Memory and Retrieval Policies for Long-Term Agents. Preprint. ACM, New York, NY, USA, 4 pages.

Introduction

Web assistants increasingly operate across multiple sessions, searching, browsing, and acting on behalf of users [3, 12]. Providing personalized assistance requires access to information unavailable on the open Web, including users’ preferences, past decisions, and corrections. Long-term conversational memory therefore becomes an essential part of the retrieval infrastructure: agents must decide what information to retain, how to retrieve relevant evidence from accumulated interactions, and when sufficient evidence has been collected to answer a query.

A modular approach decomposes these responsibilities into specialized policies: a memory writer determines what information persists [9], a retriever iteratively searches memory [2], and a reader generates answers from retrieved evidence. Prior work has explored reinforcement learning for memory construction [9], sequential retrieval [2, 8], and unified memory and answering architectures [6]. In parallel, multi-agent research has investigated specialist training, cooperation, and knowledge distillation [1, 4, 7], including approaches combining distillation and reinforcement learning within individual policies or predefined workflows [5, 10, 11].

However, an important question remains: can specialist policies trained independently in different environments be effectively composed without joint training? Independent training enables specialized capabilities to be developed and reused separately, potentially reducing the need for costly downstream optimization. Yet successful composition is not guaranteed. In long-term memory systems, the retriever operates over information selected and structured by the memory writer, making the effectiveness of each specialist dependent on its interaction with other components.

To investigate this question, memory-writing and sequential retrieval policies are independently distilled into 3B models using frontier-model action trajectories collected in separate environments. The resulting specialists are composed with a fixed answer generator without downstream training. Controlled component replacements examine their compositional transfer, while task-specific supervised distillation and retrieval-policy reinforcement learning are evaluated as subsequent adaptation strategies.

Accuracy–time trade-off plot comparing distilled and RL-trained systems

Figure 1. Accuracy–time trade-off on LongMemEval with a fixed GPT-6.1-sol reader. Without downstream adaptation, independently distilled specialists outperform the evaluated RL-trained compositions and approach GLM-5.3-Flash accuracy with 12.4× less processing time. The dashed line marks GPT-6.1-sol accuracy.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Preprint, Author version

© 2026 Copyright held by the owner/author(s). Publication rights licensed to ACM.

Experiments on LongMemEval and PersonaMem-v2 demonstrate the effectiveness of independent specialist distillation. Without downstream adaptation, the distilled composition achieves 73.11% accuracy on LongMemEval, compared with 36.23% for the composition of existing RL-trained specialists, and 40.31% on PersonaMem-v2, outperforming the evaluated RL-trained compositions. Component ablations reveal that the benefits of individual policies depend on their composition, highlighting the importance of cross-specialist compatibility. Further adaptation improves accuracy to 75.17% on LongMemEval through RL and 48.86% on PersonaMem-v2 through supervised distillation. These findings establish independent specialist distillation as a promising approach to constructing modular multi-agent systems. Source code and datasets of teacher-generated memory-editing and sequential retrieval trajectories are released to support reproducibility and further research.

Method

Specialist training and composition

Memory-writing and retrieval policies are distilled independently from frontier-model action trajectories collected in separate environments (Figure 2, I).

Figure 2. Overview of specialist training, composition, and task-specific adaptation. (I) Independent distillation: teacher memory edits and Wikipedia search trajectories supervise separate writer and retriever specialists. (II) Composition: the writer builds persistent memory from conversational sessions; the retriever searches it iteratively, and the reader answers from retrieved records. (III) Task adaptation: SFT adapts the writer first, then the retriever on teacher search traces over the resulting memory. RL updates only the retriever, keeping the writer and memory fixed. The reader remains fixed in both settings.

Memory writing. The teacher processes source chunks chronologically, observing each chunk and the history of previous memory actions before generating memory-edit operations. The original Mem-α\alpha framework [9] is retained, including its core, semantic, and episodic memory types, editing operations, and prompts.

Sequential retrieval. The retrieval policy follows the Search-R1 interface [2], with the prompt adapted to require reasoning at each search step. The teacher interacts with a Wikipedia search environment, observing the question, previous queries, and retrieved documents before issuing another search query or terminating retrieval.

Teacher trajectories are converted into observation–response pairs, and two separate copies of Qwen2.5-3B-Instruct are fine-tuned to imitate the corresponding actions. Both specialists preserve their original action interfaces and are trained independently. Composition. The distilled specialists are combined into a dialogue system without downstream training (Figure 2, II). The memory writer processes conversational sessions to construct a persistent memory store indexed by BM25. Given a question, the retriever iteratively searches this store until it decides to stop or exhausts the search budget. A fixed reader then generates an answer conditioned on the question and retrieved records.

Task-specific adaptation

Two adaptation strategies are investigated while keeping the reader fixed (Figure 2, III).

Supervised distillation. Additional teacher trajectories are collected on the downstream dialogue tasks. The memory writer is first adapted through supervised fine-tuning, followed by the retriever using teacher search trajectories over the resulting memory stores. Reinforcement learning. Only the retriever is adapted, while the memory writer and its constructed memory stores remain fixed. Starting from the distilled checkpoint, the retriever is optimized using Group Relative Policy Optimization (GRPO) with eight trajectories per question. The reward is final answer correctness.

MemoryRetrievalLongMemEval Accuracy (%)LongMemEval SearchesLongMemEval Memory (KB)LongMemEval Time (min)PersonaMem-v2 Accuracy (%)PersonaMem-v2 SearchesPersonaMem-v2 Memory (KB)PersonaMem-v2 Time (min)
Qwen2.5-3BQwen2.5-3B4.692.4313.123.133.021.3410.97.4
Mem-α\alphaSearch-R136.231.40175.413.032.790.86307.442.6
Mem-α\alphaCoRAG32.633.95175.412.636.493.91307.442.6
DistilledDistilled73.112.8494.37.540.313.36232.927.8
MemoChat64.221.00526.72.545.331.00564.04.9
Directly Adapted (SFT)54.081.5393.820.647.662.85131.710.3
Distilled & Adapted (RL)75.173.3594.37.745.493.82232.927.8
Distilled & Adapted (SFT)74.681.8485.18.648.863.22128.09.1
GLM-5.3-FlashGLM-5.3-Flash76.051.3097.092.754.952.26135.6158.3
GPT-6.1-solGPT-6.1-sol82.381.2196.729.354.782.71175.645.3

Table 1. Dialogue performance on LongMemEval and PersonaMem-v2. All systems use a GPT-6.1-sol reader. Searches is the mean number of search calls per question, averaged over users. Memory is the mean stored text per user in KB. Time is the mean total time per user for memory construction and retrieval, in minutes, excluding the reader. Local runs use one A100, or eight for GLM. Bold and underlined values indicate the best and second-best accuracy among non-frontier systems.

Experiments

Training and standalone evaluation

Both specialists are initialized from Qwen2.5-3B-Instruct and distilled from GPT-6.1-sol trajectories with medium reasoning effort. Memory training uses the Mem-α\alpha collection [9] with its original split of 445/150 train/test episodes. Retrieval uses Search-R1 data [2]: 5,700 training questions and 400 held-out questions, balanced across Natural Questions, HotpotQA, 2WikiMultiHopQA, and MuSiQue.

We first evaluate the specialists separately, before composition (Figure 3). The distilled retriever achieves 37.75% accuracy, compared with 35.75% for Search-R1 and 36.25% for CoRAG (both based on Qwen2.5-3B-Instruct). The distilled memory writer achieves 80.58%, compared with 74.79% for the released Mem-α\alpha [9] checkpoint base on Qwen3-4B. For a controlled comparison, we additionally trained Mem-α\alpha using the same Qwen2.5-3B-Instruct backbone as the distilled writer. This configuration achieved 9.51% accuracy on the original Mem-α\alpha test set, compared with 8.34% for the untrained model. Since this configuration did not yield a competitive baseline, subsequent comparisons use the officially released Mem-α\alpha checkpoint based on Qwen3-4B. GPT-6-luna with maximum reasoning effort serves as the judge for both standalone evaluations.

Standalone accuracy of retrieval and memory specialists before composition

Figure 3. Standalone accuracy of retrieval (left) and memory (right) specialists before composition.

Evaluating specialist composition

We evaluate conversational QA on 147 LongMemEval S questions covering three users and 370 official PersonaMem-v2 multiple-choice questions covering 20 users. Training and test sets have no overlapping sessions, including those repeated across users.

Table 1 compares three groups: (1) specialist compositions without downstream adaptation: Qwen2.5-3B-Instruct in both roles, the released Mem-α\alpha writer paired with Search-R1 [2] or CoRAG, and our independently distilled pair; (2) full systems: MemoChat, direct SFT of Qwen2.5-3B-Instruct without prior distillation, and our distilled pair with retriever-only RL or SFT of both specialists; and (3) frontier pipelines using GLM-5.3-Flash or GPT-6.1-sol for both memory writing and retrieval without task-specific fine-tuning. MemoChat (initialized from Qwen2.5-3B-Instruct) is fine-tuned separately for each benchmark using GPT-6.1-sol examples.

All systems share a GPT-6.1-sol reader with medium reasoning effort, supplied with all retrieved records; this replaces MemoChat’s answering stage.

Released specialists retain their original action interfaces. Sequential retrieval allows up to four searches per question, returning up to three records each. We report user-averaged accuracy, search counts, memory size, and runtime. LongMemEval answers are judged by GPT-6-luna with max reasoning effort and PersonaMem-v2 uses its official answer key.

Without downstream adaptation, the distilled pair achieves 73.11% accuracy on LongMemEval, compared with 36.23% for Mem-α\alpha + Search-R1. On PersonaMem-v2, the corresponding accuracies are 40.31% and 32.79%. The distilled pair also outperforms the MemoChat-based pipeline on LongMemEval. Among non-frontier systems, Distilled & Adapted (RL) achieves the highest LongMemEval accuracy, while Distilled & Adapted (SFT) achieves the highest PersonaMem-v2 accuracy at 48.86%. The distilled specialists therefore form an effective composition even without downstream adaptation.

Additional experiments

Sequential retrieval. Table 2 compares the RL-adapted retriever with single-query BM25 and an unadapted Qwen2.5-3B retriever over the same memory stores constructed by the distilled writer. While base Qwen2.5-3B performs iterative search (2.12 searches on average), it reaches only 64.92% accuracy—comparable to BM25 top-12 (65.16%) and above BM25 top-3 (59.22%). By contrast, the RL-adapted retriever achieves 75.17% using 3.35 searches (+10.25 pp over base Qwen2.5-3B), confirming that gains stem from learned query refinement rather than multiple search turns alone.

ConfigurationAccuracy (%)Searches
BM25 top-359.221.00
BM25 top-1265.161.00
Qwen2.5-3B64.922.12
Distilled & Adapted (RL)75.173.35

Table 2. Sequential retrieval versus single-query BM25 on LongMemEval. All configurations use the same memory and reader.

Component impact. Figure 4 isolates the effect of replacing each specialist while keeping the reader fixed. On LongMemEval, distilled retrieval reduces accuracy when paired with Mem-α\alpha (36.23% to 35.23%) but improves it substantially with distilled memory (63.05% to 73.11%). On PersonaMem-v2, distilled retrieval improves both compositions, whereas replacing the memory writer yields mixed results. The fully distilled pair achieves the highest accuracy among the four unadapted combinations on both benchmarks, highlighting the importance of cross-specialist compatibility.

Figure 4. Component impact ablation. Single-specialist replacements show uneven transfer, whereas pairing both distilled specialists maximizes accuracy on both benchmarks.

Memory source for retriever SFT adaptation. The default SFT procedure first adapts the memory writer, then trains the retriever on teacher trajectories over the adapted writer’s stores. Using teacher-written stores instead reduces accuracy by 0.89 percentage points on LongMemEval and 2.82 percentage points on PersonaMem-v2 (Figure 5). This suggests that matching the memory distributions encountered during retriever training and inference is important for effective adaptation.

Effect of the memory source used for retriever SFT

Figure 5. Effect of the memory source used for retriever SFT. Both variants use the adapted student writer at evaluation.

Conclusion

This work demonstrates that independently distilled memory-writing and retrieval policies can be effectively composed into a multi-agent system without joint training. The distilled specialists outperform the evaluated compositions of existing RL-trained policies on LongMemEval and PersonaMem-v2. Component ablations reveal that downstream performance depends on cross-specialist compatibility, rather than individual policy quality alone. Further adaptation through supervised distillation and reinforcement learning provides additional improvements, although a gap to frontier models remains, particularly in personalization. These findings highlight independent specialist distillation as a promising approach to building modular multi-agent systems and motivate further research into compositional generalization.

References

  1. [1]Biddut Sarker Bijoy, Mohammad Saqib Hasan, Pegah Alipoormolabashi, Avirup Sil, Aruna Balasubramanian, and Niranjan Balasubramanian. 2025. PROgressive Sub-task Training for Pareto-Optimal Multi-agent Systems Using Small Language Models. In IJCNLP. 3357–3375. doi:10.18653/v1/2025.ijcnlp-long.179
  2. [2]Bowen Jin, Hansi Zeng, Zhenrui Yue, Jinsung Yoon, Sercan Arik, Dong Wang, Hamed Zamani, and Jiawei Han. 2025. Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning. arXiv preprint arXiv:2503.09516 (2025).
  3. [3]Hideaki Joko, Shubham Chatterjee, Andrew Ramsay, Arjen P De Vries, Jeff Dalton, and Faegheh Hasibi. 2024. Doing personal LAPS: LLM-augmented dialogue construction for personalized multi-session conversational search. In SIGIR. 796–806.DOI
  4. [4]Woongkyu Lee, Junhee Cho, and Jungwook Choi. 2026. MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLM. In EACL Findings. 6569–6596. doi:10.18653/v1/2026.findings-eacl.346DOI
  5. [5]Weizhen Li, Jianbo Lin, Zhuosong Jiang, Jingyi Cao, Xinpeng Liu, Jiayu Zhang, Zhenqiang Huang, Qianben Chen, Weichen Sun, Qiexing Wang, Hongxuan Lu, Tianrui Qin, Chenghao Zhu, Yi Yao, Shuying Fan, Xiaowan Li, Tiannan Wang, Pai Liu, King Zhu, He Zhu, Dingfeng Shi, Piaohong Wang, Yeyi Guan, Xiangru Tang, Minghao Liu, Yuchen Eleanor Jiang, Jian Yang, Jiacheng Liu, Ge Zhang, and Wangchun Zhou. 2025. Chain-of-Agents: End-to-End Agent Foundation Models via Multi-Agent Distillation and Agentic RL. arXiv preprint arXiv:2508.13167 (2025).arxiv.org/abs/2508.13167
  6. [6]Junru Lu, Siyu An, Mingbao Lin, Gabriele Pergola, Yulan He, Di Yin, Xing Sun, and Yunsheng Wu. 2023. MemoChat: Tuning LLMs to Use Memos for Consistent Long-Range Open-Domain Conversation. arXiv:2308.08239 https://arxiv.org/abs/2308.08239
  7. [7]Chanwoo Park, Seungju Han, Xingzhi Guo, Asuman E. Ozdaglar, Kaiqing Zhang, and Joo-Kyung Kim. 2025. MAPoRL: Multi-Agent Post-Co-Training for Collaborative Large Language Models with Reinforcement Learning. In ACL. 30215–30248. doi:10.18653/v1/2025.acl-long.1459DOI
  8. [8]Liang Wang, Haonan Chen, Nan Yang, Xiaolong Huang, Zicheng Dou, and Furu Wei. 2025. Chain-of-Retrieval Augmented Generation. arXiv preprint arXiv:2501.14342 (2025).arxiv.org/abs/2501.14342
  9. [9]Yu Wang, Ryuichi Takanobu, Zhiqi Liang, Yuzhen Mao, Yuanze Hu, Julian McAuley, and Xiaojian Wu. 2025. Mem-α: Learning Memory Construction via Reinforcement Learning. arXiv preprint arXiv:2509.25911 (2025).arxiv.org/abs/2509.25911
  10. [10]Ziwei Wang, Junjie Zheng, Leyang Yang, Sheng Zhou, Xiaoxuan Tang, Fang Zhouhua, Zhiwei Liu, Dajun Chen, Yong Li, and Jiajun Bu. 2026. Towards Scalable Lightweight GUI Agents via Multi-role Orchestration. In ACL Findings. 22359–22388. doi:10.18653/v1/2026.findings-acl.1122DOI
  11. [11]Zhongkai Yu, Yichen Lin, Chenyang Zhou, Yuwei Zhang, Kun Zhou, Junxia Cui, Haotian Ye, Zhengding Hu, Zaifeng Pan, Ruiyi Wang, Yujie Zhao, Hejia Zhang, Jingbo Shang, Jishen Zhao, and Yufei Ding. 2026. Multi-Agent Training via Reinforcement Learning for Enhanced RTL Generation. arXiv preprint arXiv:2605.12857 (2026).arxiv.org/abs/2605.12857
  12. [12]Pengfei Zhang, Guojia An, Jin Huang, Yuhan Yang, Yang Yang, and Jie Zou. 2026. Not All Information Brings Benefits: Personalization-Driven Agent Debate for Conversational Recommendation. In Web Conference. ACM, 5843–5852.DOI

Paper details

vlnc:W_7bsr2gr3
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents