Memex(RL): Scaling Long-Horizon LLM Agents via Indexed Experience Memory
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Large language model (LLM) agents are fundamentally bottlenecked by finite context windows on long-horizon tasks. As trajectories grow, retaining tool outputs and intermediate reasoning in-context quickly becomes infeasible: the working context becomes prohibitively long, eventually exceeds the context budget, and makes distant evidence harder to use even when it is still present. Existing solutions typically shorten context through truncation or running summaries, but these methods are fundamentally lossy because they compress or discard past evidence itself. We introduce Memex, an indexed experience memory mechanism that instead compresses context without discarding evidence. Memex maintains a compact working context consisting of concise structured summaries and stable indices, while storing full-fidelity underlying interactions in an external experience database under those indices. The agent can then decide when to dereference an index and recover the exact past evidence needed for the current subgoal. We optimize both write and read behaviors with our reinforcement learning framework MemexRL, using reward shaping tailored to indexed memory usage under a context budget, so the agent learns what to summarize, what to archive, how to index it, and when to retrieve it. This yields a substantially less lossy form of long-horizon memory than summary-only approaches. We further provide a theoretical analysis showing the potential of the Memex loop to preserve decision quality with bounded dereferencing while keeping effective in-context computation bounded as history grows. Empirically, on challenging long-horizon tasks, Memex agent trained with MemexRL improves task success while using a significantly smaller working context.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 40 of its 47 references that are in the map. First posted on arXiv 4 Mar 2026.
Builds on
40 of 47 references.
Closest ancestors · 14
Same direction, newest first
- 2025Memory in the Age of AI Agents15 Dec
- 2025AgentFold: Long-Horizon Web Agents with Proactive Context Management28 Oct
- 2025Scaling Long-Horizon LLM Agent via Context-Folding13 Oct
- 2025ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memory29 Sep
- 2025MemGen: Weaving Generative Latent Memory for Self-Evolving Agents29 Sep
- 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization16 Sep
- 2025Memory-R1: Enhancing Large Language Model Agents to Manage and Utilize Memories via Reinforcement Learning27 Aug
- 2025Memento: Fine-tuning LLM Agents without Fine-tuning LLMs22 Aug
- 2025MEM1: Learning to Synergize Memory and Reasoning for Efficient Long-Horizon Agents18 Jun
- 2025Memory OS of AI Agent30 May
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory28 Apr
- 2025In Prospect and Retrospect: Reflective Memory Management for Long-term Personalized Dialogue Agents11 Mar
2 more
Other references · 26
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2025Qwen3 Technical Reportcited by 8,195
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
- 2020ALFWorld: Aligning Text and Embodied Environments for Interactive Learningcited by 1,143
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,107
- 2023ExpeL: LLM Agents Are Experiential Learnerscited by 814
- 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 656
- 2023MemoryBank: Enhancing Large Language Models with Long-Term Memorycited by 539
- 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 502
- 2026Kimi K2.5: Visual Agentic Intelligencecited by 449
14 more
- 2024Agent Workflow Memorycited by 342
- 2024HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Modelscited by 273
- 2025MiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attentioncited by 248
- 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 235
- 2023RecMind: Large Language Model Powered Agent For Recommendationcited by 129
- 2024MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentationcited by 118
- 2025Seeing, Listening, Remembering, and Reasoning: A Multimodal Agent with Long-Term Memorycited by 88
- 2023RecurrentGPT: Interactive Generation of (Arbitrarily) Long Textcited by 84
- 2024From Isolated Conversations to Hierarchical Schemas: Dynamic Tree Memory Representation for LLMscited by 77
- 2023Think-in-Memory: Recalling and Post-thinking Enable LLMs with Long-Term Memorycited by 64
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2025M+: Extending MemoryLLM with Scalable Long-Term Memorycited by 51
- 2025Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Managementcited by 51
- 2026KLong: Training LLM Agent for Extremely Long-horizon Taskscited by 4
Built on by
Citing papers per year: 2026: 11.
11 papers.
- 2026Code as Agent Harnesscited by 40
- 2026PM-Bench: Evaluating Prospective Memory in LLM Agentscited by 6
- 2026Mem-π: Adaptive Memory through Learning When and What to Generatecited by 3
- 2026LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioceptioncited by 3
- 2026Latent Preference Modeling for Multi-Session Personalized Tool Callingcited by 2
- 2026From Memory to Skills: Evidence-Grounded Co-Evolution Governance for Long-Horizon LLM Agentscited by 2
- 2026Terminus-4B: Can a Smaller Model Replace Frontier LLMs at Agentic Execution Tasks?cited by 1
- 2026OPD-Evolver: Cultivating Holistic Agent Evolver via On-Policy Distillationcited by 1
- 2026MemChain: Learning Interpretable Memory Traces for Memory-Augmented LLM Agentscited by 1
- 2026Position: Life-Logging Video Streams Make the Privacy-Utility Trade-off Inevitablecited by 0
- 2026Ghost in the Context: Policy-Carriage Integrity in LLM Agentscited by 0
- 2026MemChain: Learning Interpretable Memory Traces for Memory-Augmented LLM Agents27 Jul 2026
- 2026From Memory to Skills: Evidence-Grounded Co-Evolution Governance for Long-Horizon LLM Agents18 Jul 2026
- 2026PM-Bench: Evaluating Prospective Memory in LLM Agents14 Jul 2026
- 2026LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioception29 Jun 2026
- 2026OPD-Evolver: Cultivating Holistic Agent Evolver via On-Policy Distillation16 Jun 2026
- 2026Mem-π: Adaptive Memory through Learning When and What to Generate20 May 2026
- 2026Code as Agent Harness18 May 2026
- 2026Position: Life-Logging Video Streams Make the Privacy-Utility Trade-off Inevitable11 May 2026
- 2026Terminus-4B: Can a Smaller Model Replace Frontier LLMs at Agentic Execution Tasks?4 May 2026
- 2026Ghost in the Context: Policy-Carriage Integrity in LLM Agents2 May 2026
- 2026Latent Preference Modeling for Multi-Session Personalized Tool Calling20 Apr 2026
Similar, not cited
Close in wording, no citation either way
- 2026MemTrain: Self-Supervised Context Memory Training
- 2026MemGym: a Long-Horizon Memory Environment for LLM Agents
- 2026MemCo: Memory-Centric Collaboration for Generalizing LLM Agents to Unseen Environments
- 2026Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model Agents
- 2026PRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning
- 2026MemToolAgent: Leveraging Memory for Tool Using Agents Based on Environment and User Feedback
- 2026AdMem: Advanced Memory for Task-solving Agents
- 2026SimpleMem: Efficient Lifelong Memory for LLM Agents