Quick Facts
- Google released EnvHarness under an Apache 2.0 license on GitHub, alongside experiment configurations and a reinforcement learning implementation.
- Agents trained with EnvHarness improved by up to 9.0 points on held-out tasks while using 9.8% fewer interaction steps compared to standard training environments.
- On SWE-bench Verified, EnvHarness scored 54.79 against 52.13 for the original environment and outperformed the SWE-smith baseline by 2.46 percentage points.
Google Cloud AI Research has released EnvHarness, an open source framework that wraps static training environments for large language model agents and reshapes them based on each agent's specific weaknesses. The code is available on GitHub under the Apache 2.0 license.
The framework was developed by Chengsong Huang, Zifeng Wang, and colleagues from Google Cloud AI Research, Google Cloud, Washington University in St. Louis, and the University of North Carolina at Chapel Hill. Their paper, titled "EnvHarness: Awakening Static Worlds for Agent Learning," was published on arXiv on August 21, 2026.
The Problem With Static Training Environments
Building training environments for AI agents is expensive. Once built, those environments stay fixed even as the agent improves. The agent eventually exhausts what the environment can teach it.
Existing methods for generating new environments require domain-specific pipelines and expensive verifiers. EnvHarness takes a different approach: it modifies existing environments rather than building new ones from scratch.
How the Framework Works
EnvHarness places a programmable layer around an existing environment. It can change where an agent starts, what it observes, which actions it can take, and how long a task runs. The underlying environment and its verifier stay untouched.
The system has three core components. Setup reshapes the initial state. Rule changes which actions are allowed and what the agent sees. Link pulls in tasks from another environment. A concrete example from the ALFWorld benchmark: a task normally requires an agent to place a mug on a desk. The mug starts in plain sight. A Setup component places it inside a closed drawer, forcing the agent to search before completing the task.
A second module called EnvRigger automates the modification process. It follows an Observe, Diagnose, Write, Validate loop. EnvRigger runs the agent five times, identifies recurring failure patterns such as repetitive action loops or failures parsing long outputs, writes Python code to reshape the environment, then validates the changes on five fresh runs. Modifications that produce unsolvable or trivially easy tasks are rejected. The system allows up to five revision rounds per task.
Generated code compiles in an isolated subprocess, so a bad mutation produces a recorded trace rather than a failed run.
Benchmark Results
On ALFWorld, an embodied task benchmark, agents trained with EnvHarness improved from 62.4% to 68.3% on standard tasks and jumped 9.0 points to 70.4% on out-of-distribution tasks. On SWE-bench Verified, a software engineering benchmark, EnvHarness scored 54.79 compared to 52.13 for the original environment. Average trajectory length dropped from 55.01 steps to 49.61.
In reinforcement learning tests using GRPO on Qwen3-8B-base, EnvHarness beat the original environments on three of four metrics. ALFWorld in-distribution performance climbed from 81.4 to 87.9. A co-evolution loop that repeatedly reshapes environments as the agent improves pushed SWE-bench scores from 47.7 to 54.8 over three rounds.
What This Means for Teams Building AI Agents
Companies training agents for coding, customer support, or workflow automation typically face a hard ceiling: the training environment stops being useful once the agent gets good enough at it. EnvHarness offers a way to extend the useful life of existing environments without rebuilding them.
"Agent-side optimization cannot happen in a vacuum," said Zifeng Wang of Google Cloud AI Research. "An agent's internal planning, reflection, and decision-making are shaped by its interactions with the outside world."
The Apache 2.0 license means teams can adopt and modify the framework without restriction. The researchers frame the release around the reinforcement learning training loop, arguing EnvHarness provides a continuous, targeted signal for improving both the agent and the environment together.
Read more: Google's open source EnvHarness lets AI agents train against environments that evolve with them
This article was written by an AI agent. Spotted an error? Send a correction and we will fix it.
