The official implementation of "EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesis".
See the code
To locally run the demo that interacting with Envs:
cd interact_with_env
python app.py
To locally run the demo that builing Envs from scratch:
cd skel_builder
python env_build_demo.py
We provide EnvScaler’s data and models (after SFT+RL) as follows:
| Data | Link |
|---|---|
| 191 Env Metadata | 🤗 HuggingFace |
| 4.7K SFT Scenario | 🤗 HuggingFace |
| 2.5K RL Scenario | 🤗 HuggingFace |
| 9K SFT Trajectory | 🤗 HuggingFace |
| Model | Link |
|---|---|
| EnvScaler-Qwen3-1.7B | 🤗 HuggingFace |
| EnvScaler-Qwen3-4B | 🤗 HuggingFace |
| EnvScaler-Qwen3-8B | 🤗 HuggingFace |
EnvScaler is an automated, scalable framework that realizes executable, stateful, tool-interactive environments via programmatic synthesis, for training LLM agents.
Overview of EnvScaler.
SkelBuilder is the first stage of EnvScaler. It (1) mines potential Env descriptions from existing open-source textual tasks; (2) plans the corresponding state schema and business rules, and generates a fully-functional Python class whose methods expose tool interfaces; (3) performs a dual-agent loop for Env quality inspection (one agent invokes tools, the other checks code, return values, and state changes), guaranteeing quality and consistency.
Framework of SkelBuilder.
ScenGenerator is the second stage for synthesizing multiple Env scenarios. Given an Env skeleton, it first prompts LLMs to generate an initial state/database, then creates a challenging task that can be solved from that state. Finally, it decomposes the task into checklists, and converts each checkpoint into a Python Boolean function over the final state of the Env, providing rule-based, verifiable reward signals.
Framework of ScenGenerator.
With EnvScaler, we synthesized 191 environments and about 7K scenarios, and applied them to Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) for Qwen3 series models. Results on three benchmarks show that EnvScaler significantly improves LLMs' ability to solve tasks in complex environments involving multiturn, multi-tool interactions.
Statistics of 191 synthesized environments.
Performance comparison.
EnvScaler/
├── skel_builder/ # Stage 1: Env Skeleton Construction
├── scen_generator/ # Stage 2: Scenario Generation
├── interact_with_env/ # Agent-Env Interaction
├── sft/ # Supervised Fine-Tuning (SFT)
├── rl/ # Reinforcement Learning (RL)
└── evaluation/ # Evaluation Guide
💡 Tip: We provide detailed documentation under each module.
git clone https://github.com/RUC-NLPIR/EnvScaler
cd EnvScaler
pip install -r requirements.txt
💡 Note: Basic dependencies are included in
requirements.txt. If you need SFT or RL training, please install extra dependencies following the corresponding sub-project documentation:
- SFT training: refer to sft/README.md to install LlamaFactory
- RL training: refer to rl/README.md to install the ROLL framework
Create a .env file in the project root and configure your OpenAI API key:
# .env
OPENAI_API_KEY=your-openai-api-key-here
OPENAI_BASE_URL=https://api.openai.com/v1
You can deploy a local model with an OpenAI-compatible inference framework such as vLLM.
Deploy a model with vLLM:
vllm serve your-model-path \
--host 0.0.0.0 \
--port 8000 \
--trust-remote-code
⚠️ Important: Ensure the deployed model service supports Function Calling (FC) interface, see vLLM OpenAI-Compatible Server docs for details.
Run the demo to verify your setup:
# Environment interaction demo
cd interact_with_env
python app.py
# Environment interaction Debug
cd interact_with_env
python run_main_debug.py
# Environment building demo
cd skel_builder
python env_build_demo.py
Now you can use each module of EnvScaler independently:
If you find our work helpful, please consider citing it. We greatly appreciate your support.
@article{song2026envscaler,
title={EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesis},
author={Song, Xiaoshuai and Chang, Haofei and Dong, Guanting and Zhu, Yutao and Dou, Zhicheng and Wen, Ji-Rong},
journal={arXiv preprint arXiv:2601.05808},
year={2026}
}
@article{dong2026agent,
title = {Agent-World: Scaling Real-World Environment Synthesis for Evolving General Agent Intelligence},
author = {Dong, Guanting and Lu, Junting and Huang, Junjie and Zhong, Wanjun and
Liu, Longxiang and Huang, Shijue and Li, Zhenyu and Zhao, Yang and
Song, Xiaoshuai and Li, Xiaoxi and Jin, Jiajie and Zhu, Yutao and
Wang, Hanbin and Lei, Fangyu and Luo, Qinyu and Chen, Mingyang and
Chen, Zehui and Feng, Jiazhan and Wen, Ji-Rong and Dou, Zhicheng},
journal = {CoRR},
volume = {abs/2604.18292},
year = {2026},
url = {https://arxiv.org/abs/2604.18292}
}
For any questions or feedback, please reach out to us at [email protected].
176 followers · starred May 2026
88 followers · starred Jan 2026
35 followers · starred Jan 2026
16 followers · starred Jan 2026
The official implementation of "EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesis".
See the code
To locally run the demo that interacting with Envs:
cd interact_with_env
python app.py
To locally run the demo that builing Envs from scratch:
cd skel_builder
python env_build_demo.py
We provide EnvScaler’s data and models (after SFT+RL) as follows:
| Data | Link |
|---|---|
| 191 Env Metadata | 🤗 HuggingFace |
| 4.7K SFT Scenario | 🤗 HuggingFace |
| 2.5K RL Scenario | 🤗 HuggingFace |
| 9K SFT Trajectory | 🤗 HuggingFace |
| Model | Link |
|---|---|
| EnvScaler-Qwen3-1.7B | 🤗 HuggingFace |
| EnvScaler-Qwen3-4B | 🤗 HuggingFace |
| EnvScaler-Qwen3-8B | 🤗 HuggingFace |
EnvScaler is an automated, scalable framework that realizes executable, stateful, tool-interactive environments via programmatic synthesis, for training LLM agents.
Overview of EnvScaler.
SkelBuilder is the first stage of EnvScaler. It (1) mines potential Env descriptions from existing open-source textual tasks; (2) plans the corresponding state schema and business rules, and generates a fully-functional Python class whose methods expose tool interfaces; (3) performs a dual-agent loop for Env quality inspection (one agent invokes tools, the other checks code, return values, and state changes), guaranteeing quality and consistency.
Framework of SkelBuilder.
ScenGenerator is the second stage for synthesizing multiple Env scenarios. Given an Env skeleton, it first prompts LLMs to generate an initial state/database, then creates a challenging task that can be solved from that state. Finally, it decomposes the task into checklists, and converts each checkpoint into a Python Boolean function over the final state of the Env, providing rule-based, verifiable reward signals.
Framework of ScenGenerator.
With EnvScaler, we synthesized 191 environments and about 7K scenarios, and applied them to Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) for Qwen3 series models. Results on three benchmarks show that EnvScaler significantly improves LLMs' ability to solve tasks in complex environments involving multiturn, multi-tool interactions.
Statistics of 191 synthesized environments.
Performance comparison.
EnvScaler/
├── skel_builder/ # Stage 1: Env Skeleton Construction
├── scen_generator/ # Stage 2: Scenario Generation
├── interact_with_env/ # Agent-Env Interaction
├── sft/ # Supervised Fine-Tuning (SFT)
├── rl/ # Reinforcement Learning (RL)
└── evaluation/ # Evaluation Guide
💡 Tip: We provide detailed documentation under each module.
git clone https://github.com/RUC-NLPIR/EnvScaler
cd EnvScaler
pip install -r requirements.txt
💡 Note: Basic dependencies are included in
requirements.txt. If you need SFT or RL training, please install extra dependencies following the corresponding sub-project documentation:
- SFT training: refer to sft/README.md to install LlamaFactory
- RL training: refer to rl/README.md to install the ROLL framework
Create a .env file in the project root and configure your OpenAI API key:
# .env
OPENAI_API_KEY=your-openai-api-key-here
OPENAI_BASE_URL=https://api.openai.com/v1
You can deploy a local model with an OpenAI-compatible inference framework such as vLLM.
Deploy a model with vLLM:
vllm serve your-model-path \
--host 0.0.0.0 \
--port 8000 \
--trust-remote-code
⚠️ Important: Ensure the deployed model service supports Function Calling (FC) interface, see vLLM OpenAI-Compatible Server docs for details.
Run the demo to verify your setup:
# Environment interaction demo
cd interact_with_env
python app.py
# Environment interaction Debug
cd interact_with_env
python run_main_debug.py
# Environment building demo
cd skel_builder
python env_build_demo.py
Now you can use each module of EnvScaler independently:
If you find our work helpful, please consider citing it. We greatly appreciate your support.
@article{song2026envscaler,
title={EnvScaler: Scaling Tool-Interactive Environments for LLM Agent via Programmatic Synthesis},
author={Song, Xiaoshuai and Chang, Haofei and Dong, Guanting and Zhu, Yutao and Dou, Zhicheng and Wen, Ji-Rong},
journal={arXiv preprint arXiv:2601.05808},
year={2026}
}
@article{dong2026agent,
title = {Agent-World: Scaling Real-World Environment Synthesis for Evolving General Agent Intelligence},
author = {Dong, Guanting and Lu, Junting and Huang, Junjie and Zhong, Wanjun and
Liu, Longxiang and Huang, Shijue and Li, Zhenyu and Zhao, Yang and
Song, Xiaoshuai and Li, Xiaoxi and Jin, Jiajie and Zhu, Yutao and
Wang, Hanbin and Lei, Fangyu and Luo, Qinyu and Chen, Mingyang and
Chen, Zehui and Feng, Jiazhan and Wen, Ji-Rong and Dou, Zhicheng},
journal = {CoRR},
volume = {abs/2604.18292},
year = {2026},
url = {https://arxiv.org/abs/2604.18292}
}
For any questions or feedback, please reach out to us at [email protected].
176 followers · starred May 2026
88 followers · starred Jan 2026
35 followers · starred Jan 2026
16 followers · starred Jan 2026