From History to State: Constant-Context Skill Learning for LLM Agents

Haoyang Xie, Xinyuan Wang, Yancheng Wang, Puda Zhao, Feng Ju

arXiv:2605.05413 · 2026-05-08 공개 · arXiv · PDF

Abstract

Large language model (LLM) agents are increasingly used to operate browsers, files, code and tools, making personal assistants a natural deployment target. Yet personal agents face a privacy-cost-capability tension: cloud models execute multi-step workflows well but expose sensitive intermediate context to external APIs, while local models preserve privacy but remain less reliable. Both settings also pay repeatedly for long skill prompts and growing histories. We propose constant-context skill learning, a context-to-weights framework for recurring agent workflows: reusable procedures are learned in lightweight task-family modules, while inference conditions only on the current observation and a compact state block. A deterministic tracker renders this state block from task progress and supplies aligned subgoal rewards, so each module can be trained with step-level SFT and refined through online RL. Across ALFWorld, WebShop, and SciWorld, our agents achieve strong performance across Qwen3-4B, Qwen3-8B and Llama-3.1-8B. With Qwen3-8B, SFT+RL reaches 89.6\% unseen success on ALFWorld, 76.8\% success on WebShop, and 66.4\% unseen success on SciWorld. They match or exceed strong published agent-training results while reducing prompt tokens per turn by 2--7$\times$ relative to controlled ReAct prompting baselines, showing that procedural context can be moved from prompts into weights.

한국어 요약

📋 한 줄 요약

**[LLM 에이전트/RL]** 길어지는 히스토리·스킬 프롬프트를 가중치로 옮겨 매 턴 일정한 컨텍스트만 사용하는 "constant-context skill learning" 프레임워크를 제안하고, 3개 에이전트 벤치마크에서 토큰을 2–7배 줄이면서 SOTA급 성능을 달성한다.

🎯 핵심 기여도

💡 핵심 아이디어

긴 스킬 프롬프트와 누적 히스토리를 매 턴 다시 읽히는 비용을 없애려면, 그 절차적 지식을 모델 가중치로 흡수하고 추론 시에는 일정 길이의 상태 표현만 입력하면 된다. 결정적 tracker가 작업 진행을 상태로 렌더링해 RL 보상까지 자동으로 정렬한다.

🔬 기술적 접근법

📊 주요 결과

💭 의의 및 한계

**의의**: 긴 컨텍스트 의존을 줄여 로컬·온디바이스 에이전트의 비용·프라이버시 문제를 동시에 완화하는 실용 경로를 제시. **한계**: tracker의 결정적 렌더링이 task-family 설계에 의존하며, 새로운 도메인에서는 state block 설계 비용이 발생.

🚀 실용적 활용