Repository navigation
feat(legal-agent-bench): support configurable agent harnesses - #5990
Conversation
f202491 to
edf3a73
Compare
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
…nvironment Server Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
edf3a73 to
f448bc0
Compare
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Co-authored-by: Abhishree Thittenamane <[email protected]> Signed-off-by: rystewart-nvidia <[email protected]>
…ring Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
…ure accounting Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
athitten
left a comment
There was a problem hiding this comment.
Thanks for addressing the comments @rystewart-nvidia ! Please lmk once updated with latest main after 5791 gets merged, will re-approve.
Signed-off-by: Ryan Stewart <[email protected]>
|
@athitten merged main including 5791, tests and pre-commit pass, should be good to go. Thanks! |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/45317042725 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/45319718525 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/45336593491 |
What does this PR do?
Add Hermes, Claude Code, and Codex presets for comparing harnesses on the same LAB tasks. Depends on #5791. This PR will be rebased onto main after 5791 merges.
No shared runtime changes are needed in this PR.
Validation
All LAB, native-agent, benchmark, and docs-link tests passed. All-files pre-commit, import checks, and Fern validation passed.
uv sync --locked --project resources_servers/legal_agent_bench source resources_servers/legal_agent_bench/.venv/bin/activate PYTHONPATH=. LITELLM_LOCAL_MODEL_COST_MAP=True uv run --active --no-sync python -m pytest \ resources_servers/legal_agent_bench/tests \ responses_api_agents/legal_agent_bench_native/tests \ benchmarks/legal_agent_bench/tests \ tests/unit_tests/test_fern_docs_links.py --import-mode=importlib -qLITELLM_LOCAL_MODEL_COST_MAP=Trueavoids downloading model prices during imports;--active --no-syncuses the activated environment.(cd fern && npm run check)Rollouts
All four harnesses ran two example tasks through the Environment Server using Docker sandbox backend with GPT-5.6-sol as the policy model. All eight runs produced their requested DOCX and complete reports from Claude Sonnet 4.6 and GPT-5.5, with no judge errors.
All four harnesses passed short model-driven checks on Enroot, Apptainer, OpenSandbox, and OpenShell. These checked public inputs, output collection, separate verifier files and secrets, and cleanup; they were not additional legal-task comparisons. LocalEmu covered Fargate lifecycle and file transfers but real AWS provisioning and end-to-end harness runs on AWS Fargate have not been verified.
With Docker running, add
policy_base_url,policy_api_key, andpolicy_model_nameto the gitignored rootenv.yaml, plus the judge settings below. Use the model IDs accepted by your endpoints. Setdefault_hostinenv.yamlto the host address that the sandboxes can reach.Alternatively, configure each judge separately in
env.yaml. Use the model IDs accepted by each OpenAI-compatible endpoint:Per-judge values override the shared settings. Keep one entry for single judging.
Using the activated environment from Validation, prepare and run 2 example tasks:
In another terminal with the same environment activated:
uv run --active --no-sync gym eval run --no-serve \ --config results/lab-smoke/config.yaml \ --input results/lab-smoke/prepared.jsonl \ --output results/lab-smoke/rollouts.jsonl --limit 2 --concurrency 1Inspect the rollout rows and the outputs and judge reports under
results/lab-smoke/artifacts. Stop the servers after collection. Scores and completion can vary; these commands use a twenty-minute agent budget.Change the preset in
results/lab-smoke/config.yamlto select another harness:benchmarks/legal_agent_bench/config.yaml,config_native.yamlconfig_hermes.yamlconfig_claude_code.yamlconfig_codex.yamlStop the current servers before changing presets. Use a different results directory for each harness to retain the comparison outputs.
Compatibility and benchmark impact
All four harnesses use
legal_agent_bench_benchmark_agent, canonical task rows, the same verifier, and the Harbor Environment Server.Select Docker, ECS Fargate, Apptainer, Enroot, OpenSandbox, or OpenShell through the
sandboxprovider config, subject to the Harbor Environment Server's capabilities. Automatic LAB image building needs Docker; running another backend with a prepared compatible image does not need Docker. OpenShell policies must allow writes to/workspace,/tmp,/home/sandbox,/tests, and/logs.Hermes rejects row-level
top_p; Codex rejects row-leveltemperatureandtop_p. Use the shared model sampling config for those comparisons.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).