Reinforcement Learning for Self-Improving Agent with Skill Library

Jiongxiao Wang, Qiaojing Yan, Yawei Wang, Yijun Tian, Soumya Smruti Mishra, Zhichao Xu, Megha Gandhi, Panpan Xu, Lin Lee Cheong

This paper, a collaboration between the University of Wisconsin–Madison and AWS Agentic AI, introduces SAGE (Skill Augmented GRPO for self-Evolution), a reinforcement learning framework designed to help LLM-based agents build and reuse their own "skill libraries" to solve complex, multi-step tasks more efficiently.

TL;DR

SAGE is a novel reinforcement learning framework that trains LLM agents to autonomously create, validate, and reuse a library of executable code "skills." By using sequential task chains and a specialized reward function, SAGE enables agents to outperform state-of-the-art models like GPT-4o and OpenAI o1 on complex API-interaction benchmarks while using significantly fewer tokens and steps.

What Problem Does This Paper Address?

While Large Language Model (LLM) agents are excellent at reasoning, they are often "static." When deployed in a new environment, they don't naturally improve through experience. If an agent solves a complex task involving five different API calls, it usually has to "re-reason" that entire sequence from scratch the next time it encounters a similar problem.

Existing solutions use "skill libraries"—storing successful action sequences as reusable functions. However, most current methods rely on clever prompting (in-context learning), which is brittle and limited by the model's ability to follow complex instructions. This paper addresses the lack of a systematic, Reinforcement Learning (RL)-based approach to teach agents how to effectively evolve their own toolsets.

Methods

The authors build their framework on top of Group Relative Policy Optimization (GRPO), a recent RL algorithm (popularized by DeepSeek-V3/R1) that eliminates the need for a separate critic model, making it more efficient for training.

SAGE introduces two primary innovations:

  1. Sequential Rollout: Instead of training on isolated tasks, the agent is trained on a "chain" of related tasks. Skills generated and saved during the first task are carried over into the next. This allows the RL process to "see" if a skill created in Task A is actually useful for Task B.
  2. Skill-integrated Reward: Standard RL rewards agents only for finishing a task. SAGE adds extra "bonus" rewards for:
  3. Skill Generation: If a task is successful and the skill it created is used to solve a subsequent task.
  4. Skill Usage: If the agent successfully applies a previously learned skill to solve the current task.
  5. Unified Format: Following the "DynaSaur" approach, the agent is trained to always define a programmatic function (a skill) and then call it, rather than just calling raw APIs. This forces the agent to think in terms of reusable components.

Datasets

The researchers evaluated SAGE using AppWorld, a high-fidelity benchmark for "everyday" digital tasks.

  • Environment: Simulates 9 apps (Spotify, Amazon, Gmail, etc.) with 457 APIs and 100+ simulated users.
  • Structure: Tasks are grouped into "scenarios" (3 related tasks), which is ideal for testing how well skills transfer from one task to the next.
  • Splits: Training (105 tasks), Dev (60), Test-Normal (168), and Test-Challenge (417). The Challenge set includes APIs not seen during training, testing the agent's ability to generalize.

Key Insights and Ideas

  • RL as a Meta-Learner: The most significant insight is that RL shouldn't just optimize for the answer; it can optimize for the creation of tools. By rewarding the "utility" of a skill in future tasks, the agent learns to write code that is modular and reusable.
  • The Efficiency-Accuracy Trade-off: Using skills actually makes agents more "concise." Instead of a long chain of thought and multiple API interactions, the agent can simply call use_skill(login_and_search). This leads to a massive reduction in token usage.
  • SFT is the Starting Line: The authors found that raw open-source models (like Qwen-2.5-32B) struggle to manage a skill library via RL alone. They first had to perform Supervised Fine-Tuning (SFT) using "expert" trajectories (generated by Claude 3.5 Sonnet) to give the model a baseline understanding of how to structure skills.

Key Results

SAGE achieved state-of-the-art performance on AppWorld, notably outperforming much larger models:

  • Accuracy: On the Test-Normal set, SAGE achieved 60.7% Scenario Goal Completion (SGC), compared to 51.8% for a baseline GRPO agent and 32.1% for GPT-4o.
  • Efficiency: SAGE required 26% fewer interaction steps and generated 59% fewer tokens than the baseline GRPO agent.
  • Generalization: On the Test-Challenge set (unseen APIs), SAGE maintained a significant lead, achieving 32.4% SGC while the baseline GRPO managed only 26.9%.
  • Ablation: When the researchers manually emptied the skill library during testing, the agent's performance dropped, proving that the model wasn't just getting "smarter" generally—it was actively relying on the library it built.

Limitations and Future Work

  • Retrieval in the Wild: In these experiments, the agent knew which tasks were related (the "Same Scenario" setting). In real-world deployment, an agent would need a robust retrieval system to find the right skill among thousands. The authors tested basic embedding-based retrieval, but performance was lower than the "ideal" case.
  • Computational Cost: Sequential rollouts (running Task A then Task B) effectively double the training time and memory requirements compared to standard single-task RL.
  • Diversity of Tasks: The study focused exclusively on the AppWorld environment. Future work is needed to see if SAGE generalizes to other domains like web browsing or scientific discovery.

Summary updated

BibTeX
@inproceedings{wang2026reinforcement,
  author = {Jiongxiao Wang and Qiaojing Yan and Yawei Wang and Yijun Tian and Soumya Smruti Mishra and Zhichao Xu and Megha Gandhi and Panpan Xu and Lin Lee Cheong},
  title = {{Reinforcement Learning for Self-Improving Agent with Skill Library}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.69},
}
Figure