What If a Language Model Could Predict the Environment?
Language agents are trained to act in interactive environments, but until now, no language model has been explicitly trained to model the environments themselves — to predict what happens next given the current state and an agent's action.
That changes with Qwen-AgentWorld, released on June 22, 2026. It is the first native language world model: environment modeling is the training objective from continual pre-training onward (CPT → SFT → RL), not a post-hoc adaptation bolted onto a general-purpose LLM. A single model simulates agent environments across seven domains — MCP, Search, Terminal, SWE, Web, OS, and Android — with knowledge transferring across all of them.
The flagship model, Qwen-AgentWorld-397B-A17B, achieves the highest overall simulation quality on the newly released AgentWorldBench, outperforming GPT-5.4, Claude Opus 4.8, and Gemini 3.1 Pro. At the smaller 35B-A3B scale, the three-stage training pipeline lifts performance by +8.66 points, bringing it above Claude Sonnet 4.6.
But the real story isn't just about simulation quality. Qwen investigates two complementary paradigms for using world models to build better agents: as a decoupled environment simulator for scalable, controllable RL training, and as a unified agent foundation model where world modeling becomes an internalized reasoning capability.
⚡ TL;DR
Qwen-AgentWorld is the first native language world model — trained end-to-end to simulate agent environments across 7 domains (MCP, Search, Terminal, SWE, Web, OS, Android). Two scales: 397B-A17B (flagship) and 35B-A3B (open source). Three-stage training: CPT injects environment knowledge, SFT activates next-state-prediction reasoning, RL sharpens simulation fidelity. On AgentWorldBench, the 397B variant outperforms GPT-5.4, Claude Opus 4.8, and Gemini 3.1 Pro. Two paradigms for agent enhancement: (1) Decoupled simulation — controllable Sim RL surpasses real-environment training. (2) Unified agent foundation — LWM warm-up transfers to 7 agentic benchmarks including 3 entirely out-of-domain. Emergent reasoning patterns include deliberative self-correction (1,347 "Wait!" interrupts across 129 turns), information leakage prevention, and 6-step causal reasoning chains. Open source on Hugging Face and ModelScope.
What Is a Language World Model?
In an agent-environment interaction loop, the policy decides what to do and the world model predicts what happens next. A language world model takes the current interaction history and an agent's action, and predicts what the environment would return: the terminal output, the API response, the updated DOM.
This is not template-based generation. Faithful simulation requires:
- Multi-step causal reasoning — chaining six system-knowledge steps to predict a curl pipeline failure
- Stateful tracking — maintaining referential integrity across nine sequential Notion API calls
- Domain-specific knowledge — Unix semantics, API schemas, browser rendering rules
Qwen-AgentWorld is the first model where this capability is not an emergent side effect of general pre-training, but the explicit training objective from the ground up. The model is built to simulate environments, not to chat or write code — though those capabilities emerge as byproducts.
Roadmap: Qwen-AgentWorld represents our attempt to investigate how world modeling built on language models can further push the boundaries of general agent capabilities.
Seven Domains, One Model
Qwen-AgentWorld covers seven categories of interactive environments. What makes this remarkable is that a single model handles both text-based and GUI-based environments, with knowledge transferring across domains:
Terminal
Shell commands, file operations, Unix toolchains. The model predicts terminal output given commands and system state, including error messages, exit codes, and side effects.
SWE
Software engineering environments — code editing, test execution, debugging. Predicts the results of code changes, compilation output, and test failures.
MCP
Model Context Protocol tool calls. Simulates tool schemas, server responses, API errors, paginated results, and batch operations.
Search
Search engine interactions. Predicts search results, snippets, and ranking behavior — including preventing information leakage when the model holds reference answers.
Web
GUI-based web interaction. Environment observations as renderable HTML rather than pixel frames, enabling text-only world modeling of visual environments.
OS
Operating system GUI interaction. Accessibility tree XML representations of desktop environments, predicting the results of clicks, drags, and menu selections.
Android
Mobile GUI interaction. UI hierarchy markup representing Android app states, predicting navigation outcomes and UI updates.
For the three GUI domains, environment observations take the form of renderable code (accessibility tree XML, HTML, UI hierarchy markup) rather than pixel frames. This is a key design choice: by representing visual environments as structured text, the model can use pure language modeling to simulate GUI interactions without needing a vision encoder.
Three-Stage Training Pipeline
Qwen-AgentWorld is trained end-to-end with environment modeling as the explicit objective. The three-stage pipeline follows one principle: CPT injects, SFT activates, RL sharpens.
Stage 1: Continual Pre-Training (CPT)
CPT injects environment knowledge through non-thinking trajectories. The data draws from:
- Dedicated agent infrastructure — containerized execution sandboxes, MCP servers, Android/web/OS emulators
- Open environment interaction traces — publicly available agent-environment logs
- In-house agentic trajectories — proprietary interaction data from Qwen's agent systems
- Specialized-domain world knowledge corpora — industrial control, cybersecurity, law, medicine, finance, and current affairs
A key technical contribution is turn-level information-theoretic loss masking: four surface-level statistics per (action, observation) pair identify turns carrying genuine environment information, and mask the rest from the loss while retaining them as context. This ensures the model focuses its learning on turns that actually teach it about environment dynamics, rather than wasting gradient updates on turns where the agent just waits or repeats.
The world knowledge corpora are critical. Environment trajectories alone cannot provide the factual grounding needed for faithful simulation. Simulating a regulatory compliance platform requires legal knowledge; simulating search-engine responses on current events requires up-to-date factual coverage. By incorporating domain knowledge during CPT, the model acquires the factual substrate on which environment simulation depends.
Stage 2: Supervised Fine-Tuning (SFT)
SFT activates next-state prediction as an explicit thinking pattern via thinking blocks. The team used rejection sampling to select high-quality thinking trajectories, resulting in 7,094 training samples. This is a remarkably small dataset — the model learns the reasoning pattern for next-state prediction from fewer than 7,100 examples.
The SFT stage teaches the model to deliberate before predicting: to reason through the causal chain from action to environment response, rather than generating plausible-sounding but incorrect predictions.
Stage 3: Reinforcement Learning (RL)
RL sharpens output quality with hybrid rewards. Qwen uses GSPO (Generalized Score Preference Optimization) for RL training. The reward combines:
- Rubric-based LLM judge — evaluating multi-dimensional quality (format, factuality, consistency, realism, quality)
- Rule-based verifiers — for domains where exact correctness can be checked programmatically
The hybrid approach ensures the model is optimized both for human-evaluable dimensions (does this look like a real terminal output?) and for objective correctness (does this match the actual command output?).
AgentWorldBench: The Benchmark
To evaluate language world models, Qwen introduces AgentWorldBench, a comprehensive benchmark constructed from real-world observations of 5 frontier model trajectories on 9 established benchmarks, including Tool Decathlon, Terminal-Bench 1.0 & 2.0, and OSWorld-Verified.
Every evaluation sample is paired with a ground-truth observation obtained from real environment execution, enabling reference-grounded scoring. This is a critical design choice: unlike synthetic benchmarks where the "correct" answer is defined by a human annotator, AgentWorldBench uses actual environment outputs as the gold standard.
Evaluation uses open-ended rubric judging across 5 dimensions:
- Format — does the prediction match the expected output structure?
- Factuality — are the predicted facts correct?
- Consistency — are predictions internally consistent across turns?
- Realism — does the prediction look like a real environment response?
- Quality — overall simulation quality
Results: Beating the Frontier
The headline results on AgentWorldBench:
| Model | Overall Score | Rank |
|---|---|---|
| Qwen-AgentWorld-397B-A17B | 58.71 | 1st |
| GPT-5.4 | 58.25 | 2nd |
| Claude Opus 4.8 | — | 3rd+ |
| Gemini 3.1 Pro | — | 4th+ |
| Qwen-AgentWorld-35B-A3B | 56.39 | Above Sonnet 4.6 |
| Claude Sonnet 4.6 | 56.04 | — |
Qwen-AgentWorld-397B-A17B achieves the highest overall average of 58.71, surpassing GPT-5.4's 58.25 and all other frontier models. The advantage is most pronounced on Terminal and SWE — the two domains where predictions require accurate modeling of code execution state and tool API behavior.
At the 35B-A3B scale, the three-stage pipeline lifts the overall average by +8.66 points (47.73 → 56.39), bringing Qwen-AgentWorld-35B-A3B above Claude Sonnet 4.6 (56.04). The improvement is consistent across both text and GUI domains, demonstrating that the training pipeline works at multiple scales.
Inside the World Model's Mind
Beyond aggregate performance, what makes a language world model fascinating is how it reasons. Qwen analyzed 129 thinking traces across four text-based domains and discovered three emergent reasoning patterns:
Deliberative Self-Correction
The model uses "Wait!" as a cognitive interrupt to revise intermediate predictions. Across 129 turns, the team counted 1,347 such interrupts — an average of 10.4 per turn. These span:
- Factual errors — catching and correcting wrong predictions mid-thought
- Epistemological limits — recognizing "I cannot actually execute np.random.seed(42)"
- Perspective-taking — shifting between the agent's view and the environment's view
This is remarkable: a model trained on environment simulation has spontaneously developed a self-correction mechanism that resembles human deliberative reasoning. The model doesn't just generate a prediction — it debates with itself before settling on one.
Information Leakage Prevention
In the Search domain, the model holds a reference answer that the agent is trying to find. When the query is unrelated, the model actively prevents leakage by ensuring snippets do not accidentally reveal the target. This is the world-model equivalent of theory of mind: the model understands what the agent knows and doesn't know, and adjusts its simulation accordingly.
This is not a trained behavior — it's an emergent property of the model learning to faithfully simulate an environment. A real search engine wouldn't leak answers to unrelated queries, so the world model learns not to either.
Multi-Step Causal Reasoning
Predicting the output of curl -s localhost:3000 | python3 -m json.tool requires a six-step chain:
- Node.js is missing from the system
- The server was never started
- No process is listening on port 3000
- curl fails silently
- Empty pipe to python3
- json.tool raises JSONDecodeError
The model doesn't just guess the output — it traces the causal chain through the entire system. This is the kind of deep environmental reasoning that separates a world model from a text predictor.
Paradigm I: Decoupled Simulation
In the decoupled paradigm, the policy agent and the world model are separate models. Qwen-AgentWorld replaces the real environment during agent RL training: the agent acts, the world model predicts the next observation, and the agent learns from these simulated rollouts.
Zero-Shot Environment Generalization
Qwen-AgentWorld simulates 4,000 OpenClaw environments entirely absent from training, yielding Sim RL gains of +4.3 on Claw-Eval and +7.1 on QwenClawBench with no domain-specific adaptation. OpenClaw is an open-source agent platform spanning scheduling, coding, email triage, browser automation, and file management — entirely out of distribution for Qwen-AgentWorld.
The team also ablated the simulator itself: using Qwen3.6-Plus as the simulator yields negligible improvement, while Qwen-AgentWorld-397B-A17B produces substantial gains. This confirms that world-model quality is the bottleneck for Sim RL. The agent learns little from interacting with an unfaithful simulator.
Controllable Simulation Matters
The most powerful capability is controllability: using natural-language instructions to shape the simulator's behavior during training. Two validated modes:
MCP: Environment adaptation. The team synthesized simulation system prompts from real MCP tool-use trajectories: each prompt specifies tool schemas and server configuration, summarizes hidden environment state (database contents, permission settings, service availability), and defines controllable simulation instructions. Control instructions inject targeted perturbations — intermittent API errors, paginated responses requiring follow-up calls, incomplete intermediate results that force multi-step retrieval, and partial failures in batch operations.
The results reveal a sharp contrast: standard Sim RL without control instructions provides no meaningful gain (Tool Decathlon actually drops from 32.4 to 31.5). With controllable simulation, Tool Decathlon improves by +3.7 and MCPMark by +12.3. Controllability is not merely a factor in the magnitude of improvement — it is a prerequisite for Sim RL to work at all in this domain.
Search: Fictional-world construction. The team constructed 1,000 self-contained fictional environments, each anchored by a relational database (300-500 rows) of internally consistent fictional facts. A time-shifted environment might contain a 2029 smartphone market ranking with real brand names but non-existent model numbers. Since answers exist only within the fictional setting, the agent cannot bypass the search tool by answering from parametric memory. Since all facts are invented, the agent cannot confuse simulated facts with real-world knowledge.
Surpassing Real-Environment Training
On WideSearch, controllable Sim RL tracks or slightly exceeds Real RL trained with a live search engine: F1 by Item reaches 50.3% at step 60, compared to 45.6% for Real RL.
The more informative signal comes from agent behavior. Both regimes reduce web_search calls from ~5 to ~3.5 per trajectory, but web_extractor calls diverge sharply: Sim RL increases usage from 2.5 to 4.0, while Real RL decreases from 2.5 to 1.5. Because the simulated snippets deliberately withhold detailed content, the Sim-RL-trained agent learns that extracting full pages is necessary for assembling complete answers. Controllable simulation shapes agent behavior in targeted ways that real environments cannot.
Paradigm II: Unified Agent Foundation Model
In Paradigm II, the agent and world model are unified: the same model that selects actions also predicts environment states. LWM training instills next-state prediction as an internalized reasoning capability.
The team validated this by running LWM RL on Qwen3.5-35B-A3B-SFT — a single-turn task with no tool calls — then evaluating directly on multi-turn, tool-calling agentic tasks across seven benchmarks without additional fine-tuning, including three out-of-domain benchmarks absent from LWM training.
Radical Cross-Task Generalization
Single-turn, non-agentic LWM RL warm-up with no tool calls transfers to multi-turn, tool-calling agentic tasks across seven benchmarks of five domains. This is not overfitting — the training task is fundamentally different from the evaluation tasks.
Domain Generalization
Gains emerge on completely out-of-distribution domains entirely absent from LWM training:
- +11.3 on Claw-Eval
- +9.7 on QwenClawBench
- +9.0 on BFCL v4
The LWM training pipeline contains no Claw or function-calling data, yet significant gains emerge on domains entirely absent from world-model training. This confirms that LWM training builds transferable capabilities rather than domain-specific shortcuts.
The mechanism: LWM training teaches the agent to mentally simulate environment responses before acting. This "predict before you act" meta-reasoning pattern generalizes across task formats and domains, because it's a fundamental reasoning strategy rather than a domain-specific trick.
Why World Modeling Matters for Agents
Qwen is clear about what world models are and aren't:
Not to replace real environments. Not for cost reduction. But as a complementary axis for pushing the frontier.
Real-environment interaction remains the gold standard for grounding agent behavior. Language world models open a complementary axis to supplement real environments through two mechanisms:
(1) Scalability and controllability beyond real environments. An LWM enables turn-level scaling of diverse environments without dedicated infrastructure (sandboxes, GUI virtual machines), spanning extreme scenarios, real-world tasks, and high-value professional domains where real execution is infeasible due to irreversible operations or proprietary deployments. Beyond scalability, LWMs offer precise controllability: targeted perturbations that are rare or absent in real environments can systematically expose agent weaknesses. Training against these perturbations helps agents handle edge cases that real-environment training alone cannot cover.
(2) Internalized world prediction as an agent capability. A capable general agent should possess both decision-making and world-modeling abilities. World modeling enables agents to predict future environment states to refine action selection, effectively performing mental simulation as an internal planning step — whereas traditional agent training focuses solely on state-to-action decision-making. Next-state prediction is internalized as a meta-reasoning pattern similar to "reflection" but oriented toward the future: predict before you act.
What Makes General-Purpose Simulation Possible
Building a general-purpose language world model requires three ingredients working together:
- Environment diversity — training on trajectories from as many distinct environments as possible, so the model encounters the full spectrum of state-transition patterns rather than memorizing a narrow set
- Cross-domain generalization — experiments show that training on a single text domain yields gains on all other text domains, suggesting shared underlying environment modeling capabilities that compound as domain coverage grows
- World knowledge through CPT — environment trajectories alone cannot provide the factual grounding needed for faithful simulation. By incorporating specialized-domain world knowledge corpora during continual pre-training, the model acquires the factual substrate on which environment simulation depends
These three ingredients — environment diversity, cross-domain transfer, and world knowledge — together enable a single model to serve as a general-purpose simulator across seven agent interaction domains.
Deployment
Qwen has open-sourced Qwen-AgentWorld-35B-A3B, a language world model built on a MoE architecture with 35B total parameters / 3B active parameters, supporting a 256K context window. Available on Hugging Face and ModelScope.
AgentWorldBench is also available as per-domain JSONL files, each containing interaction trajectories with ground-truth observations from real environments. Evaluation uses a three-step pipeline: (1) infer — run the world model to generate predicted observations, (2) judge — score each prediction against the ground truth across five dimensions using an LLM judge, (3) aggregate — compute per-domain and overall scores. Both the world model and the judge use OpenAI-compatible APIs, supporting SGLang, vLLM, or proprietary endpoints.
🔗 Links: Blog Post · Paper · GitHub · Hugging Face · ModelScope
Fact Check Report
🔍 Verification Summary
Date: 2026-06-25
Claims checked: 40
Verified correct: 40 — All claims confirmed against primary sources.
Errors found: 0
✅ Claims Verified Against Primary Sources
Source: Qwen Blog (qwen.ai/blog?id=qwen-agentworld)
- Release date: June 22, 2026 — confirmed by blog header
- 7 domains (MCP, Search, Terminal, SWE, Web, OS, Android) — confirmed
- Text-based (4) + GUI-based (3) split — confirmed
- GUI observations as renderable code (XML, HTML, UI markup) not pixel frames — confirmed
- CPT → SFT → RL three-stage pipeline — confirmed
- 10M+ real environment interaction trajectories — confirmed ("more than 10M")
- 397B-A17B scores 58.71 on AgentWorldBench — confirmed
- GPT-5.4 scores 58.25 — confirmed
- Outperforms Claude Opus 4.8 and Gemini 3.1 Pro — confirmed
- 35B-A3B: 47.73 → 56.39 (+8.66 points) — confirmed
- Above Claude Sonnet 4.6 (56.04) — confirmed
- SFT: 7,094 training samples via rejection sampling — confirmed
- 129 thinking traces across 4 text-based domains — confirmed
- 1,347 "Wait!" interrupts (10.4 per turn) — confirmed
- 6-step causal reasoning example (curl pipeline) — confirmed
- 4,000 OpenClaw environments simulated — confirmed
- +4.3 Claw-Eval, +7.1 QwenClawBench (zero-shot) — confirmed
- Tool Decathlon +3.7, MCPMark +12.3 (controllable Sim RL) — confirmed
- WideSearch: Sim RL 50.3% vs Real RL 45.6% F1 — confirmed
- 1,000 fictional environments, 300-500 rows each — confirmed
- Paradigm II: +11.3 Claw-Eval, +9.7 QwenClawBench, +9.0 BFCL v4 — confirmed
- 3 ingredients: env diversity, cross-domain transfer, world knowledge — confirmed
- web_extractor: Sim RL 2.5→4.0, Real RL 2.5→1.5 — confirmed
- web_search: both ~5→~3.5 — confirmed
- Qwen3.6-Plus as simulator yields negligible improvement — confirmed
- Uncontrolled Sim RL: Tool Decathlon 32.4→31.5 — confirmed
Source: arXiv Paper (2606.24597)
- Paper title: "Qwen-AgentWorld: Language World Models for General Agents" — confirmed
- Published: 2026-06-23 — confirmed
- 33 authors — confirmed
- Model names: Qwen-AgentWorld-35B-A3B and Qwen-AgentWorld-397B-A17B — confirmed
Source: GitHub API (QwenLM/Qwen-AgentWorld)
- Repo exists, created 2026-06-22 — confirmed
- 395 stars, 36 forks — confirmed
- Apache-2.0 license — confirmed
Source: HuggingFace API (Qwen/Qwen-AgentWorld-35B-A3B)
- Model exists, created 2026-06-22 — confirmed
- 34.66B total parameters (BF16) — consistent with "35B"
- Architecture: Qwen3_5MoeForConditionalGeneration (MoE) — confirmed
- Base model: Qwen3.5-35B-A3B-Base — confirmed
- 3,389 downloads, 189 likes — confirmed
- Tags: world-model, agent, environment-simulation — confirmed
Source: HuggingFace Dataset API (Qwen/AgentWorldBench)
- Dataset exists, Apache-2.0 license — confirmed
- 248 downloads — confirmed
📝 Risk Assessment: LOW
Zero corrections needed. All 40 factual claims verified against primary sources (Qwen blog, arXiv paper, GitHub API, HuggingFace API). No discrepancies found.
Implications for the Agent Landscape
Qwen-AgentWorld represents a fundamental shift in how we think about agent training. The key implications:
World models as agent infrastructure. Just as language models became the foundation for agents, world models are becoming the foundation for training agents. The decoupled paradigm — using a world model as a simulator for agent RL — is analogous to how game engines are used to train reinforcement learning agents for Atari or robotics. But unlike game engines, a language world model can simulate any text-based or GUI-based environment without custom implementation.
Controllable simulation as a training primitive. The finding that controllable simulation is a prerequisite for Sim RL to work (not just a nice-to-have) suggests that the future of agent training involves carefully designed simulation environments, not just raw interaction data. The ability to inject targeted perturbations — API errors, paginated responses, fictional worlds — means we can systematically stress-test agents against edge cases that real environments rarely produce.
Internalized prediction as a reasoning capability. The unified paradigm shows that world modeling isn't just useful for simulation — it's a reasoning capability that transfers to downstream tasks. Teaching an agent to predict what happens next before acting is like teaching a human to think through the consequences of their actions. This is a fundamental reasoning skill that generalizes across domains.
The emergent reasoning patterns are fascinating. Self-correction, information leakage prevention, and multi-step causal reasoning are not things you explicitly train — they emerge from the objective of faithful environment simulation. This suggests that world modeling is not just a training technique, but a fundamentally different approach to building reasoning systems. The model learns to reason because reasoning is what faithful simulation requires.
Conclusion
Qwen-AgentWorld is the first model where environment simulation is not an emergent property but the explicit training objective. The results are compelling: it outperforms GPT-5.4, Claude Opus 4.8, and Gemini 3.1 Pro on environment simulation, and when used as a training tool, it produces agents that surpass those trained solely in real environments.
The two paradigms — decoupled simulation and unified agent foundation — are complementary, not competing. The decoupled paradigm gives us scalable, controllable simulation for agent training. The unified paradigm internalizes world modeling as a reasoning capability. Both point toward the same conclusion: language world models are a complementary axis for scaling general agents beyond what real-environment interaction alone can provide.
As Qwen puts it: world modeling opens a complementary axis for pushing the frontier. The question is no longer whether language models can simulate environments — it's how we'll use that capability to build the next generation of agents.