A New Paradigm for Agent Environment Synthesis: Inside ToolSpace

    This article examines a tool-centric paradigm for synthesizing agent training and evaluation environments. Instead of starting from a generated dataset and working backward to infer tools and tasks, the approach begins with real tool execution traces, builds a tool composition graph, and derives environments and verifiable tasks from execution dependencies. The article explains the limitations of data-first synthesis, the two core components of the tool-first workflow, and the validation signals used to filter unreliable tasks. It also reports gains on seven long-horizon tool-use benchmarks, describes harder benchmark variants, and offers practical engineering guidance for reproducing the approach.

    1. Why Data-First Environment Synthesis Falls Short

    Environment synthesis plays a decisive role in setting the performance ceiling of AI agents during training and evaluation. A common practice is to organize the process around data: first generate a database and a set of business scenarios, then work backward to determine which tools are needed and which tasks can be supported. This route is convenient from an engineering perspective, but it suffers from three structural problems.

    First, tool interfaces and parameter semantics tend to become distorted. When data comes first, tools are effectively designed to accommodate the data rather than to reflect a real system. As a result, parameter names, value ranges, and response structures often lack the constraints found in production environments, and the agent ends up learning a set of “toy interfaces.”

    Second, tool composition lacks an execution basis. When multiple tools need to be chained together, data-first methods typically provide only a declaration that the tools “can be used together.” Without verifiable intermediate states, the resulting composition relationships are neither traceable nor reproducible.

    Third, tasks are confined to a single environment. Real business processes are inherently cross-system: data moves from one business domain to another, state must be carried across boundaries, and tools must be orchestrated accordingly. Tasks limited to one environment cannot cover this kind of long-range dependency, leaving trained agents brittle in cross-boundary scenarios.

    For these reasons, the starting point of synthesis needs to shift from “data” to “tools and their execution dependencies.” This is the core motivation behind the tool-centric paradigm.

    2. Core Idea: Organizing Environments Around Tools

    The first principle of this paradigm is that an environment does not begin with data to which tools are later attached. Instead, it begins with tools and their real execution traces, and the required data and scenarios are then derived from the execution dependencies. The benefit is twofold: tool interfaces retain their real-world semantics, and the composition relationships between tools carry “executable evidence” by construction.

    The approach consists of two components.

    2.1 Tool Space Exploration

    Tools that were genuinely invoked are extracted from existing execution traces. Their call frequency, parameter distributions, and preceding and succeeding dependencies are aggregated to build a tool composition graph. In this graph, nodes represent tools, while edges represent verifiable dependencies of the form “the output of one tool can serve as the input of the next.” Environments and their underlying data are then organized according to tool relationships: which fields a tool requires, which permissions it needs, and what initial state it expects are all determined by its position in the graph.

    A schematic view of the data structures can be understood as follows:

    1. ToolNode {
    2. name, input_schema, output_schema, side_effect
    3. }
    4. ToolEdge {
    5. from, to, dependency_type, evidence_trace_ids
    6. }
    7. Environment {
    8. tool_subgraph, seed_data, permission_scope
    9. }

    The key element here is evidence_trace_ids. Every composition edge points to a real execution trace, which gives each tool combination a traceable execution basis rather than relying on a manually declared “possibly usable” relationship.

    2.2 Cross-Environment, Verifiable Task Synthesis

    State-aware random walks are performed on the tool composition graph. During a walk, the process does not merely check topological reachability; it also verifies whether the current environment state satisfies the preconditions of the next call — whether the required data has already been written, whether the necessary permission has been granted, and whether the side effect of the previous step has actually occurred. Once a complete call chain has been walked through, it is converted into a natural language task description together with a companion verification script. Samples are then filtered by difficulty and by the degree of cross-environment scope so that reproducible cases can be selected.

    Verification scripts typically check three categories of signals: whether the final state matches expectations, whether key intermediate states appear in the correct order, and whether any privilege escalation or unintended side effects have occurred. Only samples that can be reliably judged by a script are admitted into the training set. This mechanism structurally suppresses pseudo-tasks that “look plausible but cannot be verified.”

    3. Training and Evaluation: Validation Across Two Dimensions

    3.1 Consistent Gains on Long-Horizon Tool-Use Benchmarks

    After training on data synthesized with this paradigm, models improved their aggregate score from 44.6 to 56.6 across seven long-horizon tool-use benchmarks, matching the level of leading closed-source models from the same period. Here, “long-horizon” means that tasks require multiple turns, multiple tools, and state carried across steps, so single-step accuracy cannot represent overall capability. The improvement is therefore more likely to reflect a genuine strengthening of cross-environment orchestration ability than imitation of output formats.

    3.2 Harder Upgraded Evaluation Sets

    The research team also built two upgraded benchmarks covering automated office work and banking transactions. Compared with their standard versions, these deliberately lengthen workflows and add state branches and cross-environment data transfers in order to test continuous execution capability. A practical observation is that once standard benchmarks approach saturation, upgraded benchmarks are better at distinguishing how stably different models perform on long-chain tasks.

    4. Engineering Recommendations

    The following sequence is suggested for reproducing this approach in your own systems:

    1. Collect real execution traces first, and unify tool descriptions and schema definitions to prevent interface drift;
    2. Build the tool composition graph and bind evidence to every edge, forming an auditable set of dependencies;
    3. Generate candidate tasks in bulk using state-aware walks, then filter them with verification scripts;
    4. Stratify by difficulty and cross-environment scope to build a curriculum-style training set that progresses from easy to hard;
    5. Keep training and evaluation separate, and retain replayable scripts in the evaluation set to support regression testing.

    At the infrastructure level, this kind of workflow typically requires object storage to hold traces and samples, a message queue to decouple synthesis from validation, a container platform to host sandbox execution, and logging, monitoring, and alerting services to track synthesis success rates and failure modes. When using general-purpose cloud capabilities, “verifiability” is best treated as the primary constraint: any sample that cannot be judged by a script should be discarded rather than allowed into the training set.

    5. Limitations and Future Directions

    The effectiveness of this paradigm depends on trace quality and on how rigorously tool descriptions are defined. If the underlying systems lack clear schema definitions, a large number of edges in the tool graph will be missing. In addition, the sampling efficiency of state-aware walks and the security of permission isolation across environments remain engineering problems that require ongoing refinement. Future directions include automatically completing missing tool dependencies, introducing failure traces as negative samples, and treating the verification scripts themselves as learnable artifacts.