Most agentic memory systems curate experience at write time: after a task ends, its trajectory is distilled into a fixed artifact — a reflection, workflow, skill, or reasoning strategy — that is later retrieved by similarity. As a new paper, Just-in-Time Memory: Learning to Curate Task-Adaptive Memory for LLM Agents, notes, this forces the system to decide what is worth remembering before the future query is known, irreversibly discarding information and producing a query-independent summary that must serve many possible downstream tasks.
The authors argue that learning such a write-time curator is also difficult, because the value of a storage decision may only become apparent when a relevant query arrives, potentially many tasks later — a long-horizon credit-assignment problem.
Their alternative, Just-in-Time Memory (JitMem), retains raw trajectories and defers curation until read time, when the current task is known. Given retrieved traces and the new task, a memory curator synthesizes a compact, task-adaptive payload tailored to the immediate need. Because that payload is consumed on the same task, the curator can be trained directly from immediate task success, avoiding delayed utility signals and the need to artificially group related tasks.
Across ALFWorld, WebShop, and τ²-bench, JitMem consistently outperforms no-memory agents as well as heuristic and learned write-time memory methods, improving over the strongest baseline by 16.2, 16.3, and 3.9 absolute success-rate points, respectively.
Notably, even an untrained curator is already competitive with or surpasses these baselines, suggesting that task-adaptive read-time curation itself is a major source of the gain, while training the curator further compounds the improvement. The authors also report that a single curator transfers across executors.