The paper proposes Just-In-Time (JAM), a trainable framework that builds query-specific context at runtime rather than pre-compressing histories. It consists of a Memorizer that preserves raw histories in a hierarchical page store with navigational summaries, and a Researcher that iteratively retrieves and integrates evidence for each request. The authors introduce Memory-Gym, a data synthesis pipeline covering nine task types across six domains, and optimize the Researcher via supervised fine-tuning followed by Hint-guided . Experiments show JAM achieves stronger task performance than Ahead-of-Time memory systems while being substantially more efficient than prior trained agentic memory approaches. The approach is notable because it reduces information loss by constructing context tailored to each request, and the provided training pipeline makes the agentic research process learnable.
Runtime research preserves details that prebuilt agent memories can lose
JAM stores complete histories, then trains an agent to assemble query-specific context when a request arrives.
Top University
Bingyu Yan · Chaofan Li · Hongjin Qian · Shuqi Lu · Chaozhuo Li · Zheng Liu
Beijing Academy of Artificial Intelligence · Peking University · Hong Kong Polytechnic University
Research Digest··2 min read
In one line
Just-In-Time Agent Memory constructs query-relevant context at runtime, outperforming Ahead-of-Time systems and prior trained memory.
Before you read this
Three ideas this paper builds onagent memoryA repository where an agent stores past interactions and outcomes to inform future decisions.241 papers →evidence retrievalPulling specific, relevant information from a large corpus to support an answer, decision, or reasoning step.115 papers →memory consolidationSummarizing or structuring past information to reduce token usage while preserving task accuracy.40 papers →
Read it as
Yan et al. introduce Just-In-Time Agent Memory, a framework that separates lossless history storage from request-time context construction.
The authors built JAM around two components.
How it works
before and afterThe Daily Edition
The front page in your inbox each weekday morning: the lead, the picks, and why each one earned its place.
What it released
Code