Synthetic RL environments for agent training: a map
Read first: The Landscape of Agentic Reinforcement Learning for LLMs: A Survey · Reinforcement Learning: An Introduction, Ch. 3 — Finite MDPs, Returns and Episodes
TL;DR. Agentic RL needs places where an agent can act, fail, reset and be scored, thousands of times. Between 2024 and 2026 the field moved from hand-built benchmarks (a handful of τ-bench domains, a few SWE repos) to environment factories. Some turn real repositories into tasks (SWE-Gym, R2E-Gym, SWE-smith). Some let an LLM write databases, tools and checkers (AWM, AgentScaler, EnvScaler, DeepSeek-V3.2). Some let an LLM play the world (Kimi K2, Simia, DreamGym, ZeroSearch). Others generate puzzles from programs (RLVE, Reasoning Gym, Enigmata). This page defines the parts of an environment, sorts the works into four families and compares them.
Why it matters now. Recent open agentic model reports spend pages on environments, and an analysis of agentic data scaling (Agentic data scaling) estimates that adding environments is worth more than adding trajectories. For a search-agent researcher, the retrieval stack is the environment: the corpus, the retriever and the answer checker decide what the policy can learn and how it can cheat. Seeing how other domains build environments at scale is the fastest way to design better ones for search.
How to read this group. IR-first route: this map, then Building a retrieval environment (which walks through one search episode step by step), then Agent World Model. After that, pick by interest: SWE-smith for real sandboxes, LLM-simulated environments, or procedural gyms. Read environment interfaces when you implement something; its optional algorithm material assumes REINFORCE and returns.
What an environment is
Section titled “What an environment is”Formally the agent faces a partially observed MDP. In LLM terms an environment is a bundle of six things:
- Task generator. Samples a task (an instruction, sometimes a hidden goal) and an initial state. In SWE-smith it is a bug injected into a repo; in AWM it is one of ten tasks written for each synthetic app.
- State. What the world remembers between steps: a database, a repository, a corpus, a game board. Observations are what the agent sees of it.
- Tools, i.e. the transition. The action is usually a tool call (or a final answer). Executing the call is the transition: it may change the state. The text it returns is the observation. So the tool code implements the transition and the observation function together.
- Verifier, i.e. the reward. Code or a model that maps the final state or answer to a scalar. This is where most of the engineering and most of the hacking risk sit.
- Reset and sandbox. Each rollout starts from an isolated state sampled from the specified initial-state distribution (matched trials can reuse a seed), and must not damage anything outside it. Containers, database snapshots and frozen corpora make this possible.
- Simulated user (optional). For conversational tasks an LLM plays the customer, as in τ-bench-style settings and in Kimi K2 and AgentScaler.
GEM, OpenEnv and Prime Intellect’s verifiers standardize different layers of environment execution and rollout collection so that trainers and environments can be swapped. Their APIs are not identical: GEM and OpenEnv expose Gym-style reset() / step(), while verifiers v1 splits the bundle into taskset, harness and runtime. See Environment interfaces and hubs.
Four ways to build environments
Section titled “Four ways to build environments”1. Real sandboxes. Use the real system and generate tasks inside it. For software engineering this means Docker images of real repositories, with tests as verifiers. SWE-smith builds one image per repository and injects many bugs into it, which scales to 50k tasks; SWE-Gym and R2E-Gym build environments per task from real issues or commits. Real search APIs and browsers belong here too. Fidelity is the highest, and so are cost, latency and non-determinism.
2. Synthetic, code-backed. An LLM writes the world: a database schema, sample data, tool code and a verification function. The result is executable and deterministic, so state stays consistent across turns. Agent World Model produces 1,000 SQLite-backed MCP apps with 35,062 tools. AgentScaler clusters 30,000 real APIs into more than 1,000 database-backed domains. DeepSeek-V3.2 synthesizes 1,827 environments and keeps only tasks its own model solves at least once in 100 tries (Frontier-lab pipelines).
3. LLM-simulated. An LLM plays the tools, the user or the whole world. Kimi K2 calls its tool simulator “functionally equivalent to a world model”. Simia-RL and DreamGym can run policy RL without live real-environment execution. DreamGym still needs real offline trajectories to train and ground its simulator, and DreamGym-S2R then adds real-environment RL. ZeroSearch replaces the search engine with an LLM that writes relevant or noisy documents. Cheap to create and to scale, but the transition can hallucinate. Reward generation is a separate choice: Simia and DreamGym use model-generated feedback, whereas ZeroSearch keeps rule-based answer F1 against gold.
4. Procedural. A program generates problems with a difficulty knob and checks answers exactly. RLVE, Reasoning Gym and Enigmata supply hundreds of such generators. Verification is exact and the supply is unlimited, but the tasks are puzzles, mostly single-turn, and transfer to real agent work is indirect.
Design trade-offs
Section titled “Design trade-offs”On hackability specifically: SWE environments inherit the problems documented in SWE-bench Pro and Verified audits and ImpossibleBench, where agents edit or special-case tests instead of fixing code. Judge-based rewards inherit verifier robustness and noisy verifier problems. An environment builder should assume the policy will find any shortcut the verifier allows.
Comparison of the main works
Section titled “Comparison of the main works”| Work | Family | What is generated | Reward / verifier | Scale (as reported) | Training use |
|---|---|---|---|---|---|
| SWE-Gym (2412.21139) | real sandbox | executable envs for real GitHub issues | repo unit tests | 2,438 tasks, 11 repos | SFT on agent trajectories; trained verifiers |
| R2E-Gym (2504.07164) | real sandbox | tasks from commits; back-translated issues; generated tests | fail-to-pass tests | 8,135 tasks (4,578 after decontamination) | SFT; hybrid test-time verifiers |
| SWE-smith (2504.21798) | real sandbox, synthetic bugs | bugs injected into installed repos; LM-written issues | fail-to-pass tests | 50,137 tasks, 128 repos | rejection-sampling SFT |
| AWM (2602.10090) | synthetic, code-backed | SQLite DB, MCP tools, verification code | DB diff + LLM judge | 1,000 envs, 35,062 tools, 10,000 tasks | GRPO-style RL |
| EnvScaler (2601.05808) | synthetic, code-backed | env skeletons, scenarios, rule checks | rule-based validation | 191 envs, ~7K scenarios | SFT + RL |
| AgentScaler (2509.13311) | synthetic, code-backed | DB-backed domains from 30k APIs | final DB state, tool sequence | >1,000 domains | two-stage SFT |
| DeepSeek-V3.2 (2512.02556) | mixed | general-agent envs; search QA; code envs | verification functions, tests, rubric GRM | 1,827 general envs; >85k agentic prompts | RL |
| Kimi K2 (2507.20534) | LLM-simulated + real | 23k+ tools, agents, users, rubric tasks | LLM judge | thousands of agents | SFT data; real sandboxes for SWE RL |
| Simia (2511.01824) | LLM-simulated | the environment itself | LLM judge (0/1) | ~90k τ-style trajectories | SFT + RL |
| DreamGym (2511.03773) | LLM-simulated (trained model) | next state and reward | model-predicted outcome | WebShop, ALFWorld, WebArena | RL on synthetic experience |
| RLVE (2511.07317) | procedural | adaptive-difficulty generators | algorithmic | 400 envs | DAPO RL |
| Reasoning Gym (2505.24760) | procedural | task generators | algorithmic | >100 generators | RLVR |
| Enigmata (2505.19914) | procedural | puzzle tasks in 7 categories | rule verifier | 36 tasks | RLVR |
| ScaleSWE (2602.09892) | real sandbox | env setup, tests and problem statements by three agents | fail-to-pass tests | 100k instances, 5.2k repos | SFT (distillation) |
| EnvFactory (2605.18703) | synthetic, code-backed | stateful tool envs explored from authentic resources; natural multi-turn tasks | executable verification | 85 envs, 7 domains, 2,575 trajectories | SFT + RL |
| InfiniteWeb (2601.04126) | synthetic GUI | functional websites, tasks, instrumented evaluators | dense progress reward | 600 training tasks | GRPO RL |
| AutoWebWorld (2602.14296) | synthetic GUI | websites defined as finite-state machines | goal state in the FSM | 29 sites, 11,663 verified trajectories | GRPO on synthesized steps |
| SPADE (2608.19197) | adaptive, code-backed | the policy itself writes reset/step environments | generated reward code | regenerated during training | self-play RL |
Newer directions (2026)
Section titled “Newer directions (2026)”The families above treat the environment pool as fixed once built. Three later lines of work change that picture; none needs its own page yet, but each fills a gap.
- Adaptive executable generation. In SPADE (2608.19197, work in progress) one LLM plays two roles. An Environment Designer writes stateful, multi-turn environments as executable code with a Gym-style
reset()/step()interface, and a Reasoning Agent learns to act in them. The designer is rewarded by the agent’s regret, estimated as the gap between its reward with and without a privileged hint, so it learns to target environments at the edge of the agent’s ability while keeping them feasible. This sits between AWM’s generated-once pool and RLVE’s hand-written difficulty knobs. At 30B it reports +5.3 on average over the strongest fixed-environment baseline across eight held-out reasoning benchmarks, and +5.7 on BFCL-v4 multi-turn and +13.9 on ACEBench-Agent. Its tool-use comparison with AWM, EnvScaler and AgentScaler transcribes their published numbers, which the authors note differ in data, budget and protocol, so it is not a controlled head-to-head. - Synthetic GUI worlds. InfiniteWeb (2601.04126, ACL 2026) generates functional multi-page websites, tasks and evaluators instrumented to track task variables, which gives dense partial-credit rewards. GRPO on 600 generated tasks lifts UI-TARS-1.5-7B from 24.5% to 31.4% on OSWorld and from 23.0% to 28.7% on Online-Mind2Web. AutoWebWorld (2602.14296) instead defines each site as a finite-state machine with explicit states, actions and transitions, so action correctness and task success are checked against the FSM; it produces 11,663 verified trajectories from 29 sites. It trains with GRPO on the synthesized step and grounding examples, not online in the generated sites.
- Quality and automation over raw count. EnvFactory (2605.18703) builds only 85 verified environments but synthesizes natural multi-turn tasks with implicit intents, and reports better downstream results than pipelines with several times more environments (see AgentScaler, EnvScaler and EnvFactory). ScaleSWE (2602.09892) shows that task-first SWE construction can be automated to 100K instances (see SWE-smith).
Where search agents fit
Section titled “Where search agents fit”Search-agent RL already uses all four families: live web APIs (real), frozen corpora with local retrievers (real but controlled), LLM-simulated search engines (ZeroSearch) and synthetic question pipelines (training-data synthesis). DeepSeek-V3.2 builds its 50,275 search prompts with a question-writing agent and a verifier agent, and Tongyi DeepResearch trains on a ladder from an offline Wikipedia simulator to real tools (Tongyi DeepResearch). He et al. already treat retrieval backend, snippet format and page-fetch availability as environment variants in their search domain. What is still missing is an AWM-scale factory for retrieval environments: many independent corpora, many retrievers, verified questions. Building a retrieval environment sketches how an IR researcher would build one.
Limitations & open questions
Section titled “Limitations & open questions”- Most comparisons change several things at once (tasks, base model, RL recipe), so “which environment family is best” is not settled.
- Generated environments have bugs. AWM finds at least one bug in 74% of sampled environments, yet only about 4% of RL rollouts hit an environment error; AWM does not quantify how often bugs become exploitable rewards.
- Few works release the environment and the policy together with a held-out real-world evaluation, which makes sim-to-real claims hard to check.
- Environment synthesis for long-horizon, multi-application and retrieval-heavy work is still thin.
Connections
Section titled “Connections”- The landscape of agentic RL covers the algorithms and frameworks that consume these environments; RAGEN studies training dynamics on small grid environments.
- Long-horizon tool agents and RL infrastructure cover the systems side (asynchronous rollouts, sandboxes).
- Agentic data scaling fits scaling exponents to environments, tasks and trajectories, with AWM environments as one synthesis method.
- Lab reports: Kimi K2, GLM-4.5, DeepSeek-V3.2.
- Reward design: rewards map, outcome vs process rewards, agent reward hacking.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
AWM reports about 57 USD of GPT-5 calls per 100 synthesized samples, and its RL step uses 64 tasks × 16 rollouts with an LLM judge costing about 1.80 USD per step. SWE-smith reports 1,360 USD for 50,137 task instances. Estimate (a) the generation cost of AWM's 1,000 environments, (b) the judge cost of a 96-step AWM run, and (c) SWE-smith's cost per instance. What do the three numbers say about where the money goes in environment-based RL?
What a strong answer covers
- (a) 57.09 USD per 100 × 10 = about 570 USD for 1,000 environments (Table 1 averages costs per 100 samples; treat this as an order-of-magnitude figure).
- (b) 96 steps × 1.80 USD ≈ 173 USD of judge calls, small next to the GPU cost of 1,024 rollouts per step for up to 20 turns each.
- (c) 1,360 / 50,137 ≈ 0.027 USD, about 2.7 US cents per instance. Issue text was written for only 10K of the bugs, at about 2.54 cents each.
- Synthesis is cheap next to rollouts and storage: SWE-smith needs 295 GB of images for 50k tasks, where per-task images would need terabytes. The binding costs are rollout compute, sandbox throughput and engineering time, not the LLM calls that write the environment.
- Mechanism
Write down the parts of an RL environment for an LLM agent as a POMDP (state, observation, action, transition, reward, initial-state and task distribution, reset). For a synthetic SQLite-backed app (AWM), an SWE repo (SWE-smith) and an LLM-simulated tool (Simia), say what implements each part and which parts can drift or be wrong.
What a strong answer covers
- AWM: state = the SQLite database; actions = MCP tool calls; observations = tool outputs; transition = generated Python tool code; reward = verification code that diffs the database before and after, plus an LLM judge; reset = reload the initial database.
- SWE-smith: state = the repository and its tests inside a Docker image; actions = shell and edit commands; transition = real execution; reward = fail-to-pass and pass-to-pass tests; reset = restart the container at the buggy state.
- Simia: an LLM produces the next observation from the history and tool spec, and an LLM judge gives the reward. There is no external state, so consistency across turns is only as good as the simulator's reading of the conversation.
- What can be wrong: generated tool code has bugs (AWM finds bugs in 74% of sampled environments), tests can be weak or leak the fix, and simulated tools can hallucinate or be too forgiving.
- Critique
Several 2025–2026 papers report that a cheap environment (an LLM simulator, or SFT on synthesized trajectories) matches training on real or code-backed environments. AWM reports a mixed picture: its GPT-5 simulator baseline gives negligible or negative BFCLv3 changes at 4B and 8B but +6.43 points at 14B, and code-backed AWM is stronger at every size. Critique the evidence on both sides and say what an experiment would need to settle the question.
What a strong answer covers
- Simia and DreamGym evaluate on benchmarks close to their seeds (τ²-bench, WebShop, ALFWorld) with strong simulators; AWM's simulator baseline used the same tasks and tools but no grounded state. On BFCLv3 it moved 4B from 54.92 to 55.52 and 8B from 53.83 to 52.53, but 14B from 61.25 to 67.68; AWM was higher at each size (70.18 at 14B), and the simulator did comparably on some τ² cells.
- Confounds: base model, task source, number of tasks, RL algorithm and evaluation benchmark all differ between papers; few hold the task set fixed and swap only the transition and reward implementation.
- Benchmark overlap: AWM suggests EnvScaler's tasks may resemble τ², and AgentScaler's generated τ-bench domains closely matched the official ones, so gains there may reflect domain match rather than environment quality.
- A clean test: fix tasks, tool schemas, policy and RL recipe; vary only the environment back end (real, code-backed, LLM-simulated); evaluate on held-out real environments; report reward-hacking and simulator-error rates as well as accuracy.
- What if…
Collect the "how many environments" evidence from this group: AWM's 10 / 100 / 526 environment scaling, SWE-smith's repository-count curve, and DeepSeek-V3.2's comparison of RL on synthetic general-agent tasks versus code and search only. What does each hold fixed, what does it show, and what does it not show?
What a strong answer covers
- AWM Fig. 4: training on 10 environments hurt, 100 gave large gains and 526 improved further; at matched counts AWM beat EnvScaler. The RL recipe is fixed.
- SWE-smith Fig. 5: with the SFT training set fixed at 700 expert trajectories, more distinct repositories (4, 25, 50, 100) improved resolve rate roughly logarithmically. This is diversity at fixed training-set size, and it is SFT, not RL.
- DeepSeek-V3.2 Fig. 5: RL on the synthetic general-agent environments alone improved Tau2, MCP-Mark and MCP-Universe, while RL on code and search environments alone did not, so environment type, not just count, matters for transfer.
- None of these, on its own, shows that another environment is always worth more than another task per environment, or separates count from domain coverage of the evaluation benchmark; AWM's sweep changes the pool of environments and tasks together. He et al. vary these axes separately (see the agentic-data-scaling page).
- Design
You must pick an environment strategy for RL on a deep-research agent that answers multi-hop questions over a document collection. Choose among a real web search API, a frozen corpus with your own retriever, an LLM-simulated search engine and procedurally generated retrieval puzzles. Say what you would use at each stage of training and how you would guard against reward hacking.
What a strong answer covers
- Bulk RL: a frozen corpus (for example the BrowseComp-Plus collection or a Wikipedia snapshot) with BM25 and a dense retriever as tools; deterministic, cheap, resettable, and the answer set is fixed so rewards stay valid.
- Simulated search (ZeroSearch-style) helps control noise and difficulty, but the simulator sees the gold answer, so audit for leakage and check transfer to a real index.
- Real web API only for the last stage and for evaluation, with caching and date limits; the web changes, costs per call and can leak benchmark answers.
- Hacking guards: keep the answer judge fixed and separate from the policy, block tools that reveal answers, check citations against retrieved text, and track training reward against held-out accuracy.
- Research idea
AWM explicitly leaves out information-retrieval environments, and most environment-synthesis pipelines generate stateful CRUD apps. Propose a research project on automatically synthesizing retrieval environments (corpus, tools, tasks, verifier) at the scale AWM reaches for apps. What would you generate, how would you verify it, and what would count as evidence that it helps?
What a strong answer covers
- Generate: topic-specific sub-corpora carved from a large crawl, retriever configurations (BM25, dense, hybrid, different chunkings), and multi-hop questions built backwards from linked documents with a known evidence chain.
- Verify: every question must be answerable from the corpus (an agent given the evidence finds it) and not answerable without search; drop questions whose answer sits in one snippet; check answer uniqueness.
- Diversity: vary retrievers and corpora as separate axes, since the agentic-data-scaling analysis finds environments worth more than extra trajectories.
- Evidence: gains on held-out real benchmarks (BrowseComp-Plus with a fixed retriever, live-web BrowseComp) at matched compute, plus a scaling curve in the number of synthesized environments.