TL;DR
EnvCraft is an automated framework that synthesizes high-fidelity, stateful sandbox environments and training data for system-level AI agents ("Claw-like" agents). By generating 139 distinct environments and nearly 20,000 complex tasks, it enables scalable Agentic Reinforcement Learning (RL), boosting agent performance by up to 11.9% while significantly reducing inference token costs.
What Problem Does This Paper Address?
Large Language Models (LLMs) are rapidly shifting from passive conversational interfaces to autonomous digital assistants that manage long-horizon tasks across operating systems, file systems, and databases—often referred to as "Claw-like" agents. While Agentic Reinforcement Learning (RL) is a promising path for optimizing these agents through trial and error, progress is severely bottlenecked by a scarcity of interactive training environments.
Existing synthetic environments are mostly limited to simple, stateless tool-calling endpoints. They fail to replicate real-world system complexities like cross-environment execution, persistent workspace states, and asynchronous task loops. EnvCraft bridges this gap by automating the creation of low-latency, stateful, and cost-effective executable sandboxes.
Methods
EnvCraft introduces an end-to-end pipeline driven by two primary engines:
- Environment Synthesis Engine: This engine takes high-level natural language descriptions and expands them into granular environment and tool specifications. To ensure structural robustness, it maps these specifications to nine predefined "Interaction Archetypes" (e.g., transactional workspaces, cross-tool data pipelines). An LLM then programmatically generates a fully executable Python environment class. For system-level agents, it injects built-in Bash tools and co-synthesizes domain-tailored agent skills.
- Agentic RL Data Synthesis Engine: To create realistic tasks, EnvCraft models tool and environment dependencies as a bi-level directed graph. It uses a topology-aware hierarchical random walk to sample logically valid tool chains. LLMs then reverse-engineer these chains into multi-turn user intents that disclose information incrementally, alongside deterministic post-execution verification scripts to provide precise reward signals.
To guarantee high fidelity, all generated environments undergo a rigorous dual-stage quality control protocol consisting of static code analysis (AST parsing) and dynamic runtime testing, backed by an automated self-healing loop.
Datasets
The authors used EnvCraft to synthesize a massive dataset consisting of:
- 139 interactive environments (70 general-tool and 69 Claw-specific scenarios) spanning categories like Office & Collaboration, DevOps, and Travel & Finance.
- 19,777 tasks, split into
EnvCraft-Tool(14,215 general tool-use tasks) andEnvCraft-Claw(5,562 system-level tasks).
For evaluation, the framework was tested against established benchmarks: Claw-style agent benchmarks (PinchBench and ClawEval) and multi-turn tool-use benchmarks (BFCL-v3 and $\tau^2$-bench).
Key Insights and Ideas
- Stateful Workspaces Matter: Moving from isolated tool endpoints to persistent, stateful workspaces is essential for training system-level agents. General tool-use data alone provides minimal gains on complex system tasks.
- RL Breeds Efficiency: Reinforcement learning in these stateful environments doesn't just make agents more accurate; it teaches them to find shorter, more direct action paths, leading to a massive drop in token consumption.
- Cross-Domain Generalization: Training on specialized "Claw" workflows actually transfers robustly back to general tool-use capabilities without any performance degradation, proving that system-level training induces broader procedural reasoning.
Key Results
- Performance Boosts: Fine-tuning Qwen models using EnvCraft data yielded substantial improvements across the board. On PinchBench, Qwen3-8B saw a +11.91% increase in success rate, while Qwen3-32B and Qwen3.5-9B improved by +6.59% and +4.85% respectively.
- Token Efficiency: The average token cost per task plummeted by up to 35% for Qwen3-8B and 16% for Qwen3-32B, showing that the agents became significantly less verbose and more decisive.
- General Tool-Use Gains: On the general BFCL-v3 benchmark, Qwen3.5-9B achieved an +8.00% boost, matching or outperforming much larger commercial models.
Limitations and Future Work
- Simplified Abstractions: The synthesized environments are still clean sandboxes and may miss real-world deployment chaos like external-service failures, non-deterministic behaviors, or complex security constraints.
- LLM Bias Propagation: Because the synthesis pipeline relies heavily on LLM-generated specifications and verification scripts, errors or biases from the generator can cascade through the dataset.
- Subjectivity Constraints: The state-based deterministic verifiers are excellent for objective file/database mutations but struggle with tasks involving subjective quality or purely read-oriented goals.
Future work includes expanding evaluations to broader model families and testing within real production environments.
Summary updated