Install from PyPI
NeMo Gym is available as a PyPI package. This page covers how to run existing environments and create new ones without cloning the repository.
Install
Or with uv:
Using an Existing Environment
NeMo Gym ships with many environments that can be used out of the box. The built-in simple_agent supports LLM with tools, which is sufficient for most use cases.
Create a working directory and configure your model endpoint:
Start a built-in environment:
Every environment ships with 5 example tasks so you can collect rollouts without any local dataset setup. Full training datasets are available on the NVIDIA NeMo Gym HuggingFace collection.
Config paths and data paths are resolved against the package install location automatically. If the same path exists in your current directory, the local version takes priority.
Creating a New Environment
The most common way to create a new environment is by adding a resources server. If your problem can be framed as an LLM with tools and a verify function, you only need a new resources server. The built-in simple_agent handles the rest.
Scaffold a resources server
The entrypoint must be under a resources_servers/ directory:
This generates app.py, a config YAML, tests, requirements.txt, and a data/ directory. Edit app.py to implement your verify() method and any tools.
Add at least one example to data/example.jsonl:
Run your server
Your local resources_servers/hello_world/ takes priority over the package install. Built-in servers like simple_agent and vllm_model are resolved from the package automatically.
Collect rollouts
Creating a custom agent
If the built-in simple_agent is not sufficient, use it as a starting point by subclassing it directly, or making a copy of it.