MemFactory: Unified Inference & Training Framework for Agent Memory

πŸ“… 2026-03-31
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This work addresses the fragmentation and task-specific customization prevalent in existing memory-augmented agents by proposing the first unified framework for their training and inference. The framework abstracts memory operations into plug-and-play atomic components, enabling flexible, Lego-like composition, and natively integrates a multi-dimensional reward–based reinforcement learning strategy for policy optimization. Designed with modularity at its core, it is compatible with state-of-the-art paradigms such as Memory-R1, RMM, and MemAgent, and introduces a novel Group Relative Policy Optimization (GRPO) algorithm. Experimental results on MemAgent demonstrate performance improvements of up to 14.8% over prior methods in both in-domain and out-of-domain evaluations.
πŸ“ Abstract
Memory-augmented Large Language Models (LLMs) are essential for developing capable, long-term AI agents. Recently, applying Reinforcement Learning (RL) to optimize memory operations, such as extraction, updating, and retrieval, has emerged as a highly promising research direction. However, existing implementations remain highly fragmented and task-specific, lacking a unified infrastructure to streamline the integration, training, and evaluation of these complex pipelines. To address this gap, we present MemFactory, the first unified, highly modular training and inference framework specifically designed for memory-augmented agents. Inspired by the success of unified fine-tuning frameworks like LLaMA-Factory, MemFactory abstracts the memory lifecycle into atomic, plug-and-play components, enabling researchers to seamlessly construct custom memory agents via a "Lego-like" architecture. Furthermore, the framework natively integrates Group Relative Policy Optimization (GRPO) to fine-tune internal memory management policies driven by multi-dimensional environmental rewards. MemFactory provides out-of-the-box support for recent cutting-edge paradigms, including Memory-R1, RMM, and MemAgent. We empirically validate MemFactory on the open-source MemAgent architecture using its publicly available training and evaluation data. Across both in-domain and out-of-distribution evaluation sets, MemFactory consistently improves performance over the corresponding base models, with relative gains of up to 14.8%. By providing a standardized, extensible, and easy-to-use infrastructure, MemFactory significantly lowers the barrier to entry, paving the way for future innovations in memory-driven AI agents.
Problem

Research questions and friction points this paper is trying to address.

Memory-augmented LLMs
Reinforcement Learning
Unified Framework
Memory Management
AI Agents
Innovation

Methods, ideas, or system contributions that make the work stand out.

MemFactory
memory-augmented agents
modular framework
Group Relative Policy Optimization
unified training and inference
πŸ”Ž Similar Papers
No similar papers found.