Just-in-Time Memory: Learning to Curate Task-Adaptive Memory for LLM Agents
Yefan Zhou, Yang Li, Zeyu Leo Liu, Semih Yavuz, Shafiq Joty
Salesforce AI Research
Published September 23, 2026 · on the feed September 24, 2026 · ▲ 36 · arXiv 2609.27334
The abstract
Agentic memory systems reuse past experience to improve future performance, yet most existing designs curate memory at write time: once a task is completed, its trajectory is distilled into a fixed artifact, such as a reflection, workflow, skill, or reasoning strategy, that is later retrieved by similarity. 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. 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, creating a long-horizon credit-assignment problem. We instead retain raw trajectories and defer curation until read time, when the current task is known. Given the retrieved traces and the new task, a memory curator synthesizes a compact, task-adaptive payload tailored to the immediate need. Because this 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 τ^2-bench, our Just-in-Time Memory (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, showing that task-adaptive read-time curation itself is a major source of the gain; training the curator further compounds the improvement.
The Brief
2:52A short podcast summary of the paper. Written and voiced by AI.
Transcript
Just-in-Time Memory. Learning to Curate Task-Adaptive Memory for LLM Agents. By Yefan Zhou and four others, from Salesforce AI Research. Published on the twenty-third of September. No code repository is linked to it.
Agentic memory systems reuse past experience to improve future performance, but most existing designs curate memory at write time. Once a task is completed, its trajectory is distilled into a fixed artifact, such as a reflection, a workflow, a skill or a reasoning strategy, and later retrieved by similarity. That forces the system to decide what to keep before the future query is known. Information is discarded irreversibly, and what remains is a query-independent summary that has to serve many possible downstream tasks.
Learning such a curator is difficult for a second reason. The value of a storage decision may only become apparent when a relevant query arrives, potentially many tasks later. That makes it a long-horizon credit-assignment problem. The curator makes a choice now and is only told much later whether it was a good one, if it is told at all.
Just-in-Time Memory, or JitMem, moves curation to read time. Raw trajectories are retained as they are. When a new task arrives, a memory curator takes the retrieved traces together with that task, and synthesizes a compact payload adapted to the immediate need. Nothing is thrown away in advance. The summarizing still happens, but only once it is known what the summary is for.
The same timing is what makes the curator trainable. The payload is consumed on the task it was built for, so the curator can be trained directly from immediate task success. That avoids delayed utility signals, and it avoids the need to group related tasks artificially. The contrast with write-time curation is direct. There, the payoff of a decision arrives many tasks later. Here, it arrives on the same task, in the same episode. Did the agent succeed with this payload or not? That answer is available at once.
JitMem is evaluated on ALFWorld, WebShop and tau squared bench. It consistently outperforms agents with no memory, as well as heuristic and learned write-time memory methods. Over the strongest baseline, it improves the absolute success rate by sixteen point two points on ALFWorld, sixteen point three on WebShop, and three point nine on tau squared bench.
Even an untrained curator is already competitive with those baselines or better, which points to task-adaptive curation at read time as a major source of the gain in itself. Training the curator then compounds the improvement. So the design choice and the training each contribute. Moving curation to read time does much of the work before any learning, and learning adds more on top.
The shift is from summarizing for every possible future to summarizing for the one that has arrived. Waiting until read time keeps the raw record intact, and it turns a credit-assignment problem spread over many tasks into one that resolves on the task at hand.
Paper Quest · 7 chapters · about 39 min
Play this paper
Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.
Chapter 1 🧩 · The problem
Every memory system must choose what to keep. Here the choice comes too early.
You build an assistant that solves task after task and should learn from its past runs. The usual design: after each task, boil the run down to a short lesson and store that.
The road ahead
- 1 · The problem ~6 min Boiling each finished run down to a short lesson forces you to guess what future tasks will need, and you learn much later whether the guess was right.
- 2 · What came before ~3 min
- 3 · The key idea ~8 min Keep raw runs and write a short, task-specific briefing only when a new task arrives, so nothing is lost early and feedback comes at once.
- 4 · Choose your own research ~3 min
- 5 · Build the method ~8 min Store whole runs, fetch the relevant ones for a new task, have the curator write a briefing, then use it on that task.
- 6 · The experiment ~6 min You’ll guess: On ALFWorld, by how many absolute success-rate points did JitMem beat the strongest baseline?
- 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Free, with Google or an email address. Your stars and progress are kept.