ScaleEnv: Scaling Environment Synthesis from Scratch for Generalist Interactive Tool-Use Agent Training

Dunwei Tu, Hongyan Hao, Hansi Yang, Yihao Chen, Yu Yang, Yueqing Sun, Xingchen Liu, Furao Shen, Qi Gu, Hui Su, Xunliang Cai

In the pursuit of developing "Generalist Agents"—AI systems capable of utilizing tools, managing databases, and solving complex, multi-step problems—researchers face a critical bottleneck: interactive training data. While trillions of text tokens exist for training Large Language Models (LLMs), there is a severe scarcity of interactive "sandboxes" where agents can practice taking actions, observing consequences, and refining strategies.

ScaleEnv: Scaling Environment Synthesis from Scratch for Generalist Interactive Tool-Use Agent Training introduces a novel framework to overcome this limitation. Rather than relying on manual environment construction or hallucination-prone LLM simulations, ScaleEnv programmatically synthesizes high-fidelity, code-grounded interactive environments and verifiable tasks entirely from scratch.

The Scalability vs. Realism Trade-off

To train a generalist agent via Reinforcement Learning (RL), the agent requires an environment that provides accurate feedback for its actions. Current approaches face significant drawbacks:

  1. Real-world APIs: Offer high realism but are slow, expensive, and pose safety risks (e.g., accidental data deletion).
  2. LLM-Simulated Environments: Highly scalable, but rely on text-based simulations. If the LLM hallucinates a state change, the agent learns flawed logic.
  3. Manual Synthetic Environments: Reliable and safe, but fundamentally unscalable due to the human labor required to code diverse toolsets.

ScaleEnv resolves this trade-off by utilizing LLMs to write executable code (Python and SQL) that defines the environment, followed by rigorous procedural testing to ensure functional reliability before agent training begins.

The ScaleEnv Methodology

The ScaleEnv pipeline operates through two synergistic phases to build robust training grounds:

1. Executable Graph Construction

The system initializes with a simple domain keyword (e.g., "Healthcare Telemedicine").

  • Schema Synthesis: An LLM defines the rules of the environment, including available tools and the underlying database schema.
  • Procedural Testing: To guarantee reliability, ScaleEnv employs a multi-agent system to write unit tests. If generated tool code fails or produces inconsistent database states, a "Debugger Agent" iteratively corrects it. This ensures the environment is grounded in executable logic rather than probabilistic text generation.
  • Dependency Mapping: The system constructs a Tool Dependency Graph, mapping out prerequisites for specific actions (e.g., an agent must execute search_patient before schedule_appointment).

2. Task Instantiation via Graph Expansion

To generate complex, solvable tasks, the system expands the verified environment:

  • Seed Tool Chains: The system samples a valid path of actions leading to a specific goal.
  • Distractor Data: The database is populated with irrelevant data, forcing the agent to practice information filtering.
  • Controlled Environment Expansion: Extra tools and database states are added so the agent can explore "off-path" actions without breaking the environment, ensuring interaction completeness.

Training and Evaluation

The researchers synthesized 16 unique domains comprising 2,560 tasks. They trained Qwen3 models on this data using Group Relative Policy Optimization (GRPO), an RL algorithm that enables the model to learn from its own exploration without requiring a separate teacher model for labeling.

To rigorously test generalization, the models were evaluated on strictly Out-of-Distribution (OOD) benchmarks, including $\tau^2$-Bench, VitaBench, and DeepPlanning.

Key Insights and Results

  • The Environment Scaling Curve: The study reveals that diversity outweighs quantity. Increasing the number of tasks within a single domain yields diminishing returns. However, scaling the number of distinct domains leads to a steady, monotonic improvement in the agent's ability to solve tasks in entirely unseen environments.
  • Significant Performance Gains: On the challenging cross-domain subset of VitaBench, the Qwen3-SE-32B model (trained with ScaleEnv) achieved a 10.8% success rate, more than doubling the 5.3% baseline of the base model.
  • Zero-Shot Mastery: Despite never encountering the specific tools or formats of $\tau^2$-Bench during training, ScaleEnv-trained models outperformed several significantly larger open-weights models.
  • Robust Verification: The framework demonstrated that rule-based reward systems (verifying the final database state via code) are far more effective and robust than "LLM-as-a-Judge" reward mechanisms.

Limitations and Future Directions

While ScaleEnv represents a major step forward, the authors note a few limitations. Because the synthesis pipeline is domain-agnostic, it lacks inherent safety gating and could theoretically generate malicious domains (e.g., phishing simulations) if unconstrained. Furthermore, while the system handles multi-turn interactions effectively, extremely long-horizon tasks requiring hundreds of steps remain a challenge for current LLM architectures. Future work will likely focus on integrating safety alignment directly into the procedural synthesis pipeline to ensure generated sandboxes remain both helpful and harmless.

Summary updated

BibTeX
@inproceedings{tu2026scaleenv,
  author = {Dunwei Tu and Hongyan Hao and Hansi Yang and Yihao Chen and Yu Yang and Yueqing Sun and Xingchen Liu and Furao Shen and Qi GU and Hui Su and Xunliang Cai},
  title = {{ScaleEnv: Scaling Environment Synthesis from Scratch for Generalist Interactive Tool-Use Agent Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=4GX4r1CYtD},
}
Figure