Overview
Learn how to build custom environments for training or evaluation using NeMo Gym.
Looking to use an existing environment rather than build your own? See the Available Environments in the README.
Key Concepts
Before diving in, review these foundational pages:
- Environment Components — Model, Resources, and Agent servers
Tutorials
Start with the single-step tutorial, then progress through increasingly complex patterns:
Build a complete environment from scratch: scaffolding, task data, tools, verification, testing, and rollout collection.
start hereMultiple sequential tool calls with ground-truth verification.
intermediatePer-episode session state with SESSION_ID_KEY.
Production environment with dynamic routing and state-based verification.
advancedConfigure a second model to score rollouts from verify() when ground truth is semantic or rubric-based.
The single-step tutorial is a hands-on walkthrough. The multi-step, stateful, and real-world tutorials are pattern-oriented deep dives — each explains a key concept through annotated source excerpts and rollout transcripts from existing example servers.
Environment Properties
Training environments can be broadly characterized along five dimensions:
- Rollout structure: The interaction pattern between the model, environment, and user.
- Core capabilities: The behaviors or skills that a model needs in order to succeed in a given use case.
- Knowledge domain: What subject area, area of expertise, or field of study is involved.
- Task type: The high-level use case that is represented in the training environment.
- Verification method: How the environment computes rewards from model responses.
Below are a subset of rollout structures and core capabilities found across NeMo Gym environments. We plan to add these as structured metadata to environments in the future. If you have ideas for additional properties, please let us know by opening an issue.