█

AI/TLDR

Buy me a coffee
Buy me a coffee

NeMo Gym

NVIDIA's library of environments for evaluating agents and training models with RL

RLHF & AlignmentOpen source
Latest
v0.7.0
Updated
12 Oct 2026
Language
Python
License
Apache-2.0
$git clone https://github.com/NVIDIA-NeMo/Gym.git

What's new

v0.7.012 Oct 2026

Adds Environment Servers that manage sessions, verification, cleanup and failures, reusable agent harnesses across environments, job-time-aware scheduling with automatic Slurm resume, and durable token-level trajectory capture for vLLM and Megatron.

IN SHORT

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.

Updated Markdown version ↗

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.

Diagram of the NeMo Gym library: infrastructure (build and scale environments; tasks, verifiers, agents, models) and integrations (environment, training-framework and agent-framework libraries, agent harnesses, sandboxes) feeding the NeMo Gym Environment Hub of training environments, benchmarks and community environments
How NeMo Gym is organised: modular components and integrations on top, the environment hub they feed below.NeMo Gym README ↗

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

bashbash
git clone https://github.com/NVIDIA-NeMo/Gym.git
cd Gym
uv venv --python 3.13.14 && source .venv/bin/activate
uv sync

Configure the policy model

Create env.yaml in the project root. vLLM, Fireworks, OpenRouter and others are documented under Configure Model.

yamlyaml
policy_base_url: https://api.openai.com/v1
policy_api_key: <your-openai-api-key>
policy_model_name: gpt-4.1-2025-04-14

Start 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.

bashbash
gym env start \
    --resources-server mcqa \
    --model-type openai_model

Run an evaluation

In a second terminal, run the agent on five example tasks; Gym prints aggregate metrics and writes the rollouts to JSONL.

bashbash
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 1

Commands 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.

ToolStarsWhat it does
Heretic★ 44kA 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.5kAn open reproduction of the DeepSeek-R1 reasoning pipeline, with scripts for GRPO training and reasoning-data generation.
verl★ 24.4kVolcano Engine's RL post-training framework (HybridFlow) for building GRPO, PPO, and other RL pipelines on top of FSDP, Megatron, and vLLM.
TRL★ 19.9kHugging Face's post-training library with trainers for SFT, reward modeling, DPO, PPO, and GRPO to align language models with preferences.
Agent Lightning★ 19kAn open-source trainer from Microsoft that improves AI agents built with any framework using reinforcement learning, prompt optimization, and supervised fine-tuning.
ART★ 10.9kOpenPipe's Agent Reinforcement Trainer for post-training LLM agents on multi-step tasks using GRPO and rule- or judge-based rewards.
OpenRLHF★ 10.2kA Ray- and vLLM-based RLHF framework that scales PPO, GRPO, and REINFORCE++ training to models with 70B+ parameters.
NeMo Gym★ 1.4kNVIDIA's library of environments for evaluating agents and training models with RL