Just-in-Time Memory: Learning to Curate Task-Adaptive Memory for LLM Agents
The paper introduces Just-in-Time Memory (JitMem), a memory approach that retains raw trajectories instead of summarizing them at write-time. When a new task arrives at read-time, the memory curator synthesizes a compact, task-adaptive payload tailored specifically to the immediate need. This design avoids long-horizon credit assignment problems and allows training the curator directly from immediate task success signals. Experiments across ALFWorld, WebShop, and τ^2-bench show JitMem consistently outperforms heuristic and learned write-time memory methods.
Across ALFWorld, WebShop, and τ^2-bench, JitMem improves over the strongest baseline by 16.2, 16.3, and 3.9 absolute success-rate points, respectively.
Even an untrained curator is already competitive with or surpasses these baselines, showing that task-adaptive read-time curation itself is a major source of the gain.