Skip to content

[epic] 3rd Party Environments → Gym Integration #1701

Open

Description

@sephmard

Summary

NeMo Gym currently provides a framework for defining, running, and evaluating environments within the Gym ecosystem. However, there is no clearly defined integration path for external environment providers.

As the ecosystem grows, projects such as Harbor, Prime Intellect, OpenEnv, OpenReward, and other community-developed environments should have a standard mechanism for integration into Gym without requiring custom adapters or significant Gym-specific implementation work.

Motivation

Today, integrating an external environment into Gym requires understanding Gym internals and manually mapping concepts onto Gym-specific abstractions.

This creates friction for:

  • Environment authors who want Gym compatibility
  • Benchmark creators who want to reuse external environments
  • Researchers comparing environments across ecosystems
  • Platform developers building tooling around Gym

A standard integration path would make Gym a more interoperable ecosystem rather than a standalone environment framework.

Potential Goals

Potential areas to explore:

  • Standard environment interface contracts
  • Environment registration and discovery mechanisms
  • Packaging and distribution conventions
  • Dataset integration standards
  • Metadata schemas for environments
  • Versioning and compatibility guarantees
  • Adapter patterns for existing ecosystems
  • Validation and certification tooling
  • Documentation and onboarding workflows for external contributors

Example Ecosystems

Examples that may be considered:

  • Harbor
  • Prime Intellect
  • OpenEnv
  • OpenReward

This list is illustrative rather than exhaustive.

Open Questions

  • What is the minimum interface required for Gym compatibility?
  • Should Gym define a formal environment specification?
  • Should external environments run unchanged, or through adapters?
  • How should datasets and evaluation metadata be represented?
  • How should third-party environments be discovered and installed?
  • What level of compatibility testing should Gym provide?

Activity

  1. added
    env-integration
    on Jun 24, 2026
  2. added
    needs-clarification
    needs-design
    env-new
    on Jun 24, 2026
  3. moved this from Dev Todo to Details Todo in NeMo Gym 0.7.0 - Oct 7on Aug 10, 2026
  4. Blacksujit commented on Oct 21, 2026

    @Blacksujit

    OpenReward is the one ecosystem in this list without a path into Gym yet (Harbor, Prime and OpenEnv all have one), so I'd like to propose it as a first concrete slice while the generic contract is still being designed. Happy to adjust it to whatever shape you settle on.

    Proposal: resources_servers/openreward, following the layout of resources_servers/openenv.

    • Config: either an OpenReward catalog name (for example Eigent/SETA) or a base_url for a self-hosted Open Reward Standard server, plus a split. Secrets come from the environment, never from the config file.
    • Dataset: a small prepare script reads the tasks and turns each one into a Gym JSONL row, with the prompt from get_prompt(), the tools from list_tools() as function tools, and the split / task_index in the row.
    • /seed_session: opens an ORS session for that task through the official openreward SDK, using its async client.
    • Tools: one POST endpoint per ORS tool, forwarding to session.call_tool() and returning the text blocks, the same way the OpenEnv adapter registers MCP tools.
    • /verify: returns the last non-null reward, which is ORS's outcome convention. If the session was lost, or the episode ended without any reward, it sets mask_sample=True with a failure_kind instead of reporting 0.0. TRL's adapter had to fix exactly this, scoring unscored rollouts as failures (OpenReward's default GRPO reward function cannot distinguish "never scored" from "scored 0.0" huggingface/trl#7364).
    • Tests: CPU-only, against a tiny in-process ORS echo environment built with openreward.environments.Server, so CI never touches the network. I've checked that this setup works locally with openreward 0.1.167.
    • Dependency: openreward goes in the server's own requirements.txt, like openenv-core.

    Out of scope: the generic third-party contract this epic is about, score_group, and hosted-platform billing or quotas.

    Three questions before I start:

    1. Is a dedicated resources server welcome as a slice of this epic, or would you rather wait for the generic contract?
    2. Resources server (like OpenEnv), or a responses_api_agents integration (like Harbor)? ORS sessions are tool-call driven, so a resources server seems the closer fit.
    3. Any preference for where the dataset prepare script lives?

    If this looks right, I'll open a draft PR with the server, configs, example data, tests and a README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Environment & BenchmarksEnvironment Discoverabilityenv-integrationenv-newneeds-clarificationneeds-design

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions