The year/Independent research

Paper 2606.26790

OPID: On-Policy Skill Distillation for Agentic Reinforcement Learning

Published
Jun 2026
Research lab
Independent
Citations
8
GitHub
106 stars

01 In brief

Summary

OPID (On-Policy Skill Distillation) is a framework for agentic reinforcement learning that extracts hierarchical hindsight skills from completed on-policy trajectories to provide dense token-level supervision, complementing sparse outcome-based RL.

It represents trajectory hindsight as episode-level skills (global workflows or failure-avoidance rules) and step-level skills (local decision knowledge at critical timesteps).

A critical-first routing mechanism selects step-level skills at critical decisions and falls back to episode-level skills otherwise.

The selected skill is injected into the interaction history, and the old policy re-scores the same sampled response under both original and skill-augmented contexts.

The log-probability shift yields a token-level self-distillation advantage, combined with the outcome advantage for policy optimization.

Experiments on ALFWorld, WebShop, and Search-based QA show OPID generally improves agent performance, sample efficiency, and robustness over outcome-only RL and existing skill-distillation baselines.

OPID requires no external skill libraries, retrieval, or privileged context at inference time.

Ablations confirm the importance of hierarchical skills and critical-first routing.

Theoretical analysis shows the skill loss is a relative-KL surrogate, on-policy collection matches context distribution, and routing approaches oracle selection under specialization.

02 From the paper

Abstract

Outcome-based reinforcement learning provides a stable optimization backbone for language agents, but its sparse trajectory-level rewards provide little guidance on which intermediate decisions should be reinforced or suppressed. On-policy self-distillation offers dense token-level supervision, yet existing skill-conditioned variants often rely on external skill memories or retrieved privileged context, which are costly to maintain and can be mismatched with the state distribution induced by the current policy in multi-turn interaction. We propose \textbf{OPID} (\textbf{O}n-\textbf{P}olicy Sk\textbf{i}ll \textbf{D}istillation), a framework that extracts skill supervision directly from completed on-policy trajectories. OPID represents trajectory hindsight as hierarchical skills: episode-level skills capture global workflows or failure-avoidance rules, while step-level skills capture local decision knowledge at critical timesteps. A critical-first routing mechanism uses step-level skills when critical decisions are identified and falls back to episode-level skills as default guidance otherwise. The selected skill is injected into the interaction history, allowing the old policy to re-score the same sampled response under both original and skill-augmented contexts. The resulting log-probability shift yields a token-level self-distillation advantage, which is combined with the outcome advantage for policy optimization. OPID thus preserves RL as the primary training objective while introducing dense, distribution-matched hindsight supervision. Experiments on ALFWorld, WebShop and Search-based QA demonstrate that OPID generally improves agent performance, sample efficiency, and robustness over outcome-only RL and existing skill-distillation baselines. Our code is available at https://github.com/jinyangwu/OPID/tree/main.