
Environment-Free Synthetic Data for API-Calling Agents

Training API-calling large language model (LLM) agents typically requires massive amounts of high-quality trajectories, which are hard to collect because they depend on fully implemented environments with executable APIs and pre-populated backend databases.
The authors propose an environment-free synthetic data generation approach that uses LLMs as on-the-fly digital world models.
Given only API specifications, the method generates trajectories that mimic interactions between an agent and a stateful environment.
An LLM first generates diverse tasks solvable with the provided APIs.
A teacher agent then iteratively solves each task while an LLM simulator generates coherent synthetic API responses conditioned on the task context and simulation history.
Finally, an LLM judge filters the trajectories to ensure dataset quality.
The approach is evaluated on the AppWorld and OfficeBench benchmarks, which include both information-retrieval and state-changing tasks.
Fine-tuning models on the synthetic data yields significant performance gains, demonstrating that effective supervision for API-calling agents can be generated without any executable environment.
The results establish LLM-based API simulation as a practical, scalable solution for training agents across diverse API ecosystems.


