Skip to content

feat(hermes_agent): give Hermes the task's own MCP servers and skills - #6865

Draft
giuliolovisotto wants to merge 1 commit into
glovisotto/opencode-task-toolsfrom
glovisotto/hermes-task-tools
Draft

giuliolovisotto wants to merge 1 commit into
glovisotto/opencode-task-toolsfrom
glovisotto/hermes-task-tools

Conversation

@giuliolovisotto

Copy link
Copy Markdown
Contributor

What does this PR do?

Lets Hermes take a Harbor task that declares tools of its own.

A Harbor task can declare [[environment.mcp_servers]] and skills_dir. The harbor environment server leaves them in /tmp/.nemo-gym/task.json in the agent's sandbox and refuses the task to a harness that does not declare supports_task_tool_context. Hermes did not, so it could not take such a task: two of the 66 Terminal-Bench 4.1 tasks.

A borrowed-sandbox Hermes session now reads that file at seed and declares the capability:

  • Each MCP server of the task is added to the session's Hermes configuration under its own name: a url server over streamable HTTP, or SSE when the task says so; a stdio server started by Hermes in the sandbox. It is required and checked by the worker like a required grant. A server that a grant already names keeps the grant's connection.
  • skills_dir is added to skills.external_dirs; with a restricted toolset list the task's servers and the skills toolset are enabled for that session.
  • A declaration Hermes cannot be given (no name, no endpoint, a duplicate name, the name of a Hermes toolset, a relative skills_dir) refuses the seed. A file that cannot be read fails the seed, rather than run the task without its tools.

No issue linked: the gap is described here.

Validation

Run on macOS:

  • pytest responses_api_agents/hermes_agent/tests, run together with the OpenCode tests and tests/unit_tests/data/tasks/harbor/test_harbor_entries.py on the top branch of this stack, which contains this commit: 1574 passed, 152 skipped.
  • New tests/test_task_tool_context.py (15 cases) and task_context.py: the mapping of a declaration to Hermes mcp_servers entries and skills.external_dirs, the required-server list of the worker payload, the seed refusals, and the unreadable file.
  • Three existing assertions in tests/test_app.py count the sandbox commands at seed; they now include the read of the file.
  • ruff check and ruff format --check on responses_api_agents/hermes_agent: clean.

Rollouts

A six-task run of Terminal-Bench 4.1 on the Harbor environment server (the two tasks that declare tools among them, 30-minute agent limit): all six seeded and graded, no failures. In medical-claims-processing the task's Playwright server connected (the worker's required-server check passed) and its tools were in the model's tool list; in cumulative-layout-shift the skills toolset was enabled and the task's SKILL.md content reached the model. Full 63-task runs are in progress.

Compatibility and benchmark impact

None for a task without declarations: the seed runs one more sandbox command and the Hermes configuration is unchanged. A Harbor task with declarations is no longer refused to Hermes.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass). Only ruff check and ruff format --check were run on the changed packages.
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

🤖 Generated with Claude Code

@giuliolovisotto giuliolovisotto added feature New capabilities, enhancements, or enablement work area:agent Agent harnesses and Responses API agent behavior risk:low Autobot PR risk: low labels Nov 27, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added risk:mid Autobot PR risk: mid and removed risk:low Autobot PR risk: low labels Nov 27, 2026
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/hermes-task-tools branch from dfaa24f to ccd6de5 Compare November 30, 2026 10:53
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/hermes-task-tools branch from ccd6de5 to 7314348 Compare November 30, 2026 11:47
A Harbor task can declare `[[environment.mcp_servers]]` and `skills_dir`.
The `harbor` environment server leaves them in `/tmp/.nemo-gym/task.json`
and refuses the task to a harness that does not declare
`supports_task_tool_context`, so Hermes could not take such a task: two of
the 66 Terminal-Bench 4.1 tasks.

A Hermes session now reads that file at seed and declares the capability.
Each MCP server of the task is added to the session's Hermes configuration
as a required server (a URL over streamable HTTP, or SSE when the task says
so; stdio started by Hermes in the sandbox) and checked by the worker like
a required grant. `skills_dir` is added to `skills.external_dirs`.

A declaration Hermes cannot be given refuses the seed, and a file that
cannot be read fails it, rather than run the task without its tools.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Giulio Lovisotto <glovisotto@nvidia.com>
@giuliolovisotto
giuliolovisotto force-pushed the glovisotto/hermes-task-tools branch from 7314348 to 7c2d239 Compare November 30, 2026 13:52

This branch has not been deployed

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

Labels

area:agent Agent harnesses and Responses API agent behavior feature New capabilities, enhancements, or enablement work risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants