ToolSpace Builds Long-Horizon Agent Environments from Real Tool Traces
Introduction
Long-horizon agents need more than the ability to call individual tools. They must understand which calls depend on earlier results, how actions change the environment, and how a workflow can recover after failure. ToolSpace addresses this problem by reversing the usual order of environment synthesis: it begins with real tool usage and constructs the environment around executable tool compositions.
How ToolSpace works
- Mining dependencies from executions. The system analyzes traces from real MCP services and open agent corpora. Deterministic rules identify data, state, and retry dependencies between adjacent calls, producing a weighted tool-composition graph. These execution-witnessed edges are intended to reflect actual workflows more faithfully than links judged only by a language model.
- Generating environments on demand. The graph is clustered into environments. Databases are synthesized only when tools mutate state. Query-oriented and stateless tools can instead replay recorded returns, preserving observed interfaces while avoiding unnecessary database construction.
- Validating every task by replay. ToolSpace performs state-aware random walks over the graph, using rollback when needed. It then decompiles each executable chain into a natural-language instruction and assertion-based checks. A sample is retained only if it can replay successfully from the initial state.
Results
The pipeline was used to create harder Pro versions of AutomationBench and tau3-Bench Banking. On these versions, seven frontier models lost as much as 38.2 points, suggesting that conventional evaluations may not fully expose the difficulty of long-horizon tool composition.
Across seven long-horizon tool-use benchmarks, Qwen3.6-35B-A3B improved its average score from 23.0 to 41.0, reaching 43.2 with reinforcement learning. GLM-5.2 increased from 44.6 to 56.6, a result described as comparable to Claude Opus 5. Ablation results further indicate that edges supported by actual executions outperform LLM-judged edges, while performance continues to grow with the scale of data and environments.
Why it matters
ToolSpace connects authenticity, executability, and verification in one synthesis pipeline. Rather than merely producing a larger number of tasks, it creates workflows whose interfaces and transitions are grounded in observed tool behavior. This can support training data for supervised fine-tuning as well as mixed-environment reinforcement learning, while offering stricter tests of cross-tool planning.
The approach still depends on the breadth and quality of its source traces. If the collected workflows cover only a narrow set of services or failure modes, the resulting graph may inherit those limitations. Broader traces and further testing of cross-environment generalization will therefore remain important.
Source: Hugging Face Daily Papers
Comments
Checking sign-in status...
Loading comments...