OpenEnv documentation
Connecting to Servers
Get Started
Guides
Tutorials
OverviewHello WorldTrain a reasoning model with TRLMCP EnvironmentsRubricsRL Training with TRLRL Training with UnslothEvaluating with Inspect AIRL Training with an Agentic HarnessSFT Training with Environments
Environments
API Reference
Project
Connecting to Servers
This page is still being filled in. Missing: guidance on which connection method to pick for each scenario, troubleshooting for timeouts / HF Space cold-starts / auth errors, and the MCP client path.
Learn how to connect to OpenEnv environments via different methods.
Connection Methods
HTTP URL (Remote Servers)
Connect to environments running on remote servers or Hugging Face Spaces:
from openenv import AutoEnv
# HuggingFace Space
env = AutoEnv.from_env("openenv/echo_env")
# Direct URL
env = AutoEnv.from_env("echo", base_url="http://your-server:8000")Docker (Local Development)
Run environments locally using Docker:
from openenv import AutoEnv
env = AutoEnv.from_env(
"coding",
docker_image="coding-env:latest",
wait_timeout=60.0
)Hugging Face Spaces
OpenEnv environments can be hosted on Hugging Face Spaces for easy sharing:
env = AutoEnv.from_env("username/my-environment")Next Steps
- Auto-Discovery - Discover available environments
- Async vs Sync Usage - Choose the right client mode