Up and Down the Abstraction Ladder: Code-Based Skills for Language Agents
On the map: LLM agents and tool use → Agent skill learning and evolution also fits: Reinforcement learning for LLM agents
Abstract (arXiv)
Language agents struggle to act and learn in environments that require long sequences of low-level actions. Code-based abstractions can make these agents more productive by letting them invoke reusable skills instead of repeatedly selecting individual actions. The code handles recurring local decisions, while the language model decides which skills to use and how to combine them. Yet abstractions are leaky, and situations beyond a skill's capabilities may require a return to primitive actions. Motivated by this tradeoff between productivity and flexibility, we systematically study how code-based action abstraction affects the performance, inference cost, and learning of language agents. We study this in NetHack, a challenging, long-horizon game environment, using CodeHack, our library of code-based skills with natural-language descriptions. We use this library to compare agents restricted to primitives with those using semantic skills alone or in combination with primitives. We evaluate these agents in three settings: zero-shot prompting, supervised fine-tuning, and reinforcement learning. Across a broad zero-shot evaluation on NetHack, we find that compared with primitives, skills nearly triple game progression, while reducing inference cost per episode by 86%. Combining skills with primitives retains much of this benefit while preserving a path back down to low-level actions. Finally, in RL, we find that skill-based agents learn significantly faster than agents acting on primitives, achieving a 7.2x larger average gain in dungeon level over the same training budget. These results show that a supplied skill library can improve performance, efficiency, and learning, while retaining primitives provides flexibility when the library is insufficient. We release CodeHack together with training and evaluation code.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Agent skill learning and evolution, one of 16 directions in LLM agents and tool use. Builds on 42 of its 52 references that are in the map. First posted on arXiv 25 Sep 2026.
Builds on
42 of 52 references.
References · 42
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
- 2022Do As I Can, Not As I Say: Grounding Language in Robotic Affordancescited by 2,348
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
- 2025Gemma 3 Technical Reportcited by 1,824
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,386
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,210
- 2024OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environmentscited by 1,195
- 2025OpenAI GPT-5 System Cardcited by 989
- 2018Diversity is All You Need: Learning Skills without a Reward Functioncited by 752
30 more
- 2023VoxPoser: Composable 3D Value Maps for Robotic Manipulation with Language Modelscited by 750
- 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 571
- 2018Data-Efficient Hierarchical Reinforcement Learningcited by 455
- 2016The Option-Critic Architecturecited by 448
- 2019Dynamics-Aware Unsupervised Discovery of Skillscited by 313
- 2020The NetHack Learning Environmentcited by 198
- 2024BALROG: Benchmarking Agentic LLM and VLM Reasoning On Gamescited by 146
- 2023HIQL: Offline Goal-Conditioned RL with Latent States as Actionscited by 141
- 2019Fast Task Inference with Variational Intrinsic Successor Featurescited by 133
- 2017A Laplacian Framework for Option Discovery in Reinforcement Learningcited by 110
- 2023Motif: Intrinsic Motivation from Artificial Intelligence Feedbackcited by 102
- 2021MiniHack the Planet: A Sandbox for Open-Ended Reinforcement Learning Researchcited by 97
- 2017Meta Learning Shared Hierarchiescited by 93
- 2023METRA: Scalable Unsupervised RL with Metric-Aware Abstractioncited by 86
- 2024Metacognitive Capabilities of LLMs: An Exploration in Mathematical Problem Solvingcited by 84
- 2026SWE-Skills-Bench: Do Agent Skills Actually Help in Real-World Software Engineering?cited by 82
- 2019Why Does Hierarchy (Sometimes) Work So Well in Reinforcement Learning?cited by 68
- 2020Language as a Cognitive Tool to Imagine Goals in Curiosity-Driven Explorationcited by 68
- 2023Language Models as Zero-Shot Trajectory Generatorscited by 60
- 2024From LLMs to Actions: Latent Codes as Bridges in Hierarchical Robot Controlcited by 35
- 2020Data-efficient Hindsight Off-policy Option Learningcited by 31
- 2020Options of Interest: Temporal Abstraction with Interest Functionscited by 30
- 2024MaestroMotif: Skill Design from Artificial Intelligence Feedbackcited by 24
- 2024Fine-tuning Reinforcement Learning Models is Secretly a Forgetting Mitigation Problemcited by 23
- 2025Discovering Temporal Structure: An Overview of Hierarchical Reinforcement Learningcited by 22
- 2024Playing NetHack with LLMs: Potential & Limitations as Zero-Shot Agentscited by 17
- 2025Trust Region Masking for Long-Horizon LLM Reinforcement Learningcited by 16
- 2023NetHack is Hard to Hackcited by 11
- 2023Scaling Laws for Imitation Learning in Single-Agent Gamescited by 11
- 2023diff History for Neural Language Agentscited by 6
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Agent Skills for Large Language Models: Architecture, Acquisition, Security, and the Path Forward
- 2026SkillComposer: Learning to Evolve Agent Skills for Specification and Generalization
- 2026From Raw Experience to Skill Consumption: A Systematic Study of Model-Generated Agent Skills
- 2026CodeSkill: Latent Skill Abstraction for Long-Horizon Code Agents
- 2026SPT: Skills as Pre-Training Data for Agentic Language Models
- 2026SKILLER: Language-Level Reinforcement Learning for Reusable Skill Extraction in Small Language Models
- 2026Rep2Skill: Representation-Guided Skill Self-Evolution for LLM Agents
- 2026SkillAdam: Stable and Efficient Skill Evolution for Agents