Paper 2606.06087
LatentSkill: From In-Context Textual Skills to In-Weight Latent Skills for LLM Agents
- Published
- Jun 2026
- Research lab
- Independent
- Citations
- 2
- GitHub
- 27 stars
01 In brief
Summary
LatentSkill is a framework that converts textual agent skills into plug-and-play LoRA adapters via a pretrained hypernetwork, storing skill knowledge in weight space rather than context space.
This removes per-step skill tokens from prompts while preserving modular loading, scaling, and composition.
On ALFWorld, LatentSkill improves success by 21.4 and 13.4 points on seen and unseen splits with 64.1% fewer prefill tokens; on Search-QA, it improves exact match by 3.0 points with 72.2% lower skill-token overhead.
The generated skill LoRAs exhibit structured semantic geometry, can be precisely controlled via the LoRA scaling coefficient, and can be composed through parameter-space arithmetic when skill components are aligned.
The framework is trained via document pretraining and trajectory-supervised fine-tuning, and it shows robustness to skill text perturbations and prompt-level attacks compared to in-context skills.
02 From the paper
Abstract
Agent systems increasingly use textual skills to encode reusable task procedures, but injecting these skills into the prompt at every step incurs substantial context overhead and exposes skill content as plaintext. We present LatentSkill, a framework that converts textual skills into plug-and-play LoRA adapters through a pretrained hypernetwork. LatentSkill stores skill knowledge in weight space rather than context space, removing per-step skill tokens while preserving modular loading, scaling, and composition. On ALFWorld and Search-QA, LatentSkill outperforms the corresponding in-context skill baseline while using substantially fewer prefill tokens: it improves ALFWorld success by 21.4 and 13.4 points on the seen and unseen splits with 64.1% fewer prefill tokens, and improves Search-QA exact match by 3.0 points with 72.2% lower skill-token overhead. Further analysis shows that generated skill LoRAs form a structured semantic geometry, can be precisely controlled via the LoRA scaling coefficient, and can be composed through parameter-space arithmetic when skill components are aligned. These findings suggest that weight-space skills provide an efficient, modular, and less exposed substrate for extending LLM agents.