Just-In-Time Agent Memory with Runtime Agentic Research

Bingyu Yan, Chaofan Li, Hongjin Qian, Shuqi Lu, Chaozhuo Li +1 more
9/28/2026
1 citation
cs.CLcs.AIcs.IR

Official code: VectorSpaceLab/general-agentic-memory (868 stars, Python, last commit 2026-03-14).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

A general memory system for agents, powered by deep-research

86889Python, JavaScriptOct 8, 20258 months ago

Similar Papers

Cite this paper

@article{yan2026justintime,
  title  = {Just-In-Time Agent Memory with Runtime Agentic Research},
  author = {Bingyu Yan and Chaofan Li and Hongjin Qian and Shuqi Lu and Chaozhuo Li and Zheng Liu},
  year   = {2026},
  eprint = {2609.34385},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.34385v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.34385.svg)](https://codeofpaper.com/paper/2609.34385)

Discussion