Safe and Scalable Web Agent Learning via Recreated Websites
Abstract
Training autonomous web agents is fundamentally limited by the environments they learn from: real-world websites are unsafe to explore, hard to reset, and rarely provide verifiable feedback. We propose VeriEnv, a framework that treats language models as environment creators, automatically cloning real-world websites into fully executable, verifiable synthetic environments. By exposing controlled internal access via a Python SDK, VeriEnv enables agents to self-generate tasks with deterministic, programmatically verifiable rewards, eliminating reliance on heuristic or LLM-based judges. This design decouples agent learning from unsafe real-world interaction while enabling scalable self-evolution through environment expansion. Through experiments on web agent benchmarks, we show that agents trained with VeriEnv generalize to unseen websites, achieve site-specific mastery through self-evolving training, and benefit from scaling the number of training environments.
Lay Summary
AI agents that use websites need practice to become reliable, but training them directly on real websites can be risky. They may accidentally change real data, violate website rules, or get blocked by security systems. It is also hard to know whether an agent truly completed a task correctly. This paper introduces VeriEnv, a framework that automatically recreates real websites as safe, simulated websites for training AI agents. These recreated websites include working pages, backend logic, and databases, so agents can practice realistic web tasks without affecting real users or services. VeriEnv also creates tasks with automatic checkers that can verify whether the agent succeeded, instead of relying on another AI model to guess the result. Experiments show that agents trained with VeriEnv improve on web-agent benchmarks, generalize to websites they have not seen before, and continue improving when trained repeatedly on a recreated website. Overall, this work provides a safer and more reliable way to train web agents at scale.