Gymnasium — Standard RL Environment API
Farama Foundation's MIT-licensed reinforcement learning toolkit — the standard interface for RL environments including Atari, MuJoCo, CartPole, and 100+ more.
Gymnasium — Standard RL Environment API
Gymnasium (formerly OpenAI Gym) is the community standard API for reinforcement learning environments, maintained by the Farama Foundation. It defines a universal step/reset/render interface used by virtually every RL algorithm library, enabling agents to be trained across Atari 2600 games, physics simulations (MuJoCo, Box2D), robotics tasks, and custom game environments without code changes.
Key Features
- 100+ built-in environments: Atari, MuJoCo, CartPole, LunarLander, BipedalWalker, and Toy Text
- Standard
gymnasium.Envinterface adopted by Stable-Baselines3, CleanRL, RLlib, and all major RL frameworks - Wrappers for reward shaping, observation normalization, frame stacking, and time limits
- Vector environments (
gymnasium.vector) for parallel data collection on multi-core machines - Python 3.10–3.14, active maintenance and bug fixes
Quick Start
pip install gymnasium[classic-control]
import gymnasium as gym
env = gym.make("CartPole-v1", render_mode="human")
obs, info = env.reset(seed=42)
for _ in range(1000):
action = env.action_space.sample() # random policy
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()
npx ai-supply add gymnasium-rl-environments
Curated mirror of the open-source Gymnasium (MIT). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/gymnasium-rl-environments/check). Click a policy:
Consume Gymnasium — Standard RL Environment API programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/gymnasium-rl-environments
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/gymnasium-rl-environments/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add gymnasium-rl-environments
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/gymnasium-rl-environments/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "gymnasium-rl-environments" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.