Just-In-Time Reinforcement Learning: Continual Learning in LLM Agents Without Gradient Updates

Yibo Li, Zijie Lin, Ailin Deng, Xuan Zhang, Yufei He +3 more
1/26/2026
cs.LGcs.AI

Official code: liushiliushi/JitRL (59 stars, last commit 2026-04-06).

Abstract

While Large Language Model (LLM) agents excel at general tasks, they inherently struggle with continual adaptation due to the frozen weights after deployment. Conventional reinforcement learning (RL) offers a solution but incurs prohibitive computational costs and the risk of catastrophic forgetting. We introduce Just-In-Time Reinforcement Learning (JitRL), a training-free framework that enables test-time policy optimization without any gradient updates. JitRL maintains a dynamic, non-parametric memory of experiences and retrieves relevant trajectories to estimate action advantages on-the-fly. These estimates are then used to directly modulate the LLM's output logits. We theoretically prove that this additive update rule is the exact closed-form solution to the KL-constrained policy optimization objective. Extensive experiments on WebArena and Jericho demonstrate that JitRL establishes a new state-of-the-art among training-free methods. Crucially, JitRL outperforms the performance of computationally expensive fine-tuning methods (e.g., WebRL) while reducing monetary costs by over 30 times, offering a scalable path for continual learning agents. The code is available at https://github.com/liushiliushi/JitRL.

View on arXivView PDF

Code Implementations(1)

liushiliushi/JitRLOfficial100%
593PythonJan 25, 20266 months ago

Similar Papers

Cite this paper

@article{li2026justintime,
  title  = {Just-In-Time Reinforcement Learning: Continual Learning in LLM Agents Without Gradient Updates},
  author = {Yibo Li and Zijie Lin and Ailin Deng and Xuan Zhang and Yufei He and Shuo Ji and Tri Cao and Bryan Hooi},
  year   = {2026},
  eprint = {2601.18510},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.18510v1}
}

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/2601.18510.svg)](https://codeofpaper.com/paper/2601.18510)

Discussion