Learning Reusable Agent Subroutines from Experience
summary
The gist
The gist The central result is that induced libraries outperform the very agent that generated their traces by tens of percentage points across various subtasks, showing that recovered reasoning
In short
The method identifies recurring reasoning procedures within successful agent traces and synthesizes them into a reusable library of agent subroutines called reasoning primitives. This induced library, which is a typed inventory of recurring moves, outperforms the original agent's performance across various tasks by significant margins. It proves that recovered reasoning structure can be more reliable than the source policy itself.
Key concepts
- Reasoning Primitive Induction
- A single-pass method that mines successful agent traces. It clusters recurrent reasoning moves and converts them into a compact library of typed pseudo-tools. This library is not a workflow but a reusable vocabulary of recurring moves an agent uses across different task instances.
- Reasoning Primitive
- A defined unit, represented as (name, signature, description). It is essentially a typed pseudo-tool with no handwritten logic. The signature constrains how the agent can call it, while the description provides natural language semantics for its specific task.
- Induced Library
- The synthesized artifact resulting from induction. It is a typed inventory of recurring reasoning moves extracted from traces. This library allows agents to compose these primitives freely inside a standard ReAct loop at test time, acting as an emergent property of how the agent reasons.
- Typed Pseudo-tools
- The format in which the induced primitives are exposed. These are typed callables registered within a ReAct action space. They contain no task-specific logic but carry a fixed input/output signature and a natural language docstring, making them human-readable and auditable.
Terminology used across episodes
This episode discusses
- Learning Reusable Agent Subroutines from Experience · Paper Radio
- Internalizing LLM Reasoning via Discovery and Replay of Latent Actions
- Watch Your Steps: Observable and Modular Chains of Thought
- Semi-structured LLM Reasoners Can Be Rigorously Audited
- NATURAL PLAN: Benchmarking LLMs on Natural Language Planning
- Voyager: An Open-Ended Embodied Agent with Large Language Models
- RLAD: Training LLMs to Discover Abstractions for Solving Reasoning Problems
- SkillWeaver: Web Agents can Self-Improve by Discovering and Honing Skills
The paper
Learning Reusable Agent Subroutines from Experience · Read on arXiv
Zhihan Lei, Jiarui Yan, Joshua Momo, William W. Cohen
Carnegie Mellon University
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: Today's paper: "Learning Reusable Agent Subroutines from Experience".
Jane: The gist The central result is that induced libraries outperform the very agent that generated their traces by tens of percentage points across various subtasks,
Tom: First, who's behind it and why it matters.
Title and authors: Tom: They summarize how they take successful ReAct rollouts and run them through four stages to build this library of primitives. First, they filter for correctness, then extract the per-step thought strings, categorize those thoughts using LLMs, and finally synthesize the top K as these typed primitives.
Jane: So they’ve got this pipeline where one LLM call does the naming and clustering of moves, and another LLM call helps group synonyms into five to ten canonical categories if there are more than ten unique labels >
Lu: The central result they show is that induced libraries outperform the very agent that generated those traces, specifically by showing gains like plus forty-four percentage points on RuleArena NBA and plus thirty percentage points on MUSR team allocation >
Meng: Forty-four points is a lot of difference, so if this holds up under real traffic loads, it’s significant. But what about the setup? They use a single fixed configuration across five different subtasks for these comparisons >
Lalam: They even showed that this single fixed configuration beats zero-shot Chain-of-Thought on every subtask and matches or surpasses expert-authored decompositions in terms of performance >
The paper's summary: Tom: The paper highlights a few key improvements over just having an agent generate its own sequence of steps. First, they moved the primitives into reasoning space rather than environment-grounded action space, which changes how they interact with the agent loop >
Jane: That means these primitives are not fixed workflows you have to follow; instead, the agent composes them freely inside a standard ReAct loop at test time >
Lu: They also emphasize that this induction process is a single pass with no online iteration, no MCTS, and no activation steering signals, which places them in a different regime compared to other approaches >
Meng: That’s good—no complex online iteration means faster discovery. But I wonder about the cost. The paper mentions that the per-instance compute for this reasoning primitive induction is around twenty-four percent cheaper than its closest competitor, AWM, which uses about one hundred seventeen thousand tokens versus one hundred fifty-four thousand tokens >
Lalam: They also show that even when using a smaller model like Gemini Flash Lite, the pattern of the source agent outperforming the induced library still holds true across different model families >
The paper's improvements: Tom: So to wrap up, this paper on "Learning Reusable Agent Subroutines from Experience" shows that we can discover reasoning structure without needing expert authoring. They've created typed callables with natural-language docstrings that are inspectable and editable inside a ReAct loop >
Jane: It suggests that instead of baking these routines into model weights, you get an emergent property of how an agent reasons across different instances of a task family >
Lu: The main implication is that this training-free, single-pass route to discovering reasoning structure has previously required expert authoring and now it can be found automatically >
Meng: For deployment, the paper notes that you should pair this induction with human review of the synthesized library and ongoing validation against external ground truth. You can't just drop these in blind >
Lalam: It’s a way to make the agent’s reasoning vocabulary human-readable and individually auditable, which is valuable for high-stakes domains where you need to know exactly how it arrived at a decision >
Conclusion: Tom: So we've covered "Learning Reusable Agent Subroutines from Experience." Basically, they show that instead of just having an agent solve one problem, you can extract its successful reasoning moves and turn them into reusable tools for a whole family of tasks >
Jane: Right. It's about moving those transient scratchpads out of the agent's memory and making them permanent, typed callables that the agent can just plug in whenever it needs that specific type of reasoning >
Lu: The core idea is Reasoning Primitive Induction, a single-pass method where you mine successful ReAct traces, cluster those moves into a library of pseudo-tools based on their frequency >
Meng: I'm still thinking about the deployment side. This sounds like it creates an external knowledge base for the agent. What's the real friction here compared to just feeding it more context?
Lalam: It’s not just context; these are typed callables with natural-language docstrings that have zero handwritten task logic inside them, which makes them really auditable >
Tom: That’s a big deal for inspection. The results are pretty solid on the numbers. They outscore the agent they were trained on by forty-four percentage points on RuleArena NBA and thirty points on MUSR team allocation >
Jane: Forty-four is a significant gap, Tom. It suggests that this recovered structure is actually more reliable than the source policy itself, which is pretty interesting for how we view agent performance >
Lu: I think it’s because this mechanism does implicit aggregation of representative thoughts from many successful rollouts to write a corpus-level specification for each move >
Meng: Forty-four points is a lot. But what about the cost? If this induction process is more expensive than just running the agent normally, it doesn't help us deploy it at scale >
Tom: Well, they did look at that. They found that per-instance compute for this induction method is around twenty-four percent cheaper than a close competitor, AWM >
Lalam: And they showed that even when using a smaller model like Gemini Flash Lite, the pattern of the source agent outperforming the induced library still holds true across different model families >
Jane: So what does this mean for us as people who are just listening? It means we can discover expert-level reasoning structures without needing someone to manually write all those specific steps first >
Tom: Exactly. This training-free, single-pass route to discovering structure has previously required a lot of manual work from experts, and now it seems like we can automate that discovery process >
Lu: The main implication is that this automated discovery of reasoning structure means we don't need those massive expert decompositions anymore if the agent learns how to build its own better tools >
Meng: For deployment, I still think you have to pair this induction with human review of the synthesized library and ongoing validation against external ground truth. You can't just drop these in blind >
Lalam: It’s a way to make the agent’s reasoning vocabulary human-readable and individually auditable, which is valuable for high-stakes domains where you need to know exactly how it arrived at a decision >
Tom: So to wrap up, this paper on "Learning Reusable Agent Subroutines from Experience" shows we can discover reasoning structure without needing expert authoring. They've created typed callables with natural-language docstrings that are inspectable and editable inside a ReAct loop >
More episodes
- 2602.08353-TKGB: A Comprehensive Benchmark for Temporal Knowledge Graph Forecasting
- 2603.00578-Draft-Thinking: Learning Efficient Reasoning in Long Chain-of-Thought LLMs
- 2603.06977-NePPO: Near-Potential Policy Optimization for General-Sum Multi-Agent Reinforcement Learning
- 2603.09200-The Reasoning Trap -- Logical Reasoning as a Mechanistic Pathway to Situational Awareness
- 2603.21854-Reasoning or Rhetoric? An Empirical Analysis of Moral Reasoning Explanations in Large Language Models
- 2603.23678-PLACID: Privacy-preserving Large language models for Acronym Clinical Inference and Disambiguation
- 2603.28317-Mapping data literacy trajectories in K-12 education
- 2604.05656-SnapFlow: One-Step Action Generation for Flow-Matching VLAs via Progressive Self-Distillation
- 2604.10834-LLMs for Qualitative Data Analysis Fail on Security-specificComments in Human Experiments
- 2604.13993-Reward Design for Physical Reasoning in Vision-Language Models