TL;DR
This paper introduces ReCreate, a novel framework that automates the creation of specialized Large Language Model (LLM) agents by learning from their interaction experiences. Instead of relying on costly trial-and-error guided by performance metrics, ReCreate uses an "agent-as-optimizer" approach to analyze agent failures and successes, generating targeted scaffold improvements that lead to significantly better performance than human-designed agents.
What Problem Does This Paper Address?
The paper tackles the challenge of creating specialized LLM agents for diverse real-world tasks. Currently, most agents are human-designed, which is labor-intensive and difficult to scale. Existing automated methods often treat agent creation as a black-box optimization process, relying solely on final performance metrics. This approach overlooks crucial insights into why an agent succeeds or fails, leading to inefficient development and high computational costs. The core question is: can we automatically create and adapt domain-specific agents in the wild, moving beyond human-designed limitations?
Methods
ReCreate introduces an "agent-as-optimizer" framework that learns from agent interaction experiences. This framework has three key components:
- Experience Storage and Retrieval: A mechanism to store and efficiently retrieve detailed interaction histories (trajectories, execution logs, environment states) for on-demand inspection. This allows the ReCreate-Agent to pinpoint specific evidence.
- Reasoning-Creating Synergy Pipeline: This pipeline enables the ReCreate-Agent to analyze the retrieved experience, reason about the causes of success or failure, and then generate concrete edits to the agent's scaffold (prompts, workflows, tools).
- Hierarchical Updates: To prevent overfitting to individual tasks, ReCreate uses a hierarchical update mechanism. Instance-level improvements are first buffered and then aggregated into reusable, domain-level patterns, ensuring generalization.
The overall process is framed as a bi-level optimization, mimicking how human experts iteratively refine systems.
Datasets
The authors evaluated ReCreate on a diverse set of benchmarks across four domains:
- Software Engineering (SWE): SWE-bench Verified (Django, SymPy)
- Data Science (DS): DA-Code (Data Wrangling, Machine Learning, Statistical Analysis), DS-1000 (NumPy, Pandas, Matplotlib)
- Mathematics (Math): MATH (Algebra, Number Theory, Counting & Probability), AIME24, AIME25
- Digital Assistance: AppWorld (Normal, Challenge)
Key Insights and Ideas
- Experience is King: The paper strongly advocates for leveraging rich interaction experience (trajectories, logs, feedback) over just final performance metrics. This experience provides the "why" behind agent behavior, enabling more targeted and effective scaffold improvements.
- Agent-as-Optimizer: Framing the agent creation process as an "agent-as-optimizer" allows for a more sophisticated and autonomous approach to scaffold refinement, moving beyond simple prompt tuning or tool learning.
- Scaffolds Gate Capabilities: The research highlights that even with a powerful base LLM, the agent's performance is significantly gated by its scaffold. ReCreate demonstrates that improving scaffolds can unlock substantial performance gains that human-designed scaffolds miss.
- Generalization through Hierarchy: The hierarchical update mechanism is crucial for ensuring that learned improvements generalize across tasks and don't just overfit to specific instances.
Key Results
- Superior Performance: ReCreate consistently outperformed human-designed agents and existing automated agent generation methods across all tested domains and benchmarks.
- Significant Gains: On average, ReCreate improved overall scores by over 5% compared to the strongest competing methods and over 7% compared to agent generation methods. Notable gains were observed in DS, Math, and Digital tasks.
- Efficiency: ReCreate was significantly more cost-efficient than methods like ADAS, reducing costs by 36-82% due to its ability to converge faster with less data and fewer iterations.
- Robustness: The framework showed stable performance across different sampling temperatures for the ReCreate-Agent, indicating its robustness.
- Model Agnostic: ReCreate's scaffold edits captured generalizable patterns rather than being specific to a particular LLM, as demonstrated by its strong performance across different base models (Gemini-2.5-Flash, GPT-40-mini).
Limitations and Future Work
The authors acknowledge two main limitations:
- Scope of Optimization: ReCreate currently focuses on optimizing agent scaffolds at the textual and code levels (prompts, reasoning, tools). It does not extend to infrastructure adaptations (harnesses, environments).
- Base Model Parameters: ReCreate does not update the base LLM parameters. Combining scaffold optimization with model fine-tuning is a promising but computationally expensive direction for future work.
Future work could explore integrating these scaffold patterns with model fine-tuning for even greater performance gains.
Summary updated