Manuscript Offprint

arXiv:2611.05036

ToolSpace: Scaling Tool-Centric Environment Synthesis for Long-Horizon Agents

Guanting Dong, Zhichao Sun, Xinyu Yang, Rui Wang, Xin Deng, Jiajie Jin, Zhixiong Yang, Junhao Huang, Han Han, Mingyu Ma, Xiaotao Wang, Yuyang Hu, Xiaoshuai Song, Xiaoxi Li, Jiejun Tan, Zhecan Wang, Shihan Dou, Honglin Guo, Zhiheng Xi, Tao Gui, Tao Ji, Qi Zhang, Yutao Zhu, Ji-Rong Wen, Zhicheng Dou

Guanting Dong 1,∗^{1,*}, Zhichao Sun 2,∗^{2,*}, Xinyu Yang 1,∗^{1,*}, Rui Wang 2^{2}, Xin Deng 2^{2}, Jiajie Jin 1^{1}, Zhixiong Yang 2^{2}, Junhao Huang 3^{3}, Han Han 2^{2}, Mingyu Ma 2^{2}, Xiaotao Wang 2^{2}, Yuyang Hu 1^{1}, Xiaoshuai Song 1^{1}, Xiaoxi Li 1^{1}, Jiejun Tan 1^{1}, Zhecan Wang 2^{2}, Shihan Dou 2^{2}, Honglin Guo 2^{2}, Zhiheng Xi 2^{2}, Tao Gui 2,†^{2,\dagger}, Tao Ji 2^{2}, Qi Zhang 2^{2}, Yutao Zhu 1^{1}, Ji-Rong Wen 1^{1}, Zhicheng Dou 1,†^{1,\dagger}

1^{1}Renmin University of China 2^{2}Fudan University 3^{3}Shanghai Jiao Tong University

∗^{*}Equal contribution. †^{\dagger}Corresponding authors.

Abstract

Large language models are deployed as long-horizon agents that compose diverse tools across MCP services into executable workflows. Existing MCP environment-scaling methods are data-centric: they first synthesize a database and scenario, then derive tools and tasks from them. As a result, tool interfaces may not match real ones, tool compositions are not grounded in execution, and tasks rarely span more than one environment. We propose ToolSpace, a tool-centric framework that reverses this order. ToolSpace mines data, state, and retry dependencies from adjacent calls in execution traces of real MCP services and open agent corpora, using deterministic rules rather than LLM judgment, and clusters the resulting weighted tool-composition graph into environments. Databases are synthesized only for state-mutating environments, while query and stateless tools replay recorded returns. ToolSpace then performs state-aware random walks with rollback and decompiles each chain into a natural-language task with assertion-based checks, keeping only samples that replay successfully from the initial state. Applied to AutomationBench and τ3\tau^{3}-Bench Banking, the pipeline produces harder Pro versions on which 7 frontier models drop by up to 38.2 points. Across seven long-horizon tool-use benchmarks, ToolSpace raises Qwen3.6-35B-A3B from 23.0 to 41.0 average score (43.2 with RL) and GLM-5.2 from 44.6 to 56.6, on par with Claude Opus 5. Ablations show that execution-witnessed edges clearly outperform LLM-judged ones, and performance keeps improving with data and environment scale.

Contact: dongguanting@ruc.edu.cn, dou@ruc.edu.cn

Project Page: https://toolspace-agent.github.io/

Github: https://github.com/dongguanting/ToolSpace

Models: https://huggingface.co/collections/dongguanting/toolspace

(a) The Philosophy of Tool Space

Figure

(b) Tool-Composition Graph and State-Aware Walks

(c) Generalization across 7 Benchmarks

Figure

(d) Performance on Pro Benchmarks

Figure

Figure 1: Overview of ToolSpace. (a) Design Philosophy: a tool space layer between agents and MCP environments. (b) The tool-composition graph with a state-aware walk. (c) Generalization across 7 benchmarks. (d) Performance on two Pro benchmarks.

1 Introduction

Recent advances have extended large language models (LLMs) from single-turn chatbots to collaborative agents that complete long-horizon tasks in dynamic environments (Patil et al., 2023; Qin et al., 2023; Schick et al., 2023; Yao et al., 2023). Such agents must not only master a scalable tool set, but also orchestrate diverse tools into executable long-horizon chains. Because tools are the atomic units of agent execution, how tools are organized and composed at scale has become a foundational question for expanding agent capability (Anthropic, 2024; Li et al., 2023; Song et al., 2023; Xu et al., 2025).

To scale tool use, recent work follows two main routes. One family, exemplified by Simia (Li et al., 2025) and GenEnv (Guo et al., 2025), treats the LLM as an implicit textual world model and generates simulated feedback from tool specifications and interaction histories. These methods are inexpensive, but their feedback is prone to hallucination and state consistency is difficult to guarantee. The second family explicitly reproduces interaction logic by synthesizing executable tools together with environment databases: it extracts or constructs an underlying database from a real service theme, generates matching tools, and synthesizes tasks with verifiable outcomes (Dong et al., 2026a; Fang et al., 2025; Song et al., 2026; Wang et al., 2026). Later systems further evolve whole interaction stacks or repair environments from execution feedback (Dong et al., 2026b; He et al., 2026; Mao et al., 2026).

Despite these advances, existing paradigms still follow Data-Centric Environment Synthesis: synthesize the underlying database and thematic scenario first, and only then derive tools and tasks. This ordering has three inherent limitations:

  • Tool-functionality mismatch. Executable tools are synthesized from the environment database and theme description, so their parameter logic easily diverges from real tool interface definitions. Agents consequently learn a synthetic tool protocol rather than operations transferable to a real tool ecosystem.
  • Inauthentic tool orchestration. Existing work builds tool-link graphs and synthesizes tasks through random linking or shallow LLM judgments, so the resulting links lack authenticity. Real tool services are moreover unstable and noisy, and their logical relations are hard to establish subjectively.
  • Lack of cross-environment task synthesis. Current task synthesis relies on the data and rules of a single environment, whereas real-world tasks routinely span several environments. Because tools are locked inside their own sandboxes, cross-environment composition has no explicit reachability relation, and long-horizon complexity cannot grow naturally.

Together, these limitations share a single root cause: Data-Centric Environment Synthesis presumes a realistically synthesized environment and derives tool composition from it, reversing the dependency that governs real agent execution. How to synthesize agent training data that preserves real tool orchestration across diverse environments therefore remains an open challenge.

Our starting point is that, within agent execution, tools are the atomic units of capability growth, not static environment data. As illustrated in Figure 1(a)–(b), a Tool Space that has not yet been explicitly modeled always lies between an agent and its underlying environment databases, and the relations among tools naturally connect an extensible environment ecosystem. A natural path is therefore to model the real connectivity and state transfer among tools, and to build a cross-environment tool-graph layer on top of these relations. The complexity of synthesized tasks then arises from expanding the real tool-composition space, rather than from the data scale of any single environment.

Following this insight, we propose ToolSpace, a tool-centric framework for cross-environment agent data synthesis. Unlike Data-Centric Environment Synthesis, ToolSpace does not mine a new environment ecosystem from scratch; it follows a Trace-to-ENV principle (Long et al., 2026; Wu et al.,

2026): it first reconstructs a scalable, explorable tool space from execution traces, then synthesizes long-horizon agent tasks across the tool and environment clusters connected in this space. ToolSpace consists of two stages:

  • Tool Space Exploration. We extract tool calls from real-world execution traces and mine data, state, and retry links with deterministic rules, building a scalable tool-composition graph. Tightly coupled tools are clustered into environment clusters; an underlying database is synthesized on demand only for operation environments, while original tool returns are reused directly otherwise. This preserves tool-composition relationships while substantially reducing environment synthesis cost.

  • Cross-Environment Verifiable Task Synthesis. Over the ToolSpace graph, State-Aware Random Walks with Rollback Sampling sample state-compatible successors by edge weight and execute them step by step, retaining only chains that execute end to end under runtime-observed state transitions. Each retained walk is then decompiled into a natural-language task with assertion-based verification scripts, yielding training samples that can be replayed and audited across environments.

To validate ToolSpace's ability to flexibly synthesize complex cross-environment tasks, we anchor the full pipeline to AutomationBench (Shepard and Salimans, 2026) and τ3\tau^3-Bench Banking (Shi et al., 2026), two long-horizon agent benchmarks and extend their difficulty, producing AutomationBench Pro and τ3\tau^3-Bench Banking Pro. The upgraded versions exceed the standard ones in task difficulty and number of environments crossed. On AutomationBench Pro, seven frontier models drop by up to 38.2 points relative to the standard version (Figure 1).

In summary, our main contributions are as follows:

  • We identify limits of data-centric synthesis: reverse-synthesized tools mismatch real tool semantics, tool graphs lack execution evidence, and tasks are confined to single-environment complexity; and we then propose Tool-Centric Environment Synthesis.

  • We propose ToolSpace, which reconstructs a scalable, explorable tool-composition space from real execution traces and synthesizes long-horizon, verifiable agent tasks across diverse tool and environment combinations within this space.

  • We show that ToolSpace plugs into long-horizon tool-use benchmarks, producing AutomationBench Pro and τ3\tau^3-Bench Banking Pro, which exceed their standard versions in difficulty, tool-call turns, and cross-environment breadth.

  • Across seven long-horizon tool-use benchmarks, experiments demonstrate clear advantages across model scales (8B–744B). ToolSpace-744B-A40B surpasses GPT 5.6 Sol in average score (56.6 vs. 48.9) and matches Claude Opus 5. Further analyses reveal clear scaling relationships of data scale, environment scale, and task diversity with agent performance.

References (40)