Simulating the World Inside the LLM
Qwen-AgentWorld replaces heavy external simulators with a native language world model to train and evaluate AI agents.
Building reliable software agents is a logistical nightmare. If you have ever tried to train an agent using Reinforcement Learning (RL), you know the pain. You are either spinning up thousands of fragile Docker containers, dealing with rate-limited web APIs, or waiting on slow, resource-heavy Android emulators.
Alibaba's Qwen team has proposed a different path with Qwen-AgentWorld. Instead of connecting agents to external environments, they put the environment inside the model. By training a language model to act as a native "Language World Model" (LWM), they can simulate complex state transitions across seven domains entirely through text. This approach moves the simulation bottleneck from infrastructure orchestration to model inference, changing how we train, test, and evaluate agents.
The Architecture of a Native World Model
Most attempts to make LLMs act as simulators rely on post-hoc prompting or fine-tuning. You give a model a prompt like "You are a Linux terminal," and hope it remembers how tar -xzf works. This approach fails because standard pre-training objectives do not prioritize state transition dynamics.
Qwen-AgentWorld is a native world model, meaning environment modeling was the core training objective starting from the Continual Pre-training (CPT) stage. The developers collected over 10 million environment interaction trajectories across seven domains: Model Context Protocol (MCP), Search, Terminal, Software Engineering (SWE), Android, Web, and OS.
To build this, the team used a three-stage training pipeline:
- Continual Pre-training (CPT): Injects general-purpose world modeling capabilities by training on raw state transition dynamics and augmented professional corpora.
- Supervised Fine-Tuning (SFT): Activates next-state-prediction reasoning using long chain-of-thought (CoT) trajectories. The model does not just output the next state; it reasons through the transition step-by-step.
- Reinforcement Learning (RL): Sharpens simulation fidelity using a tailored framework with hybrid rubric-and-rule rewards. This step ensures the simulated environment behaves consistently and resists drifting into nonsense.
The team released two models: Qwen-AgentWorld-35B-A3B (a Mixture-of-Experts model with 35B total parameters, 3B active, and a 256K context window) and the massive Qwen-AgentWorld-397B-A17B. The weights for the 35B model are open-sourced on Hugging Face.
The Developer Angle: Trade-offs of Virtual Sandboxes
For developers building agentic workflows, the immediate question is: why run a massive 35B MoE model just to simulate a terminal when you can run a lightweight Docker container for next to nothing?
The answer lies in scalability, control, and safety.
Compute vs. Infrastructure Complexity
Running a real environment is cheap for a single run, but scaling it to thousands of parallel RL training steps is an engineering headache. Virtual machines freeze, network calls fail, and database states get corrupted. An LWM is stateless and highly parallelizable. You trade the infrastructure complexity of managing a Kubernetes cluster of Android emulators for the predictable compute cost of running LLM inference.
Determinism vs. Generalization
An LWM is probabilistic, not deterministic. If your agent runs a command, the simulated terminal predicts the next state. It might occasionally hallucinate a file or a directory that should not exist. While this sounds like a drawback, the paper demonstrates that this probabilistic nature is a massive advantage for training.
By introducing "controllable perturbations" (intentionally injecting errors or environmental changes), developers can expose agent weaknesses. In the MCP domain, training agents with controlled simulation perturbations improved their performance on the Tool Decathlon benchmark from 32.4 to 36.1, and on MCPMark from 21.5 to 33.8.
Fictional-World Construction
Because the simulator is a language model, you can instruct it to build entirely fictional, self-consistent worlds. The Qwen team trained agents in fully invented search environments. When tested on real-world search tasks (WideSearch), these agents showed massive performance gains. For example, the Qwen3.5-35B-SFT model improved its WideSearch F1 Item score from 34.02 to 50.31 after training in these simulated fictional worlds.
xychart-beta
title "AgentWorldBench Overall Scores (Normalized 0-100)"
x-axis ["Qwen3.5-35B", "Qwen-AW-35B", "Claude-Opus-4.6", "GPT-5.4", "Qwen-AW-397B"]
y-axis "Overall Score" 40 --> 60
bar [47.73, 56.39, 57.80, 58.25, 58.71]
Benchmarking the Simulator
To evaluate how well these models simulate reality, the researchers introduced AgentWorldBench, a benchmark built from real-world interactions of five frontier models across nine established benchmarks.
The results show that Qwen-AgentWorld-397B-A17B achieves an overall score of 58.71, outperforming proprietary models like GPT-5.4 (58.25) and Claude Opus 4.6 (57.80) in simulation fidelity. More importantly for open-source developers, the smaller Qwen-AgentWorld-35B-A3B scored 56.39, representing an 8.66-point jump over the base Qwen3.5-35B model without LWM training.
This is not just about simulation. The researchers found that world-model training acts as a highly effective warm-up for the agents themselves. When they applied LWM RL training to the Qwen3.5-35B-SFT model, its performance on downstream agentic tasks shot up across the board, even on out-of-domain benchmarks like SWE-Bench Verified (rising from 64.47 to 67.86) and Berkeley Function Calling Leaderboard (BFCL) v4 (rising from 62.29 to 71.25).
The Pragmatic Verdict
Language World Models are not going to replace local integration testing anytime soon. If you need to verify that your agent can write to a specific database schema or authenticate with a real API, you still need a real sandbox. The risk of simulation drift is too high for final production validation.
Where this technology shines is in the training and bootstrapping phase. If you are building custom agents and need to generate synthetic interaction trajectories, or if you want to run RL to teach your agent how to handle unexpected environment errors, Qwen-AgentWorld is a massive step forward. It allows you to bypass the infrastructure nightmare of physical sandboxes and train your agents in a highly controllable, infinitely scalable, purely digital imagination.
Sources & further reading
- Qwen-AgentWorld: Language World Models for General Agents — arxiv.org
- GitHub - QwenLM/Qwen-AgentWorld: Qwen-AgentWorld: Language World Models for General Agents · GitHub — github.com
- Paper page - Qwen-AgentWorld: Language World Models for General Agents — huggingface.co
- Qwen-AgentWorld: Language World Models for General Agents | alphaXiv — alphaxiv.org
Rachel has been embedded in the developer tooling ecosystem for nearly eight years, covering everything from IDE wars and package-manager drama to the quiet rise of AI-assisted coding. She has a soft spot for open-source maintainers and an unhealthy number of terminal emulators installed on a single laptop.
Discussion 2
okay this is actually huge, i mean training a language model to act as a native language world model to simulate complex state transitions is a total game changer, no more dealing with fragile docker containers or slow emulators 🚀
so we're just gonna put the whole world in a language model now, because what could possibly go wrong with that, right? i mean, i've had enough trouble with docker containers, but at least those don't have the potential to hallucinate their own reality