Scaling Laws for Tool-Use Agents via Controllable Environment Synthesis
Summary (Overview)
-
Novel controllable synthesis pipeline (SynthAPI): Introduces a pipeline that generates executable tool-use environments with explicit control over diversity across three axes: tools (apps), tasks, and database states (data profiles), enabling systematic study of how data composition affects downstream agent performance.
-
Scalability analysis at unprecedented scale: The study generates 458,752 tasks across 64 apps (10,472 APIs) and trains 849 models across four model sizes (2B–27B), systematically varying data composition controls to derive scaling relationships.
-
Data composition-dependent scaling law: Proposes a predictive scaling law (Equation 4.2) that accounts for tool diversity (A), database breadth (S), and database depth (D), achieving a held-out mean absolute error of 0.0285 vs. 0.1706 for a data-quantity-only law—a 6× improvement in extrapolation accuracy.
-
Key finding on data allocation: As compute budgets grow, scaling tool diversity and database diversity becomes more effective than simply increasing the number of tasks, and increasing data complexity yields larger gains.
-
State-of-the-art transfer results: Agents trained with the optimal recipe outperform prior large-scale tool-use data (Nemotron) by 30.5 percentage points on average across benchmarks, and surpass per-benchmark baselines by 7.6–11.6 points on AppWorld Test-Challenge and 2.0–3.7 points on BFCL.
Introduction and Theoretical Foundation
Motivation
Large language models (LLMs) show promise as tool-use agents for complex, stateful environments, but progress depends on scaling high-quality, diverse training data. Multi-step tool interactions are scarce in internet text and require realistic tasks, diverse tools, and rich environment data.
Challenges
- Simulating tool responses (e.g., Nemotron, SimSAT): LLM-simulated outputs struggle with complex state transitions and become unreliable as complexity grows.
- Executable environments (e.g., EnvScaler, EnvFactory): Prior work emphasizes quantity but leaves open which properties of generated data drive performance.
Key Insight
Tool-use agent data varies along three dimensions:
- Tool diversity (number of apps/APIs)
- Task diversity (number of tasks per app)
- Database diversity (number of initial states per task, distractor data amount)
Understanding how these properties affect generalization is essential for determining what data to generate as training scales.
Theoretical Foundation
The work builds on scaling law literature (Kaplan et al., 2020; Hofmann et al., 2022) but extends it from language-model pre-training to tool-use agent training, predicting downstream task success from environment-generation factors rather than benchmark loss.
Methodology
SynthAPI Pipeline Architecture
The pipeline consists of two stages:
Stage 1: API Generation
-
App metadata generation: The builder LLM (Gemini-3.1 Pro) generates app name, description, taxonomy category (shopping, music, productivity, finance, fitness, messaging, utilities, social), and functionalities.
-
Database schema generation (
db.py): PythonEnumanddataclassdefinitions specifying data types for the app (e.g., products, inventory, users, orders for a shopping app). -
API layer generation (
apis.py): Python functions operating on the database schema. Each function takes a database object plus input arguments, reading or modifying instantiated data.
Stage 2: Task Generation
A task is defined as a tuple:
where:
- = task instruction
- = starting database state
- = verifier code (determines task completion)
- = oracle solver program
Data profile construction: The initial database state is built as:
where is the minimal state for task feasibility and are distractor data batches.
Filtering: Tasks are rejected unless and .
Controllable Data Composition
The task set is characterized by:
- A = number of apps (tool diversity)
- T = number of tasks per app (task diversity)
- S = number of initial databases per task instruction (database breadth)
- D = amount of distractor data per initial state (database depth)
Total tasks:
Training Setup
- Expert: GLM-5.2 collects trajectories (up to 4 attempts per episode, first successful attempt retained)
- Students: Qwen3.5 family (2B–27B), trained via SFT with next-token prediction on reasoning and action tokens
- Data scale: 5.9B total tokens (721M supervision tokens)
- Evaluation: AppWorld, BFCLv3 Multi-Turn, ASTRA-Bench, and SynthAPI-Holdout
Normalized Score
For model at size , the normalized score aggregates across diagnostic benchmarks:
Empirical Validation / Results
Task Property Analysis
Apps vs. Tasks Allocation
Fitted model (generalized logistic):
Key findings (Figure 2a):
- At low budgets (64–512 tasks): performs best
- At high budgets (≥4096 tasks): is clearly best
- Performance ceiling increases with ; saturates at substantially lower values
- Even at , only 51% of tools are used per app (no task exhaustion)
Database Breadth (S)
Key findings (Figure 2b):
- 32–512 instances: best
- 512–4096: best
- Beyond 4096: best
- Ceiling increases with ; learning same task across different states is valuable
Database Depth (D)
Key findings (Figure 2c):
- Large improvement from to at high budgets
- Distractor data improves downstream scaling
Scaling Law
Data composition-dependent law:
Comparison to data-quantity-only law :
| Metric | Composition-aware | Quantity-only |
|---|---|---|
| Held-out MAE (top 25% FLOPs) | 0.0285 | 0.1706 |
| Extrapolation range | 16× FLOP budget | — |
The law reveals that app count, data profiles per task, and data complexity set the performance ceiling, while tasks per app control the rate of progress toward that ceiling.
Benchmark Results
Table 1: Unnormalized success rates
| Approach | AppWorld (Test-C) 4B/9B/27B | ASTRA-Bench 4B/9B/27B | BFCL 4B/9B/27B | SynthAPI-Holdout 4B/9B/27B |
|---|---|---|---|---|
| Zero-shot | 14.7/26.4/61.5 | 57.4/71.8/80.2 | 27.3/39.3/54.4 | 0.3/1.5/20.0 |
| Nemotron | 17.5/20.8/- | 54.4/67.7/- | 15.9/39.7/- | 1.0/0.5/- |
| SynthAPI-SubOpt | 38.4/53.0/73.8 | 71.1/74.2/77.3 | 44.9/47.5/59.6 | 51.3/56.0/64.0 |
| SynthAPI-Opt | 45.0/56.2/74.1 | 72.3/75.5/79.3 | 48.8/49.9/61.5 | 56.0/63.0/68.0 |
| SynthAPI-Big | 66.4/77.0/81.5 | 74.2/76.8/82.3 | 51.1/53.6/65.0 | 53.0/64.0/69.8 |
Table 2: Comparison to prior baselines
| BFCL | 4B | 8B | AppWorld | 4B | 9B | |
|---|---|---|---|---|---|---|
| Zero-shot | 33.5 | 41.3 | Zero-shot | 14.7 | 26.4 | |
| Agent World Model | 40.8 | 42.3 | ToolACE | — | — | |
| EnvScaler | 45.0 | 51.9 | ToolAlpaca | — | — | |
| EnvFactory | 48.5 | 49.0 | SimSAT | 58.8 | 65.4 | |
| SynthAPI-Big | 50.5 | 55.6 | SynthAPI-Big | 66.4 | 77.0 |
Key results:
- SynthAPI-Opt vs. SubOpt: Optimal recipe consistently outperforms suboptimal at fixed budget (especially large deltas in SynthAPI-Holdout and 4B model)
- SynthAPI-Big vs. Nemotron: +30.5 points average improvement; Nemotron underperforms zero-shot in 5/8 settings
- AppWorld: SynthAPI-Big exceeds SimSAT by 7.6 (4B) and 11.6 (9B) points on Test-C
- BFCL: Surpasses strongest baseline (EnvFactory at 4B, EnvScaler at 8B) by 2.0 and 3.7 points
Theoretical and Practical Implications
Theoretical Implications
-
Data composition matters as much as scale: The 6× improvement in extrapolation accuracy demonstrates that what data is generated matters as much as how much—a critical insight for the agent-training community.
-
Composition-optimal allocation shifts with budget: The finding that tool diversity and database diversity become increasingly valuable as budgets grow challenges the common practice of scaling task count alone.
-
Ceiling vs. rate decomposition: The scaling law's structure suggests a principled decomposition—diversity factors (A, S, D) determine the achievable ceiling, while task count (T) determines convergence rate toward that ceiling.
-
Generalization of scaling laws: Extends scaling law methodology from pre-training loss prediction to downstream task success prediction, connecting environment generation factors to agent generalization.
Practical Implications
-
Data generation guidance: Provides concrete guidance for practitioners: at small budgets, concentrate tasks within fewer tools; at large budgets, prioritize tool diversity and multiple database states per task.
-
Compute-efficient training: The scaling law enables predicting performance at 16× larger compute budgets, allowing researchers to select optimal data compositions before committing expensive training runs.
-
Executable environments over simulation: The strong results over LLM-simulation approaches (Nemotron, SimSAT) validate database-backed executable environments as a more reliable path to scalable, complex tool-use supervision.
Conclusion
Main Takeaways
-
SynthAPI enables controllable synthesis of executable tool-use environments, allowing systematic study of data composition effects.
-
Scaling law (Equation 4.2) accurately predicts downstream performance from data composition factors, with 16× extrapolation capability.
-
Optimal allocation shifts: As budgets grow, prioritize tool diversity (A), database breadth (S), and database depth (D) over task count (T).
-
Practical superiority: The optimal recipe outperforms prior large-scale datasets (Nemotron) and per-benchmark baselines (SimSAT, EnvScaler, EnvFactory) across all evaluated benchmarks.
Limitations
- No user-in-the-loop simulation (agents cannot ask clarifying questions)
- Limited information retrieval tasks with long, complex documents (lacks semantic depth of real user content)
- Scaling law validated on a single data pipeline; transferability to other pipelines unverified
Future Directions
- Multi-app tasks (current tasks involve tools from a single app)
- User-in-the-loop interaction synthesis
- Integration of real-world documents and data for richer semantic content
- Validation of scaling law transfer across different synthesis pipelines and training settings
Related papers
- Loopback Transformer: Towards a Unified View of Residual Looped Transformers
The Loopback Transformer stores block updates separately with decay-bounded attention, beating standard Transformers with 40-75% of their parameters.
- Evolving in Thought Space: Training a Small Model at Test Time Unlocks Better Discoveries (Guidance-TTT)
Guidance-TTT decouples strategic adaptation from solution generation via a small trained guidance model, achieving state-of-the-art results across four scientific discovery domains at 58% lower cost.
- Best-of-Depth: Learning Exploratory Dynamics in Looped Transformers
Best-of-Depth training, which minimizes loss across all recurrent depths, maximizes solution coverage in looped transformers, outperforming standard objectives on combinatorial tasks and code generation.