> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/gym/llms-full.txt.

# Quickstart

This is the quickstart—get running in under 5 minutes. For a more detailed walkthrough, see the [Detailed Setup Guide](/v0.2/get-started/detailed-setup).

## Before You Start

Make sure you have these prerequisites ready:

* **Git** for cloning the repository
* **OpenAI API key** with available credits (requires \~\$0.01-0.10 for all tutorials)

***

## Quickstart

Follow the tabs sequentially to install NeMo Gym, start the servers, and collect your first verified rollouts for RL training.

<Tabs>
  <Tab title="1. Set Up">
    **Install NeMo Gym**

    Get NeMo Gym installed and ready to use:

    ```bash
    # Clone the repository
    git clone git@github.com:NVIDIA-NeMo/Gym.git
    cd Gym

    # Install UV (Python package manager)
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source $HOME/.local/bin/env

    # Create virtual environment
    uv venv --python 3.12
    source .venv/bin/activate

    # Install NeMo Gym
    uv sync --extra dev --group docs
    ```

    **Configure Your API Key**

    Create an `env.yaml` file that contains your OpenAI API key and the **Policy Model** you want to use. Replace `your-openai-api-key` with your actual key. This file helps keep your secrets out of version control while still making them available to NeMo Gym.

    ```bash
    echo "policy_base_url: https://api.openai.com/v1
    policy_api_key: your-openai-api-key
    policy_model_name: gpt-4.1-2025-04-14" > env.yaml
    ```

    > **Note:** We use GPT-4.1 in this quickstart because it provides low latency (no reasoning step) and works reliably out-of-the-box. NeMo Gym is **not limited to OpenAI models**—you can use self-hosted models via vLLM or any OpenAI-compatible inference server that supports function calling. Refer to the [Detailed Setup Guide](/v0.2/get-started/detailed-setup) for details.
  </Tab>

  <Tab title="2. Start Servers">
    **Terminal 1** (start servers):

    ```bash
    # Start servers (this will keep running)
    config_paths="resources_servers/example_single_tool_call/configs/example_single_tool_call.yaml,\
    responses_api_models/openai_model/configs/openai_model.yaml"
    ng_run "+config_paths=[${config_paths}]"
    ```

    **Terminal 2** (interact with agent):

    ```bash
    # In a NEW terminal, activate environment
    source .venv/bin/activate

    # Interact with your agent
    python responses_api_agents/simple_agent/client.py
    ```
  </Tab>

  <Tab title="3. Collect Rollouts">
    **Terminal 2** (keep servers running in Terminal 1):

    ```bash
    # Create a simple dataset with one query
    echo '{"responses_create_params":{"input":[{"role":"developer","content":"You are a helpful assistant."},{"role":"user","content":"What is the weather in Seattle?"}]}}' > weather_query.jsonl

    # Collect verified rollouts
    ng_collect_rollouts \
        +agent_name=example_single_tool_call_simple_agent \
        +input_jsonl_fpath=weather_query.jsonl \
        +output_jsonl_fpath=weather_rollouts.jsonl

    # View the result
    cat weather_rollouts.jsonl | python -m json.tool
    ```

    This generates training data with verification scores!
  </Tab>

  <Tab title="4. Clean Up Servers">
    **Terminal 1** with the running servers: Ctrl+C to stop the `ng_run` process.
  </Tab>
</Tabs>

## Next Steps

Now that you can generate rollouts, choose your path:

<Cards>
  <Card title="Start Training" href="/v0.2/training-tutorials">
    Train models using NeMo Gym with your preferred RL framework.
  </Card>

  <Card title="Use an Existing Environment" href="https://github.com/NVIDIA-NeMo/Gym#-available-environments">
    Explore environments available for training and evaluation.
  </Card>

  <Card title="Build a Custom Environment" href="/v0.2/environment-tutorials">
    Implement or integrate existing tools and define task verification logic.
  </Card>
</Cards>