FlexA-Mem: Budget-Adaptive Agentic Memory for LLM Agents
Wujiang Xu, Jiaojiao Han, Xi Zhu, Qizheng Zhang, Kaiqu Liang, Yutong Yin, Kai Mei, Dimitris N. Metaxas
Abstract
Large language model (LLM) agents work in scenarios with very different memory needs. A question about past conversations needs the exact facts it names, while a multi-step task needs a trace of the steps already taken together with details that the next step cannot name. Existing memories are each designed and tested for one kind of scenario. Retrieval memories such as A-Mem miss steps that the current query does not express, summaries drop exact strings, and pairing the two fixes the split of the budget in advance. We propose FlexA-Mem, a general memory that writes each unit of history once into an immutable store and renders a fresh memory for every call. The rendered memory is a compact timeline of records plus detail that a fixed rule fits into the remaining room without an LLM call. The detail is either relevant units as raw text or excerpts or the verbatim pieces that best match the query. With one store, FlexA-Mem serves both kinds of scenario. On AppWorld challenge tasks at 4k, it outperforms the second-best method by 11.5%, and on 147 unused tasks with predictions fixed in advance it outperforms A-Mem with a summary by 12.2%. On LongMemEval and LoCoMo, it matches a dedicated keyword retriever that writes no memory, while memories built on text written by an LLM fall far behind at tight budgets. Ablations show that the timeline carries AppWorld completion, whereas recovery mainly saves steps there and decides accuracy on exact facts. Code is available at https://github.com/WujiangXu/Flex-Amem
Create a lesson
Related papers
Adaptive Retrieval, Selective Answers: Evaluating Conformal Factuality in Agentic RAG
Shared title terminologycs.CLMuhammad Aimal Rehman, Chi-Kuang Yeh
Memory Tax: Dissecting the Net Value of Agent Memory
Shared title terminologycs.CLXuan He, Sining Zhoubian, Ruozhen Yang et al.
DraMaze: A Multi-Agent Pipeline with Future-Aware Memory for Diverse Microdrama Script Generation
Shared title terminologycs.CLSiyang He, Qiqi Wang, Fan Liu et al.
SPECMEM: Accelerating Agentic Tool Calling via Live Memory Management
Shared title terminologycs.CLZihe Song, Wenting Zhao, Ye Liu et al.
fork() for Agents: Agent Kernel for Non-blocking LLM Orchestration
Shared title terminologycs.CLAnkit Chadha, Pratyay Banerjee
SecondChance: Benchmarking Reliable Error Recovery in AI Agents
Shared title terminologycs.CLAtahan Dokme, Adar Avsian, Larry Heck