Skip to content

feat: integrate EnterpriseOps Gym #909

Open

Description

@cwing-nvidia

Use cases, pain points, and background

EnterpriseOps-Gym is a containerized enterprise simulation benchmark from ServiceNow AI Research (arXiv:2603.13594) that evaluates LLM agents on 1,150 expert-curated tasks across 8 enterprise domains (Calendar, CSM, Drive, Email, HR, ITSM, Teams, Hybrid). Agents interact with 512 tools exposed via MCP servers backed by 164 database tables, performing multi-step stateful planning (avg 9.15 steps per task, up to 34) to complete realistic enterprise workflows.

This benchmark is valuable for RLVR because:

  • Large headroom for RL improvement: The best model (Claude Opus 4.6) achieves only ~46% task success rate. Open-source models score 15–24%.
  • Rich tool-use signal: Tasks require multi-step tool calling with real database state mutations, not just text generation. This directly exercises the agentic reasoning capabilities that RL training aims to improve.
  • Deterministic verification: The primary verifier checks final database state via SQL queries with exact value comparison (equals, greater_than, contains), yielding clean binary rewards without LLM-as-judge non-determinism. A secondary response_check verifier uses LLM-as-judge where needed.
  • Resettable environments: Each task run seeds a fresh database from a SQL snapshot and cleans up afterward. No shared mutable state across rollouts.
  • Enterprise domain coverage: Calendar, customer service, drive, email, HR, ITSM, teams, and hybrid cross-domain tasks.

Description

Integrate EnterpriseOps-Gym as a new benchmark in NeMo-Gym. We should wrap the MCP tool interaction loop in a responses_api_agent, implement verification in a resources_server, and convert the HuggingFace dataset into NeMo-Gym JSONL format. A benchmarks/enterpriseops_gym/ directory should contain the benchmark config and data preparation script, following the newer benchmark pattern (see browsecomp, livecodebench).

Design

The integration should reuse EnterpriseOps-Gym's core infrastructure components:

  • MCP client (benchmark/mcp_client.py): async HTTP client for JSON-RPC communication with MCP servers. Handles tool discovery, tool execution, database seeding, and database cleanup. The JSON-RPC protocol logic is preserved; only the HTTP transport layer changes (see httpx → aiohttp item below).
  • Verifier engine (benchmark/verifier.py): SQL database_state verification (deterministic) and response_check verification (LLM-as-judge). Preserve the original verification logic as-is.
  • Database management: create_database_from_file() seeds a fresh DB per run from SQL snapshots; delete_database() cleans up.

Where changes are likely needed:

  • EnterpriseOps-Gym's MCP client HTTP transport — the original uses httpx.AsyncClient, which must be replaced with NeMo-Gym's global aiohttp client (nemo_gym.server_utils.request()) to avoid O(n^2) connection pooling at high concurrency. httpx/httpcore's connection pool loops through all queued requests for each new request, which caused NeMo-Gym to hang at 16k concurrent requests before the project switched to aiohttp (see aiohttp vs httpx). This is critical for RL training where tasks averaging 9.15 tool calls each can generate 100k+ concurrent MCP HTTP requests. The tavily_search resources server demonstrates this adapter pattern with its TavilySearchAIOHTTPClient class.
  • EnterpriseOps-Gym's LLMClient (LangChain-based) — replace with NeMo-Gym's model server via server_client.post() to /v1/responses. This is required because during RL training the model is a local vLLM instance whose weights are being updated, and the model server handles token ID tracking needed for training.
  • EnterpriseOps-Gym's orchestrators — reimplement all three orchestrator strategies (react, planner_react, decomposing) as separate NeMo-Gym agents, since the originals are coupled to LangChain message types and LLMClient. The MCP tool execution logic (mcp_client.call_tool) can be reused since the JSON-RPC protocol layer is unchanged — only the underlying HTTP calls go through aiohttp instead of httpx. The planner_react and decomposing agents require a second model server reference for the planner LLM.
  • Token ID propagation — each orchestrator step calls the model server and receives prompt_token_ids, generation_token_ids, and generation_log_probs on response messages. These must be propagated into the next turn's input so that RL training can reconstruct the full token trajectory. See swe_agents/app.py for the implementation pattern.
  • Session cookie propagation — EnterpriseOps-Gym environments are stateful (per-task seeded databases). All server_client.post() calls in the reimplemented orchestrators must pass and update cookies through every step (cookies=request.cookies, then update with response.cookies), following the pattern in simple_agent/app.py. This is how NeMo-Gym tracks per-task sessions across the model → tool call → verify chain.
  • Thinking model compatibility — the orchestrators parse model responses for tool call decisions. Thinking models (e.g. Qwen 3 Thinking, DeepSeek R1) emit <think>/<thinking> blocks in their output that must be stripped before parsing tool calls, or the parsing will break. See harbor_agent for the handling pattern.
  • Monotonic trajectories — NeMo RL requires that the token sequence in multi-step rollouts only grows (previous tokens are never modified or dropped between turns). The reimplemented orchestrators must preserve the full conversation history across steps without summarizing, truncating, or modifying prior turns.
  • MCP server concurrency control — the Docker MCP servers are external services with unknown throughput limits. At scale (16k+ concurrent tasks × ~9 tool calls each), they could be overwhelmed. Use asyncio.Semaphore to throttle concurrent MCP calls per domain, similar to how code_gen bounds subprocess concurrency. Profile MCP server throughput during baselining to set appropriate limits.
  • EnterpriseOps-Gym's ray_experiment_queue.py and evaluate.py — not needed, as ng_run / ng_collect_rollouts handles orchestration. EnterpriseOps-Gym's compute_score.py aggregation (task success rate and per-verifier pass rate) should be surfaced through the resources server's /aggregate_metrics endpoint so ng_reward_profile provides the same breakdown.

Docker containers for MCP servers (one per domain, 8 total) should be documented as a prerequisite for the initial integration, with a follow-up to add an ensure_mcp_servers() auto-start function that checks docker ps and starts missing containers in model_post_init().

Out of scope

  • Modifying EnterpriseOps-Gym's verification logic — we should preserve the original SQL state checks and LLM-as-judge comparisons as-is. We do not add new verifier types or change comparison semantics.
  • Modifying EnterpriseOps-Gym's orchestrator logic — We faithfully reimplement all three orchestrators (react, planner_react, decomposing) but do not add new strategies or change their behavior.
  • HPC/cluster deployment patterns — Initial integration targets local/single-node execution with Docker. Kubernetes or multi-node MCP server deployment is follow-up.

Acceptance Criteria

  • benchmarks/enterpriseops_gym/ exists with config.yaml and prepare.py that downloads from HuggingFace and converts to Gym JSONL; ng_prepare_benchmark runs successfully
  • resources_servers/enterpriseops_gym/ exists with app.py, configs, example data, tests, and README
  • responses_api_agents/enterpriseops_gym_agent/ exists with all three orchestrator variants (react, planner_react, decomposing), configs, tests, and README
  • ng_run successfully starts the agent and resources server (assuming MCP Docker containers are running)
  • ng_collect_rollouts completes against example data and produces valid JSONL output with rewards
  • database_state verifiers return deterministic binary rewards
  • response_check verifiers delegate to a configured judge model server and return rewards
  • Each task run seeds a fresh database and cleans it up after verification, ensuring no state leakage between rollouts
  • All async HTTP calls to MCP servers use NeMo-Gym's global aiohttp client (nemo_gym.server_utils.request()), not httpx, to avoid O(n^2) connection pooling at high concurrency
  • Orchestrators propagate prompt_token_ids, generation_token_ids, and generation_log_probs from each model response into the next turn's input for RL training compatibility
  • Orchestrators propagate session cookies through every server_client.post() call (model server, MCP tool calls, verification)
  • Orchestrators maintain monotonic token trajectories — no summarization, truncation, or modification of prior turns
  • Orchestrators correctly handle thinking model output (<think>/<thinking> blocks) when parsing tool calls
  • MCP server concurrency is bounded via asyncio.Semaphore to prevent overwhelming Docker containers at scale
  • /aggregate_metrics surfaces both task-level success rate (all verifiers pass) and per-verifier pass rate
  • Tests pass with ng_test +entrypoint=resources_servers/enterpriseops_gym (MCP-dependent tests skip gracefully)
  • Tests pass with ng_test +entrypoint=responses_api_agents/enterpriseops_gym_agent
  • README documents: Docker container setup for each domain, example ng_run command, example ng_collect_rollouts command, and dataset preparation steps
  • The EnterpriseOps-Gym repo is currently CC BY-NC 4.0. Licensing must be documented clearly in our codebase and link to the source repo to provide attribution.
  • pre-commit run --all-files passes on new files
  • Smoke test completes end-to-end on at least one domain (e.g., teams) with a real model endpoint
  • Reproduce a published leaderboard result on the public split (60% of tasks) for at least one (model, domain) pair and verify the success rate matches within reasonable tolerance (~±3%)

Activity

  1. added
    env-integration
    on Mar 18, 2026
  2. added
    needs-design
    on Apr 3, 2026
  3. changed the title [-]Integrate EnterpriseOps Gym[/-] [+]feat: integrate EnterpriseOps Gym[/+] on Apr 6, 2026
  4. removed
    needs-design
    on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

env-integration

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions