Banger paper from Salesforce AI Research on agent memory.
The overall finding is that you want to store raw trajectories and decide what to extract from them when the next task arrives, instead of summarizing each run when it ends.
Just-in-Time Memory uses a curator that reads the retrieved traces together with the new task and writes a short memory payload for that task. Because the payload is used right away, the curator can be trained on whether that same task succeeds.
On ALFWorld, WebShop and tau2-bench it beats the strongest baseline by 16.2, 16.3 and 3.9 success-rate points. Even the untrained curator matches or beats memory that is written when a task ends.