EnvHarness: Awakening Static Worlds for Agent Learning
Instead of building new training worlds from scratch, this work adds a plug-in layer that reshapes existing ones around each agent's actual weaknesses
LLM agents learn by practicing in environments, but hand-built environments stay frozen and eventually stop challenging an improving agent. EnvHarness wraps an existing environment with small plug-in components (changing the starting state, the allowed actions/observations, or chaining tasks together) without touching the environment's own logic or its trusted success-checker. An automated system called EnvRigger watches an agent's successes and failures, writes the right plug-in components to target its specific flaws, and tests them before keeping them.
What they did
- Problem: existing agent-training environments are hand-built and static, so they can't target a specific agent's weaknesses and stop teaching once the agent masters them; prior auto-generation methods are domain-specific and depend on unreliable LLM-generated checkers.
- Solution: EnvHarness borrows the idea of an 'agent harness' (tools/memory added around a frozen model) and applies it to the environment side — a frozen environment gets wrapped by three component types: Stage (changes the starting state), Contract (changes allowed actions/observations/feedback), and Chain (links two environments into one longer task), all while keeping the original verifier intact.
- Automation: EnvRigger treats the target agent as a black box, observes its trajectories, diagnoses what's going wrong (e.g., repetitive loops, misreading long text, exploiting a shortcut), writes candidate components, and validates them with fresh rollouts before accepting them, revising or rejecting ones that don't work.
- Results: tested on five benchmarks in four domains (ALFWorld, WebArena, SWE-bench Verified, OfficeQA, SpreadsheetBench), agents trained with EnvHarness-reshaped environments beat both training on the original environments and domain-specific environment-generation baselines, gaining up to 9.0 points on held-out tasks while using 9.8% fewer execution steps on SWE-bench Verified.
- Extra findings: the same approach also produces a stronger reinforcement-learning training signal, keeps improving as more environments are added (while original/generated environments plateau), and works across different model backbones from weak to strong.



| Benchmark | Training | Evaluation |
|---|---|---|
| ALFWorld | 100 tasks from the standard train set | all remaining held-out tasks |
| WebArena | 20 tasks per sub-domain | all remaining tasks |
| SWE-bench | 100 tasks from SWE-bench Lite | 407 Verified issues not in Lite |
| OfficeQA | 50 tasks (official split) | 172 official test tasks |
| SpreadsheetBench | 100 of the 400 verified tasks | 299 held-out tasks (897 instances) |



Why it matters
For anyone training AI agents, this offers a way to keep a training environment useful over time without manually redesigning it for every new agent version. It suggests a general recipe — diagnose an agent's specific flaws, then reshape its practice ground around them — that could apply across coding, web, office, and embodied-task settings using the same underlying interface.



Terms in this paper
- LLM agent · An AI system built on a large language model that takes actions in an environment (e.g., clicking web pages, editing code) rather than just answering questions.
- 환경(environment)/verifier · The simulated task setting an agent interacts with, plus the checker that scores whether the agent succeeded.
- Stage/Contract/Chain · The three plug-in component types: Stage changes the starting situation, Contract changes what actions/observations are allowed, Chain links two tasks into one longer episode.
- black-box observation · Studying an agent only by watching its inputs/outputs and behavior, without looking inside its internal weights.
- reinforcement learning (RL) / GRPO · A training method where a policy improves from reward signals collected by trying actions; GRPO is one such optimization algorithm used here.
Original abstract (English)
LLM agents learn by interacting with environments, yet these environments are hand-built and static: blind to an agent's weaknesses, and quickly left behind as it improves. While recent environment generation methods attempt to address this, they require domain-specific pipelines, rely on expensive or unreliable verifiers, and still produce static environments. To alleviate the engineering burden of rebuilding environments from scratch, we propose Environment Harness (EnvHarness), a programmable layer of plug-in components that wraps a static environment to reshape its behavior without modifying the underlying logic. Operating through standard interfaces, EnvHarness applies across diverse domains while ensuring every reshaped environment retains its original verifier. To automate this process, we introduce EnvRigger, which treats the target policy as a black box, observing its execution trajectories to synthesize EnvHarness components targeting diagnosed flaws, and validating them via fresh rollouts. Across five benchmarks in four domains, EnvHarness outperforms both original environments and domain-specific environment generation pipelines, achieving up to a 9.0-point improvement on held-out instances with 9.8% fewer execution steps. Furthermore, EnvHarness provides a superior optimization signal for reinforcement learning, enabling continuous, targeted co-evolution of the policy and its environment.
Read on arXivLatest papers
- Write Once, Run Everywhere: The Axon DSL for Shape-Safe and Framework-Agnostic LLM Architectures
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM Agents
- SafeBranch: Branch-Pair Safety Alignment for Embodied Agents
- TESTNAV: Pareto-Guided Search for Compositional Robustness TestingA smarter way to test AI models against combined real-world glitches, without checking every possible combination
- GenMatch: An End-to-End Generative Matching Framework for Micro-View Order-Dispatching in Ride-HailingDiDi replaced its multi-step ride-hailing dispatch pipeline with one generative model and saw real-world gains
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM ServingMaking sparse attention fast enough and accurate enough for real LLM serving, not just papers
- Natural Language Code Retrieval for 1C:Enterprise: An Open Benchmark and Efficient Bi-EncoderA first-of-its-kind search benchmark and AI model let you find 1C business-software code using Russian-language questions
- Robust Incomplete Multimodal Sentiment Analysis via Iterative Proxy CorrectionWhen text input is missing or broken, this AI doesn't guess once and move on—it revises its guess step by step to read emotions more reliably
Latest from METAL LAB
- Musk: "Optimus + Grok will one day handle healthcare for all humanity"
- 35% of Web Pages Published Since ChatGPT Show Signs of AI Authorship
- GPT-Image-2 adds transparent background preview in API
- Claude Computer Use, Browser Tool, Skills API Reach General Availability
- Hermes Agent Declares "Fully Open to Forking and Self-Hosting"
Figures: Chengsong Huang et al., arXiv:2608.19880, CC BY 4.0