Safe RL's old gym got a rewrite and a vision upgrade
Safety-Gymnasium replaces OpenAI's stale Safety-Gym with a modern, vision-ready benchmark suite for algorithms that must respect hard constraints.

What it does
Safety-Gymnasium is a suite of physics-based environments for benchmarking reinforcement learning algorithms that must obey hard safety constraints—navigation, velocity limits, and multi-agent cooperation tasks where violations carry explicit costs. It is built on MuJoCo 2.3.0+ and deliberately sheds the deprecated mujoco-py dependency that froze the original OpenAI Safety-Gym in 2021. The library exposes the modern Gym API and tags every step with native constraint information so researchers can compare safe-RL methods on common ground.
The interesting bit
Instead of merely cloning the old Safety-Gym levels, the project adds vision-based perception tasks, multi-agent scenarios, and Isaac Gym integrations to the classic navigation and velocity suites. That breadth makes it a rare attempt to unify safe-RL benchmarking across sight, speed, and swarm behavior in one framework.
Key highlights
- Vectorized environments and the Gym 0.26.0+ API, both absent in the original Safety-Gym.
- Native constraint-aware APIs that surface safety costs directly rather than hiding them in
infofields. - Five environment families: Safe Navigation, Safe Velocity, Safe Vision, Safe Multi-Agent, and Safe Isaac Gym.
- Fixes known bugs from the original Safety-Gym and swaps the brittle
mujoco-pybackend for modern MuJoCo.
Caveats
- Recent releases (v1.1.0 and v1.2.0) are source-only because PyPI package-size limits block uploads; the team plans to move assets to cloud hosting eventually.
- Python 3.11 is off the table for now thanks to a
pygameincompatibility.
Verdict
Anyone training constrained policy optimization or safe exploration algorithms should migrate here from the aging OpenAI Safety-Gym. If your RL agents don’t need to worry about hard safety limits, this benchmark adds little to your stack.
Frequently asked
- What is PKU-Alignment/safety-gymnasium?
- Safety-Gymnasium replaces OpenAI's stale Safety-Gym with a modern, vision-ready benchmark suite for algorithms that must respect hard constraints.
- Is safety-gymnasium open source?
- Yes — PKU-Alignment/safety-gymnasium is open source, released under the Apache-2.0 license.
- What language is safety-gymnasium written in?
- PKU-Alignment/safety-gymnasium is primarily written in Python.
- How popular is safety-gymnasium?
- PKU-Alignment/safety-gymnasium has 576 stars on GitHub.
- Where can I find safety-gymnasium?
- PKU-Alignment/safety-gymnasium is on GitHub at https://github.com/PKU-Alignment/safety-gymnasium.