Skip to content

docs(add-benchmark): run new benchmarks through single_agent_turn sessions - #6032

Draft
yaoyu-33 wants to merge 1 commit into
mainfrom
yuya/docs-add-benchmark-typed-sessions
Draft

yaoyu-33 wants to merge 1 commit into
mainfrom
yuya/docs-add-benchmark-typed-sessions

Conversation

@yaoyu-33

Copy link
Copy Markdown
Contributor

What changed and why

The add-benchmark agent skill taught the agent's /run path as the default for new benchmarks:

  • SKILL.md paired native benchmarks with simple_agent and no Environment Server, told external benchmarks to wrap the library in the agent's /run, smoke-tested with --agent ..._simple_agent on flat rows, and listed "/run endpoint must be async" as a constraint. Only the coding-harness note pointed to session harnesses.
  • references/patterns.md showed a YAML pattern with no Environment Server, a custom multi-turn agent whose run() seeds, generates, verifies and retries, an external library wrapped in run(), and the deprecated harbor_agent as the think-tag pattern.

On main, rollout collection reaches an agent only through an Environment Server. single_agent_turn seeds the resources session with a typed ResourcesSeedSessionRequest, opens the agent session, runs the agent turn, verifies and closes (single_agent_turn/app.py L420-L451, L639-L668). Rows reach it as typed tasks through taskset and environment_server_routes; single_agent_turn_legacy runs the same steps for flat rows.

Changes:

  • SKILL.md
    • Choose the task format first: Gym JSONL rows and Harbor task folders are equal choices; task folders follow the task-folder section of the Add a benchmark page.
    • single_agent_turn with a typed taskset is preferred, single_agent_turn_legacy with flat rows is accepted, and a legacy_agent relay is not for new work. gym env init still generates that relay, so Step 4 says to replace it.
    • External libraries run inside an agent session; the add-harness skill has the contract.
    • Multi-turn feedback stays inside the agent turn (a feedback tool) or in an Environment Server loop (nemo_user_sim); proof_refinement_agent, which loops in /run, is no longer the suggested pattern.
    • The Step 6 smoke collates the example taskset and runs it without --agent.
    • The async constraint names the session, tool and lifecycle routes.
    • resources_servers/math_with_code, whose tests call check_resources_session_contract, is the reference for the session hooks.
  • references/patterns.md
    • YAML pattern with single_agent_turn, a taskset per dataset (separate tasksets for the train and example splits), and environment_server_routes; key rules for collating examples, single_agent_turn_legacy, and replacing the scaffold's relay.
    • Agent patterns: the agent never calls /seed_session or /verify itself; multi-turn feedback as a tool or an Environment Server loop instead of a custom run().
    • External libraries: the agent-session hooks (_seed_agent_session_state(), the session branch of responses(), _close_agent_session_state()), as simple_agent implements them.
    • Think-tag parsing points to _parse_think_tags in nemo_gym/models/chat_completions_converter.py instead of harbor_agent.
    • "Reward Profiling Best Practices" is unchanged.

The companion PR for the environment tutorials is #6031. The two were split to keep each diff reviewable.

No issue: these are corrections of agent guidance that disagrees with the code on main.

Validation

  • The new YAML pattern, with example_single_tool_call standing in for my_benchmark, against main at b02f8d0: gym env validate reports "Config is valid" (only the model URL unset); gym dataset collate --mode example_validation writes the example rows as typed tasks under taskset my_benchmark_example.
  • pre-commit run --files .agents/skills/add-benchmark/SKILL.md .agents/skills/add-benchmark/references/patterns.md: passed.
  • Checked on main that proof_refinement_agent serves no agent sessions, that simple_agent implements both agent-session hooks, and that nemo_user_sim is an Environment Server.

Rollout evidence

N/A: docs-only. No environment, agent, or verifier behavior changes, so no model run is needed.

Overlapping open PRs

Left unchanged

  • gym env init still generates the legacy_agent relay (nemo_gym/environment/scaffold.py); changing the scaffold is code and belongs in its own PR.
  • The constraint line that requires cryptographic -S signing disagrees with AGENTS.md (optional); it is outside this change.

🤖 Generated with Claude Code

…sions

The add-benchmark skill taught the agent's /run path as the default:
native benchmarks paired with simple_agent and no Environment Server,
external libraries wrapped in run(), a custom run() loop for multi-turn
feedback, smokes with --agent and flat rows, and the deprecated
harbor_agent as a pattern.

- SKILL.md: choose between Gym JSONL rows and Harbor task folders as
  equal formats; single_agent_turn with a typed taskset is preferred,
  single_agent_turn_legacy with flat rows is accepted, and a legacy_agent
  relay is not allowed in new work; replace the relay gym env init
  generates; smoke by collating the example taskset; external libraries
  run inside an agent session; math_with_code as the session-hooks
  reference.
- references/patterns.md: YAML pattern with single_agent_turn, tasksets
  and environment_server_routes; multi-turn feedback as a tool or an
  Environment Server loop instead of a custom run(); the agent-session
  hooks for external libraries; think-tag parsing points to the core
  converter instead of harbor_agent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
@yaoyu-33 yaoyu-33 added docs Documentation-only updates or documentation debt area:docs Generic documentation without another dominant domain labels Nov 12, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 12, 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.

@yaoyu-33

Copy link
Copy Markdown
Contributor Author

/ok to test 378e6e5

This branch had an error being deployed

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

Labels

area:docs Generic documentation without another dominant domain docs Documentation-only updates or documentation debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant