Agent skill

Generate Nemo Gym Env

by adithya-s-k in adithya-s-k/FineEnvs

Builds a NeMo Gym (NVIDIA) variant of an RL environment. An agent skill from adithya-s-k/FineEnvs.

Apache-2.0Auto-check passedDevOps & Cloud

Install Generate Nemo Gym Env

skills CLI
$ npx skills add adithya-s-k/FineEnvs --skill generate-nemo-gym-env -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install adithya-s-k/FineEnvs generate-nemo-gym-env --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/adithya-s-k/FineEnvs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/generate-nemo-gym-env .claude/skills/generate-nemo-gym-env && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate-nemo-gym-env
GitHub stars
461
Token cost
~2.1k tokens
SKILL.md length
533 words
Files
2 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
Apache-2.0

At a glance

Builds a NeMo Gym (NVIDIA) variant of an RL environment. An agent skill from adithya-s-k/FineEnvs.

  • Works in 4 steps: Server class — server.py → NeMo Gym config — configs/.yaml → Rollout — rollout.py → …
  • Someone asks to scaffold a NeMo Gym Resources Server
  • SKILL.md covers Concept, Archetypes, Recommended file layout and Implementation order, plus 4 more sections
  • Calls uv, pip and curl; reaches github.com; needs SESSION_ID_KEY and E2B_API_KEY

What it does

Generate Nemo Gym Env is an agent skill from adithya-s-k/FineEnvs. Builds a NeMo Gym (NVIDIA) variant of an RL environment. Use whenever someone asks to scaffold a NeMo Gym Resources Server, port an existing env to NeMo Gym, expose tools as app.post() endpoints with cookie-based sessions, add a post-episode /verify reward grader, or deploy a NeMo Gym env to HF Spaces. NeMo Gym is the right framework when the user wants HTTP+REST with cookie session handling, raw requests-driven rollouts (no SDK client), Ray-based orchestration, or NVIDIA NeMo / TRL training integration with a…

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/architecture.md`).

It sits in DevOps & Cloud, covering Reinforcement learning and Containers. It works with NVIDIA AI Platform, Docker and Python. The repository describes itself as: FineEnvs — RL Environments 101: building and scaling RL environments in the age of LLMs. The licence is Apache-2.0.

When your agent uses it

  • Someone asks to scaffold a NeMo Gym Resources Server
  • Port an existing env to NeMo Gym
  • Expose tools as app.post() endpoints with cookie-based sessions
  • Add a post-episode /verify reward grader

Example prompts

  • “wrap my env in NeMo Gym”
  • “make a NeMo resources server for X”
  • “add a post-episode grader to my env”
  • “/generate-nemo-gym-env”

Requirements

  • Python 3
  • Docker
  • A credential in SESSION_ID_KEY
  • A credential in E2B_API_KEY

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Server class — server.py
  2. NeMo Gym config — configs/.yaml
  3. Rollout — rollout.py
  4. Dockerfile

What it can do on your machine

Read from SKILL.md and the folder at commit 5e0b46e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • pip
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    Also links to:

    • docs.nvidia.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SESSION_ID_KEY
    • E2B_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generate Nemo Gym Env loads about 2.1k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 218 tokens; SKILL.md has 533 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~218
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from adithya-s-k/FineEnvs at commit 5e0b46e, republished under its Apache-2.0 licence (© adithya-s-k). 533 words, ~2,111 tokens.

Download SKILL.mdSave it as .claude/skills/generate-nemo-gym-env/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
generate-nemo-gym-env
description
Builds a NeMo Gym (NVIDIA) variant of an RL environment. Use whenever someone asks to scaffold a NeMo Gym Resources Server, port an existing env to NeMo Gym, expose tools as `app.post()` endpoints with cookie-based sessions, add a post-episode `/verify` reward grader, or deploy a NeMo Gym env to HF Spaces. NeMo Gym is the right framework when the user wants HTTP+REST with cookie session handling, raw `requests`-driven rollouts (no SDK client), Ray-based orchestration, or NVIDIA NeMo / TRL training integration with a `responses_create_params` + `ground_truth` dataset format. Output is a runnable `<env_dir>/nemo_gym/` folder with `server.py`, `pyproject.toml`, `Dockerfile`, `configs/<env>.yaml`, and `rollout.py`. Use for prompts like "wrap my env in NeMo Gym", "make a NeMo resources server for X", or "add a post-episode grader to my env".

generate-nemo-gym-env

Build the NeMo Gym variant of an env. NeMo Gym is NVIDIA's RL gym layer, optimized for Ray-based orchestration and post-episode grading. The Python package is nemo_gym (installed via pip install git+https://github.com/NVIDIA-NeMo/Gym).

Concept

NeMo Gym is NVIDIA's RL gym layer for LLM agents. It's built on Ray and ships a FastAPI-based SimpleResourcesServer that exposes one POST /<tool> endpoint per tool, plus the standard /seed_session (cookie-based session bootstrap) and /verify (post-episode grader). Targets docs.nvidia.com/nemo/gym/latest.

When the user has a shared domain module (<domain>.py) and wants a NeMo Gym variant, wrap it. Don't duplicate logic.

Archetypes

ArchetypeHallmarks
Pure-Python gameSingle tool endpoint; /verify does substring match against ground_truth.
Stateful sandboxPer-session sandbox in self.sessions; lazy init on first tool call.
Vision / computer-useOne endpoint per action; /verify rewards trajectories that called terminate(success).

The user picks the actual paths. The canonical shape:

<env_dir>/nemo_gym/
├── pyproject.toml         # nemo_gym (git+) + e2b-* + fastapi + uvicorn + requests
├── __init__.py
├── Dockerfile             # Ray-aware multi-stage
├── configs/<env>.yaml     # NeMo Gym config (entrypoint, domain, description)
├── server.py              # SimpleResourcesServer subclass with tool endpoints
├── rollout.py             # raw requests + cookie session
└── README.md

Note: NeMo Gym requires Python 3.12+.

Implementation order

1. Server class — server.py
python
from nemo_gym.base_resources_server import (
    BaseResourcesServerConfig,
    BaseSeedSessionRequest, BaseSeedSessionResponse,
    BaseVerifyRequest, BaseVerifyResponse,
    SimpleResourcesServer,
)
from nemo_gym.server_utils import SESSION_ID_KEY
from fastapi import FastAPI, Request
from pydantic import BaseModel, Field
from typing import Any, Dict

class MyConfig(BaseResourcesServerConfig):
    pass

class GuessReq(BaseModel):
    word: str

class ToolResponse(BaseModel):
    output: str

class MyVerifyRequest(BaseVerifyRequest):
    ground_truth: list = []

class MyResourcesServer(SimpleResourcesServer):
    config: MyConfig
    sessions: Dict[str, Dict[str, Any]] = Field(default_factory=dict)

    def setup_webserver(self) -> FastAPI:
        app = super().setup_webserver()
        app.post("/guess")(self.guess)
        return app

    async def seed_session(self, body: BaseSeedSessionRequest) -> BaseSeedSessionResponse:
        return BaseSeedSessionResponse()

    def _sess(self, request: Request) -> Dict[str, Any]:
        sid = request.session[SESSION_ID_KEY]
        if sid not in self.sessions:
            self.sessions[sid] = {"game": WordleGame(), "step": 0}
        return self.sessions[sid]

    async def guess(self, body: GuessReq, request: Request) -> ToolResponse:
        sess = self._sess(request)
        feedback = sess["game"].guess(body.word)
        sess["step"] += 1
        return ToolResponse(output=feedback)

    async def verify(self, body: MyVerifyRequest) -> BaseVerifyResponse:
        # Compute reward from the response trajectory + ground truth
        expected = ""
        if body.ground_truth and isinstance(body.ground_truth, list):
            expected = body.ground_truth[0].get("expected_output", "")
        reward = 0.0
        for item in body.response.output:
            if hasattr(item, "type") and item.type == "function_call_output":
                if expected and expected in getattr(item, "output", ""):
                    reward = 1.0; break
        return BaseVerifyResponse(**body.model_dump(), reward=reward)

if __name__ == "__main__":
    MyResourcesServer.run_webserver()

Key contracts:

  • One endpoint per tool. Register them in setup_webserver(). Pydantic models on the request body become the JSON shape.
  • Sessions live in self.sessions keyed by request.session[SESSION_ID_KEY]. Lazy-init on first call. NeMo Gym sets the session cookie on POST /seed_session.
  • verify() is the grader. Read body.ground_truth (passed by the trainer) and body.response.output (the trajectory). Return BaseVerifyResponse(**body.model_dump(), reward=...).
2. NeMo Gym config — configs/<name>.yaml
yaml
my_env_resources_server:
  resources_servers:
    my_env:
      entrypoint: server.py
      domain: agent
      description: "What this env does"

This is the file the NeMo Gym CLI looks for when launching via ng_run "+config_paths=[configs/my_env.yaml]".

3. Rollout — rollout.py

NeMo Gym has no Python client SDK. The rollout speaks raw HTTP via requests with a Session for cookie persistence:

python
import requests
session = requests.Session()
session.post(f"{ENV_URL}/seed_session", json={}).raise_for_status()
r = session.post(f"{ENV_URL}/guess", json={"word": "crane"})
result = r.json()["output"]

Tool definitions for the LLM are hardcoded in rollout.py (no introspection endpoint). Mirror the request schemas from server.py exactly.

4. Dockerfile

Multi-stage build. NeMo Gym pulls Ray and a fairly heavy stack — the Docker image is ~1.5GB. The container exposes port 11000 by default. For HF Spaces deployment, override to port 7860 (one-port limit on Spaces).

Show full SKILL.md (221 more words)Show less

Validation gates

  1. Import — uv run python -c "import os; os.environ.setdefault('E2B_API_KEY','x'); from server import MyResourcesServer" succeeds.
  2. Local server — try uv run python server.py. Note: NeMo Gym's run_webserver() initializes a Ray cluster, which fails on shared SLURM / HF cluster nodes (gcs_server can't bind). On those machines, only Docker / HF Space deploy works.
  3. Endpoint smoke — when running, curl http://localhost:11000/seed_session -X POST returns 200 and sets a session cookie.
  4. Rollout — MAX_TURNS=3 uv run python rollout.py drives end-to-end against the deployed Space.

Common gotchas

  • No module named 'anyio' — nemo_gym doesn't pin its full transitive set on every install. Add anyio>=4.0, attrs>=23.0, fastapi>=0.115, uvicorn, requests to your dependencies explicitly.
  • Address already in use or gcs_server crash — Ray init failed. Almost always a shared cluster issue. Document this and tell the user to deploy via Space.
  • Cookie not set on the rollout — make sure to use requests.Session(), not raw requests.post(). The session cookie is the SID handle.
  • /verify returns reward 0 unexpectedly — ground_truth is wrapped in a list. Check body.ground_truth[0].get("expected_output") not body.ground_truth.get(...).
  • Hardcoded tool schemas drift — when you change a server endpoint's Pydantic body, manually update the matching tool definition in rollout.py. There's no list_tools().

Reference

  • references/architecture.md — Ray orchestration, dataset format with responses_create_params, deployment notes

Official documentation

© adithya-s-k, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .claude/skills/generate-nemo-gym-env of adithya-s-k/FineEnvs.

  • SKILL.md
  • references/architecture.md

Open the folder on GitHubat commit 5e0b46e

Compare with similar skills

Generate Nemo Gym Env next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generate Nemo Gym Env compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generate Nemo Gym Env this skilladithya-s-k/FineEnvs461—~2.1kAutomated safety check: PassApache-2.0
Holoscan Install ContainerNVIDIA/skills3.6k—~1.9kAutomated safety check: PassApache-2.0
Cuopt InstallNVIDIA/skills3.6k—~1.1kAutomated safety check: PassApache-2.0
Cosmos3 Env TroubleshootNVIDIA/cosmos-framework560—~1.3kAutomated safety check: NotesCustom licence
Setup Workshopbrevdev/workshop-build-an-agent146—~2.3kAutomated safety check: NotesApache-2.0
Dstack Presetsdstackai/dstack2.3k—~403Automated safety check: PassMPL-2.0

Similar skills

  • Official

    Install Holoscan SDK via the NGC Docker container. An agent skill from NVIDIA/skills.

    3.6k GitHub stars~1.9k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Cuopt Install

    NVIDIA/skills

    Official

    Install cuOpt for Python, C, or server via pip, conda, or Docker; verify the install.

    3.6k GitHub stars~1.1k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Cosmos3 Env Troubleshoot

    NVIDIA/cosmos-framework

    Official

    Diagnose and fix Cosmos3 environment, installation, and runtime errors.

    560 GitHub stars~1.3k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Setup Workshop

    brevdev/workshop-build-an-agent

    This skill should be used when the user wants to set up, install, deploy, bootstrap, or "spin up" the Build-an-Agent workshop (a.k.a.

    146 GitHub stars~2.3k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: notes
  • Dstack Presets

    dstackai/dstack

    Create and manage dstack presets: a toolkit that streamlines model inference optimization with agents, and a portable preset format.

    2.3k GitHub stars~403 tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Dstack

    dstackai/dstack

    dstack is an open-source control plane for GPU provisioning and orchestration across GPU clouds, Kubernetes, and on-prem clusters.

    2.3k GitHub stars~6.2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: warnings

More from adithya-s-k/FineEnvs

All 8 skills in this repo
  • Generate Verifiers Env

    adithya-s-k/FineEnvs

    Builds a Verifiers (PrimeIntellect) variant of an RL environment.

    461 GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Generate Openenv Env

    adithya-s-k/FineEnvs

    Builds an OpenEnv (Hugging Face) variant of an RL environment.

    461 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Generate Ors Env

    adithya-s-k/FineEnvs

    Builds an Open Reward Standard (ORS) variant of an RL environment using the official openreward Python package.

    461 GitHub stars~2.3k tokensUpdated 3 days ago
    Auto-check: notes
  • Rl Env From Description

    adithya-s-k/FineEnvs

    Turns a user's plain-English description of an RL training environment into runnable code across the four target frameworks — OpenEnv, OpenReward (ORS), Verifiers, and NeMo Gym.

    461 GitHub stars~2.3k tokensUpdated 3 days ago
    Auto-check: notes
  • Article Frontmatter

    adithya-s-k/FineEnvs

    Configure article metadata via MDX frontmatter. An agent skill from adithya-s-k/FineEnvs.

    461 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • Create HTML Embed

    adithya-s-k/FineEnvs

    Create self-contained D3 HTML embed charts for the research article template.

    461 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed

Questions about Generate Nemo Gym Env

What does Generate Nemo Gym Env do?

Builds a NeMo Gym (NVIDIA) variant of an RL environment. An agent skill from adithya-s-k/FineEnvs. Generate Nemo Gym Env is an agent skill from adithya-s-k/FineEnvs. Builds a NeMo Gym (NVIDIA) variant of an RL environment.

When should I use Generate Nemo Gym Env?

Generate Nemo Gym Env fits situations like: someone asks to scaffold a NeMo Gym Resources Server; port an existing env to NeMo Gym; expose tools as app.post() endpoints with cookie-based sessions; add a post-episode /verify reward grader.

How do I install Generate Nemo Gym Env in Claude Code?

Run `npx skills add adithya-s-k/FineEnvs --skill generate-nemo-gym-env -a claude-code`. Or copy the skill folder (.claude/skills/generate-nemo-gym-env in adithya-s-k/FineEnvs) into .claude/skills/generate-nemo-gym-env in your project. Claude Code loads it when a task matches its description.

How do I install Generate Nemo Gym Env in Codex?

Run `npx skills add adithya-s-k/FineEnvs --skill generate-nemo-gym-env -a codex`. Or copy the skill folder (.claude/skills/generate-nemo-gym-env in adithya-s-k/FineEnvs) into .agents/skills/generate-nemo-gym-env in your project. Codex loads it when a task matches its description.

Can I use Generate Nemo Gym Env in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add adithya-s-k/FineEnvs --skill generate-nemo-gym-env -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-nemo-gym-env, .gemini/skills/generate-nemo-gym-env, .github/skills/generate-nemo-gym-env and .opencode/skills/generate-nemo-gym-env in your project.

What does Generate Nemo Gym Env need to run?

Going by SKILL.md and its folder, Generate Nemo Gym Env needs the command-line tools its instructions call (uv, pip and curl) and credentials named SESSION_ID_KEY and E2B_API_KEY. Our summary lists: Python 3; Docker; A credential in SESSION_ID_KEY; A credential in E2B_API_KEY.

Does Generate Nemo Gym Env access the network?

SKILL.md names 2 domains. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. As links in the text: docs.nvidia.com. This is read from the text; nothing was executed.

Is Generate Nemo Gym Env safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Generate Nemo Gym Env use?

Generate Nemo Gym Env is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generate Nemo Gym Env use?

About 2.1k tokens (SKILL.md is roughly 8.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Generate Nemo Gym Env?

Skills that share tags, products or a category with Generate Nemo Gym Env: Holoscan Install Container (NVIDIA/skills, 3.6k stars), Cuopt Install (NVIDIA/skills, 3.6k stars), Cosmos3 Env Troubleshoot (NVIDIA/cosmos-framework, 560 stars) and Setup Workshop (brevdev/workshop-build-an-agent, 146 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generate Nemo Gym Env?

adithya-s-k (a GitHub user) maintains it in adithya-s-k/FineEnvs, which has 461 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 8, 2026.

Source: adithya-s-k/FineEnvs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.