Just-In-Time Agent Memory with Runtime Agentic Research

📅 2026-09-28
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the loss of fine-grained information inherent in traditional pre-constructed memory systems by proposing the JAM framework. This work introduces a pioneering just-in-time runtime memory mechanism that leverages query conditioning to enable dynamic context construction and efficient management. The framework integrates hierarchical page storage, iterative evidence retrieval, and a Memory-Gym data synthesis strategy, while employing supervised fine-tuning combined with Group Relative Policy Optimization for training. Experimental results demonstrate that JAM consistently outperforms ahead-of-time (AOT) systems across multiple benchmarks, achieving an effective balance between high performance and low computational overhead.
📝 Abstract
Memory is critical for AI agents. Many existing agent-memory systems follow an Ahead-of-Time (AOT) design, constructing memory before a specific request arrives. While this reduces online serving cost, such request-agnostic memory construction can discard fine-grained information that later becomes important. To address this limitation, we propose Just-In-Time Agent Memory (JAM), a trainable framework for query-conditioned context construction at runtime. A Memorizer preserves complete raw histories in a hierarchical page-store with compact navigational summaries, while a Researcher iteratively retrieves, inspects, and integrates evidence for each request. To train these memory-use behaviors, we introduce Memory-Gym, an evidence-grounded data synthesis pipeline covering nine task types across six domains, and optimize the Researcher through verified-trajectory supervised fine-tuning followed by Hint-guided Group Relative Policy Optimization. We demonstrate the effectiveness of JAM across a variety of benchmarks on agent memory and long-context processing, where it achieves stronger task performance than AOT-style memory systems while remaining substantially more efficient than prior trained agentic memory approaches. To support reproducibility and future research, we release our anonymized source code at https://github.com/VectorSpaceLab/general-agentic-memory.
Problem

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

AI agent memory
Ahead-of-Time memory
fine-grained information loss
Just-In-Time memory
query-conditioned context
Innovation

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

Just-In-Time Agent Memory
Runtime Context Construction
Memory-Gym
Group Relative Policy Optimization
Hierarchical Page-Store
🔎 Similar Papers
No similar papers found.
B
Bingyu Yan
Beijing Academy of Artificial Intelligence
Chaofan Li
Chaofan Li
Beijing University of Posts and Telecommunications
NLP
Hongjin Qian
Hongjin Qian
Peking University
LLMIRNLP
S
Shuqi Lu
Beijing Academy of Artificial Intelligence
Chaozhuo Li
Chaozhuo Li
Microsoft Research Aisa
Z
Zheng Liu
Beijing Academy of Artificial Intelligence, Hong Kong Polytechnic University