cs.CLMar 31, 2026

MemFactory: Unified Inference & Training Framework for Agent Memory

Authors: Ziliang Guo, Ziheng Li, Bo Tang, Feiyu Xiong, Zhiyu Li

Organizations: MemTensor

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 the evaluation sets, MemFactory improves performance over the corresponding base models on average, 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.

Figures & tables

Explore similar work

CardsList
  1. Are We Ready For An Agent-Native Memory System?

    Jun 23, 2026Wei Zhou, Xuanhe Zhou, Shaokun Han +5Agent MemoryLLM Agent Memory

  2. NextMem: Towards Latent Factual Memory for LLM-based Agents

    Feb 26, 2026Zeyu Zhang, Rui Li, Xiaoyan Zhao +4QuantizationLLM Agent Memory

  3. AdMem: Advanced Memory for Task-solving Agents

    Jun 5, 2026Runzhe Wang, Huilin Lu, Shengjie Liu +2Continual Learning for LLM AgentsLLM Agent Memory