Skip to content

feat(usersim): add Environment Server orchestration - #3801

Closed
ffrujeri wants to merge 58 commits into
ffrujeri/usersim-resources-serverfrom
ffrujeri/usersim-environment-server
Closed

ffrujeri wants to merge 58 commits into
ffrujeri/usersim-resources-serverfrom
ffrujeri/usersim-environment-server

Conversation

@ffrujeri

@ffrujeri ffrujeri commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

Adds multi-Agent UserSim episode orchestration on top of the Resources Server integration, tracked by #985.

  • Adds the UserSim Environment Server and typed episode flow.
  • Coordinates participant activations while keeping mechanical tool iteration in the Agent Server.
  • Adds episode-aware training-data projection and multi-Agent dataset metrics.

This PR is stacked on #3800.

Validation

  • uv run --active pytest environment_servers/usersim/tests -q — 6 passed in 1.83s on the completed stack
  • Focused Ruff lint and format checks — passed
  • Relevant pre-commit hooks — passed
  • Branch head includes DCO sign-off

Rollouts

N/A for this isolated orchestration layer. Final-stack live rollouts were not attempted because this checkout has no env.yaml, prepared runnable UserSim dataset, or prepared persona manifest, and POLICY_API_KEY and SUPPORT_MODEL_API_KEY are unset.

Compatibility and benchmark impact

Adds multi-Agent episode routing without replacing the existing single-Agent task path. UserSim rollout records gain episode-level invocation and metric data.

@copy-pr-bot

copy-pr-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ffrujeri
ffrujeri added this pull request to stack #3804 September 30, 2026 02:34
@ffrujeri ffrujeri changed the title ffrujeri/usersim environment server feat(usersim): add Environment Server orchestration Sep 30, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-environment-server branch from 7b0d35b to 43e24d9 Compare September 30, 2026 02:41
@yaoyu-33 yaoyu-33 added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Sep 30, 2026
@ffrujeri

Copy link
Copy Markdown
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-environment-server branch from 43e24d9 to 60c0552 Compare September 30, 2026 15:44
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch from c062cca to 0050cb7 Compare September 30, 2026 15:44
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-environment-server branch from 60c0552 to ecbe7ed Compare September 30, 2026 21:10
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch from 0050cb7 to caec099 Compare September 30, 2026 21:10
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 1, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-environment-server branch from ecbe7ed to e2b69c1 Compare October 1, 2026 20:28
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch from caec099 to 6a888c3 Compare October 1, 2026 20:28
@ffrujeri
ffrujeri removed this pull request from stack #3804 October 1, 2026 22:30
@ffrujeri
ffrujeri marked this pull request as draft October 1, 2026 22:44
@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 1, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch from 6a888c3 to 94a8628 Compare October 2, 2026 00:05
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-environment-server branch from e2b69c1 to 324378d Compare October 2, 2026 00:05
@ffrujeri
ffrujeri added this pull request to stack #3916 October 2, 2026 00:49
@ffrujeri
ffrujeri marked this pull request as ready for review October 2, 2026 00:50
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch from 94a8628 to 96acab0 Compare October 2, 2026 00:52
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-environment-server branch 3 times, most recently from 043f1c2 to ec19745 Compare October 2, 2026 06:00
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 5, 2026
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-environment-server branch from 8f43670 to df96325 Compare October 6, 2026 01:04
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch from 16191fe to a234c0a Compare October 6, 2026 01:04

@ananthsub ananthsub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working through round 1.
Several fixes landed and hold up.
Six concern SimpleAgent sessions and the converter, which are now on main through #3784 and #4057:

  • cookie normalization
  • idempotent seeds
  • ray_enabled
  • a required scorer model
  • the HTTPS pin in #3800
  • nemo-gym[dev] in requirements

Three more are fixed in #3801:

  • assistant-only capture
  • assistant-only sandbox access
  • the termination reason

Two problems block further line review.

The stack still bundles generic code, and that code now conflicts with main.
#3800's nemo_gym/ changes are byte-identical to #4060 (dataset_metrics.py, the train_data_utils.py hooks, is_materialized_task_row) and to #4059 (environment_server_agent_refs).
#3818 has merged, so #3800 conflicts with main in nemo_gym/task_data.py and nemo_gym/train_data_utils.py.
#4053 now covers the multi-agent bindings everywhere that matters:

  • validation
  • composition
  • dispatch
  • the migration script
  • #3818's taskset resolution

Please rebase onto main, drop the nemo_gym/ and tests/unit_tests/ changes, and depend on #4053.
#4070 has also merged and removed "native" from the code.
The bundled #4060 code (_native_task_parts, "native task envelope") and the READMEs ("native episode result") add it back.
Please use materialized row and episode request instead.

No PR passes its own tests or data checks at its own head.

  • #3800's resources server calls UserSim APIs that don't exist at its own pin (a5f676bf). Four of its tests fail, and its config references environment_servers/usersim, which arrives in #3801.
  • #3801 pins the environment server to git+ssh at 44c39daf, a different UserSim revision from the resources server.
  • #4080 replaces about 340 lines of #3801's environment server and most of #3800's resources server. It also breaks two core tests that only #3910 fixes, and its new task schema rejects the committed example row.
  • #3802's committed metrics and example rows can't be regenerated from #3802's code.

Please re-cut into PRs that are each green at their own head:

  1. Rebase onto main and depend on #4053. Close #4059 and #4060.
  2. One runtime PR: the resources server and the environment server, on the resolved_row contract, pinned to a5f676bf, with their tests.
  3. A small generic SimpleAgent PR for execute_tools, limited to sessions and documented.
  4. A data PR:
    • prepare.py writes task rows (a stable string task_id plus resolved_row).
    • The dataset declares taskset: and agent: usersim_assistant.
    • The example rows, metrics, and rollouts are regenerated with the code being merged, after the evidence-size fix below.
  5. Docs last.

The 16 comments from #3797 now apply to #4080, and none has a reply yet.

Comment thread environment_servers/usersim/app.py Resolved
Comment thread environment_servers/usersim/app.py Resolved
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch 2 times, most recently from 4cf7b48 to ae9f224 Compare October 6, 2026 17:35
ananthsub added a commit that referenced this pull request Oct 6, 2026
main with #4053 and #4060 merged, plus the simplified #3800 (UserSim's
resources server, preparation, and simple_agent changes; no shared data code).
#3801, #4080, and #3802 are left out until they are restacked onto the
simplified #3800, because they still carry the previous #3800.

This branch only previews that base for review of the task-schema stack.
It is replaced by main once the UserSim stack merges.

Signed-off-by: Ananth Subramaniam <[email protected]>
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch 4 times, most recently from ec2f01f to 3c7c2bf Compare October 6, 2026 20:30
@ffrujeri
ffrujeri removed this pull request from stack #4081 October 6, 2026 20:47
@ffrujeri
ffrujeri force-pushed the ffrujeri/usersim-resources-server branch from 3c7c2bf to 65a2f1b Compare October 6, 2026 21:16
@ffrujeri

ffrujeri commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the consolidated materialized-row runtime in #3800. Closing as requested in review; no unique changes remain to land from this PR.

@ffrujeri ffrujeri closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer r0.7.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants