OpenEnv: Agentic Execution Environments#
A unified framework for building, deploying, and interacting with isolated execution environments for agentic reinforcement learning—powered by simple, Gymnasium-style APIs.
What is OpenEnv?#
OpenEnv is an end-to-end framework designed to standardize how agents interact with execution environments during reinforcement learning (RL) training. At its core, OpenEnv provides a consistent, Gymnasium-compatible interface through three simple APIs: step(), reset(), and state().
Why OpenEnv?#
Training RL agents—especially in agentic settings like code generation, web browsing, or game playing—requires environments that are:
Isolated: Each agent instance runs in its own sandboxed environment, preventing interference and ensuring reproducibility.
Scalable: Environments can be deployed as HTTP services or containerized with Docker, enabling distributed training across clusters.
Standardized: A unified API means researchers and practitioners can switch between environments without rewriting integration code.
OpenEnv bridges the gap between environment creators and RL practitioners:
For Researchers & Framework Authors: Interact with any OpenEnv-compatible environment using familiar Gymnasium-style APIs—no need to learn environment-specific protocols.
For Environment Creators: Build rich, production-ready environments with built-in support for HTTP deployment, Docker packaging, and security isolation.
Key Features#
Familiar step(), reset(), and state() interface for seamless integration with existing RL frameworks.
Package environments as containers for consistent, reproducible deployments across any infrastructure.
Deploy environments as HTTP services for distributed training and remote execution.
Run untrusted agent code safely with sandboxed execution environments.
Pre-built environments for games, coding, web browsing, and more.
Powerful command-line interface for environment management and deployment.
Getting Started#
New to OpenEnv? Follow our recommended learning path:
Getting Started Tutorials — A hands-on, 3-part series covering what OpenEnv is, how to use existing environments, and how to build your own.
Build Your Own Environment — The complete reference guide for creating, packaging, and deploying custom environments with Docker and Hugging Face Hub.
Explore Environments — Browse pre-built environments for games, coding, web browsing, and more.
How Can I Contribute?#
We welcome contributions from the community! If you find a bug, have a feature request, or want to contribute a new environment, please open an issue or submit a pull request. The repository is hosted on GitHub at meta-pytorch/OpenEnv.
Warning
OpenEnv is currently in an experimental stage. You should expect bugs, incomplete features, and APIs that may change in future versions. The project welcomes bug fixes, but to ensure coordination, please discuss significant changes before starting work. Signal your intention to contribute in the issue tracker by filing a new issue or claiming an existing one.