Skip to content

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

THE ARGUMENT

The atomic unit of environment synthesis should be tool compositions witnessed by real executions, not a database fabricated first — reversing the order is what lets task difficulty and cross-environment breadth grow.

On this page

You have a batch of execution logs bought from an MCP vendor, and your team must decide whether those logs alone can be turned into training data for a long-horizon agent. The default recipe is to invent a business scenario, build a database, then derive tools and tasks from it. That works on paper, but the resulting agent breaks on a real service, because what it learned is a homemade tool protocol rather than a real interface. ToolSpace flips the order: first find out which tools are actually called one after another in the wild, then work backwards to whatever environments are needed [1].

Building the database first distorts three things

The paper calls the prevailing recipe Data-Centric Environment Synthesis and writes it out formally: sample a theme m, synthesize an underlying database D ~ p(D|m), synthesize tools F_e ~ p(F_e|D,m) conditioned on theme and database, then synthesize tasks q ~ p(q|D,F_e) [1]. The weakness is not any single step; it is the ordering.

  • Tool–functionality mismatch: executable tools are reverse-derived from a fabricated database and theme text, so their argument logic easily diverges from real interface definitions. The agent learns a synthetic tool protocol rather than operations that transfer.
  • Inauthentic orchestration: existing work builds tool-link graphs by random linking or shallow LLM judgment. Real services are unstable and noisy, so the logical relations are hard to establish subjectively.
  • No cross-environment task synthesis: tasks are drawn inside one environment's data and rules, while real tasks routinely span several environments. Tools stay locked in their own sandboxes and cross-environment reachability is undefined.

All three share one root cause: the unit of scaling is the environment, so which tools may compose is fixed before any task is drawn. ToolSpace starts from the opposite premise — tools are the atomic units of capability growth, not static environment data — and inserts an explicit tool space layer between the agent and the underlying environment databases.

Three stages: collect traces, build the graph, walk replayable chains

Stage one collects execution traces, because all the evidence comes from there. Two source families are merged. MCP-ecosystem trajectories start from a real tool catalog pulled from a registry such as Smithery; only tasks whose tool definitions exactly match real servers are kept, executed by diverse agents on live MCP services (a standard interface that lets models call external services), and recorded as full call chains. Web-sourced trajectories are grouped by execution provenance and filtered progressively harder as authenticity drops [1].

  • High — real-server interaction: Toucan-1.5M covers 495 MCP servers, 2,000+ tools and 1.5M trajectories, with synthetic instructions but real executions; ToolBench/ToolLLM covers 16,464 RapidAPI interfaces and roughly 469K API calls, with unavailable interfaces removed.
  • Medium — real-workspace interaction: trajectories from SWE-agent and OpenHands running in real containers and repositories, keeping only explicit tool calls and excluding shell wrappers such as execute_bash.
  • Low — synthetic-tool trajectories: only calls whose tool names and schema formats match real tools are retained.

Stage two organizes the traces into a typed tool-composition graph. A node is a tool plus its normalized argument configuration, so the same tool called with different arguments yields different nodes, since outputs and downstream dependencies may differ. Edges between adjacent calls are extracted by deterministic rules, with no LLM judgment, in three types:

  • Data dependency: the later call's input actually uses a value from the earlier return, and field types match.
  • State dependency: the earlier call mutates an environment object and the later one reads or further mutates the same object, not merely an equal value.
  • Retry dependency: the earlier call returns an error, the trajectory switches tools, and the next call succeeds; such errors are treated as recoverable.

Tools are then clustered into environments by edge density. The cost saving is explicit: a database is synthesized only for state-mutating environments, while query and stateless tools replay recorded returns. Stage three performs state-aware random walks with rollback, sampling state-compatible successors by edge weight and executing them step by step, keeping only chains that run end to end. Each retained chain is decompiled into a natural-language task with an assertion-based check script, and only samples that replay from the initial state s0 and pass the state, trace and output checks survive [1].

Up to 38.2 points lost on Pro, average score from 23.0 to 41.0

The pipeline is anchored to two long-horizon agent benchmarks, AutomationBench and τ³-Bench Banking, and pushes their difficulty up to produce AutomationBench Pro and τ³-Bench Banking Pro. Both exceed the standard versions in task difficulty and in the number of environments crossed. On AutomationBench Pro, seven frontier models drop by up to 38.2 points relative to the standard version [1]. That figure is a gap between the original and the hardened set, not an ability score — it measures how much harder the synthesized tasks became.

SubjectBaselineWith ToolSpaceNote
Qwen3.6-35B-A3B (average over seven long-horizon tool-use benchmarks)23.041.0 (43.2 with RL)Same model trained on the synthesized data
GLM-5.2 (same seven benchmarks)44.656.6Reported as on par with Claude Opus 5
ToolSpace-744B-A40B—56.6Against GPT 5.6 Sol at 48.9
Seven frontier models (AutomationBench Pro)standard versiondrop of up to 38.2 pointsA difficulty measure, not a ranking

The gains are reported across model scales from 8B to 744B. ToolSpace-744B-A40B reaches 56.6 average, above GPT 5.6 Sol at 48.9 and level with Claude Opus 5 [1]. For evaluators, the relevant detail is that the seven benchmarks themselves were not swapped out — only the training data changed — so the gain cannot be attributed to contested items leaking into the test set.

Ablations: execution-witnessed edges beat LLM-judged ones, and scaling keeps helping

Two ablation findings matter most. First, edges witnessed by execution clearly outperform edges judged by an LLM, which lands directly on the root cause named earlier: relations between tools should be settled by run records, not by model opinion. Second, performance keeps improving with data scale and environment scale, with no obvious saturation point reported [1]. The payoff therefore comes from scalable synthesis capacity rather than one-off tuning.

When not to use ToolSpace

First, it depends on real execution traces. If you have no live MCP logs and only data produced inside synthetic environments, the graph edges collapse back into subjective judgment — the variant the ablation shows is worse. Second, databases are synthesized only for state-mutating environments, while query and stateless tools replay recorded returns; those tools are therefore pinned to what was recorded at that moment, which distorts services whose responses are time-sensitive or stochastic. Third, every sample must replay from the initial state s0, so anything that fails replay is discarded and coverage is limited for services that are not reproducible.

Fourth, AutomationBench Pro and τ³-Bench Banking Pro are harder versions. A 38.2-point drop shows difficulty went up, but it is not the production distribution; if you use these sets for model selection, you are measuring extrapolated difficulty, not field performance. Fifth, the reported scaling gains keep rising, but only within the 744B parameter range and the data and environment scales given in the paper — whether the curve holds beyond that is not answered by this material [1].

References

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

Sign in to Padda

A code in your inbox. No password to remember.

Connecting to sign-in…