cs.AINov 1, 2026

Just-in-Time Skill Retrieval via Long-Horizon State Tracking

Authors: Xin Lin, Ziheng Wang, Zerui Chen, Jiayao Ma, Zhimin Wei, Bingshuai Liu, Buchao Zhan, Qinggang Zhang, 

Organizations: Xiamen University · Jilin University

Abstract

Large language model (LLM) agents increasingly rely on external skill libraries to support complex task execution. However, determining which skills are needed remains challenging in long-horizon tasks. Existing methods typically select a fixed skill set before execution, implicitly assuming that a task's procedural requirements can be determined from its initial description. This assumption is restrictive for long-horizon interaction, where new requirements emerge from intermediate observations, execution outcomes, and newly revealed constraints. This motivates just-in-time skill retrieval, which dynamically selects skills as execution unfolds. Just-in-time skill retrieval is promising but challenging: the utility of a skill depends not only on the current context, but also on the evolving task state shaped by prior steps. To this end, we propose JitSkill, a state-grounded framework that addresses this challenge through continuous task-state tracking. By connecting emerging requirements with accumulated task progress, JitSkill provides procedural support throughout execution without treating each retrieval decision independently. Experiments across three agent benchmarks demonstrate its effectiveness in improving long-horizon task completion. Our code is available at https://github.com/XMUDeepLIT/JitSkill.git/.

Figures & tables

Appendix figures & tables24 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. SKILL.state: Scalable Long-Horizon Agent Skills

    Aug 26, 2026Sanket Badhe, Priyanka Tiwari, Jonghyun ChungLong-Horizon Agent TasksLong-Horizon LLM Agents

  2. HiSkill: Empowering LLM Agents with Hierarchical Skill Graphs

    Jul 28, 2026Yu Hao, Jinxuan Cai, Qi Zhang +4LLM Agent Skill LearningLLM Agent Skill Retrieval

  3. Subagents vs Agent Skills: Executing Reusable Knowledge for Long-Horizon Agentic Tasks

    Sep 7, 2026Wasu Top Piriyakulkij, Rachel Lawrence, Alicia Curth +2LLM Agent OrchestrationLong-Horizon Agent Tasks