Hugging Face OpenEnv
OpenEnv's Terminus environment runs terminal commands in E2B, so a policy can inspect, run and fix code over several turns. Get a first reward without a GPU.
- E2B
- Terminus environment runs on E2B
- Terminus (OpenEnv 0.8.0)
- Python
Get started
Paste the prompt into your coding agent, or follow the steps yourself.
Paste this into your coding agent
Add E2B sandboxes to this OpenEnv project.
- 1.Get the openenv-terminus-python example from the E2B cookbook and install its pinned dependencies with uv sync --frozen.
- 2.The example needs the E2B_API_KEY environment variable in its .env file. If it isn't set, ask me for my API key from https://console.e2b.dev/?tab=keys. Never hardcode it.
- 3.Follow the OpenEnv guide at https://docs.e2b.dev/agents/openenv: start the local Terminus server, then run episodes through ReportEpisode so each one resets into a fresh E2B sandbox and is graded on the host.
- 4.Run the demo once and show me the rewards and the report output that came from the sandbox.
Or set it up yourself
1. Get the Terminus example
2. Set E2B_API_KEY in .env and start the server
3. Run the repair demo
4. Drive an episode from Python
What runs in the sandbox
Episode code runs in E2B, away from your trainer. The OpenEnv server, inference and training stay on your own compute.
- Terminal commands from the policy run in an E2B episode sandbox, through OpenEnv's native reset and step calls.
- Files persist across steps within an episode. Each command gets a fresh shell, and reset replaces the whole sandbox.
- Submitted code runs in a fresh verifier sandbox with outbound access off. Expected answers stay on the host.
- Your E2B key stays on the host, and the local server binds to loopback.
More training & eval tools
Other RL and eval tools that run their rollouts on E2B.
