What is NeMo Gym?
NeMo Gym is a Python library from NVIDIA for evaluating and improving models and agents with environments. It sits in the RLHF & Alignment category of the Training & Fine-Tuning tools and is open-source, written in Python and licensed Apache-2.0. To get started: clone and install.
Overview
NeMo Gym is a Python library from NVIDIA for evaluating and improving models and agents with environments. In its terms, an environment is the whole system an agent works in to finish a task: a dataset of tasks, an agent harness that decides how the model interacts with the world, a verifier that scores whether the task was done, and per-task state. Gym provides interfaces for each of those pieces, the infrastructure to run them at scale, and a hub of ready-made benchmarks and training environments.

The same environment serves evaluation and training. You can run an agent over a task set, score every attempt and read aggregate metrics, then feed the scored rollouts to the RL framework of your choice — the project documents NeMo RL, Unsloth and VeRL — to improve the model or the agent. NVIDIA describes Gym as battle-tested in production Nemotron training, and it is part of the wider NVIDIA NeMo platform.
Gym is built to mix with other ecosystems rather than replace them. Environments from Aviary, Harbor, OpenEnv, Reasoning Gym and Verifiers can run beside its own, and agent harnesses such as OpenHands, Mini SWE Agent and LangGraph are available out of the box, alongside support for coding-agent CLIs. Sandboxed tasks run on pluggable providers including Docker, Daytona, ECS Fargate, Enroot, OpenShell, OpenSandbox and Apptainer, and runs scale to thousands of concurrent environments, with optional OpenTelemetry tracing across the agent, model and resources servers.
The project is Apache-2.0 licensed. It runs on standard development machines with Python 3.13.14+ and no GPU for evaluation against a hosted model; models can be OpenAI, Azure OpenAI, self-hosted vLLM or other hosted providers. The README's own advice is that if you only need to score model outputs with a stateless check and do not need scale or training, a script is probably enough.
What it does
- Modular interfaces for agents, environments, tasks and verifiers, run as cooperating local servers
- An environment hub of popular benchmarks and training environments, each with example data, configs and tests
- Bring your own agent or use built-in harnesses (OpenHands, Mini SWE Agent, LangGraph and more)
- Scales to thousands of concurrent environments, with Slurm support for large evaluation jobs
- Rollouts that feed RL training in NeMo RL, Unsloth or VeRL, with token-level trajectory capture
- Pluggable sandbox providers and optional OpenTelemetry tracing
Getting started
This follows the README quick start: it needs uv and Python 3.13.14+, no GPU, and an OpenAI API key for the example model (other providers are configurable).
Clone and install
git clone https://github.com/NVIDIA-NeMo/Gym.git
cd Gym
uv venv --python 3.13.14 && source .venv/bin/activate
uv syncConfigure the policy model
Create env.yaml in the project root. vLLM, Fireworks, OpenRouter and others are documented under Configure Model.
policy_base_url: https://api.openai.com/v1
policy_api_key: <your-openai-api-key>
policy_model_name: gpt-4.1-2025-04-14Start the servers
Gym coordinates the model, agent and verifier as local servers. This starts the multiple-choice Q&A environment with a simple tool-calling agent.
gym env start \
--resources-server mcqa \
--model-type openai_modelRun an evaluation
In a second terminal, run the agent on five example tasks; Gym prints aggregate metrics and writes the rollouts to JSONL.
gym eval run --no-serve \
--agent mcqa_simple_agent \
--input resources_servers/mcqa/data/example.jsonl \
--output results/mcqa_rollouts.jsonl \
--limit 5 \
--num-repeats 1Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reproducible agent evaluation in stateful environments — code execution, tool calling, sandboxes — shared across teams
- Generating scored rollouts at scale as the environment side of an RL post-training pipeline
- Comparing several agent harnesses or models on the same benchmark in one run
- Wrapping an in-house task and verifier as an environment that both evaluation and training can reuse
How NeMo Gym compares
NeMo Gym alongside other open-source rlhf & alignment tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Heretic | ★ 44k | A command-line tool that removes refusal behaviour from transformer language models by directional ablation, using an Optuna parameter search that co-minimizes refusals and KL divergence from the original model. |
| Open-R1 | ★ 26.5k | An open reproduction of the DeepSeek-R1 reasoning pipeline, with scripts for GRPO training and reasoning-data generation. |
| verl | ★ 24.4k | Volcano Engine's RL post-training framework (HybridFlow) for building GRPO, PPO, and other RL pipelines on top of FSDP, Megatron, and vLLM. |
| TRL | ★ 19.9k | Hugging Face's post-training library with trainers for SFT, reward modeling, DPO, PPO, and GRPO to align language models with preferences. |
| Agent Lightning | ★ 19k | An open-source trainer from Microsoft that improves AI agents built with any framework using reinforcement learning, prompt optimization, and supervised fine-tuning. |
| ART | ★ 10.9k | OpenPipe's Agent Reinforcement Trainer for post-training LLM agents on multi-step tasks using GRPO and rule- or judge-based rewards. |
| OpenRLHF | ★ 10.2k | A Ray- and vLLM-based RLHF framework that scales PPO, GRPO, and REINFORCE++ training to models with 70B+ parameters. |
| NeMo Gym | ★ 1.4k | NVIDIA's library of environments for evaluating agents and training models with RL |
