Repository navigation
Conversation
resources_servers/exa_search serves one tool, exa_search, that posts to Exa's /search through Gym's aiohttp client and returns each result's title, URL, date, author and page text. An Environment Server grants it to a session agent over MCP by listing the server in tool_servers (#5551), so any MCP-capable harness can search with Exa without an Exa integration of its own. The server keeps no session state and grades nothing. Retryable statuses and transport failures are retried; a failed search reaches the agent as the tool's result with the status only, never Exa's error body. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…e exa_search tool server The Codex, Pi, Hermes, OpenCode, OpenClaw and Kilo Code config copies of both benchmarks drop harness_exa_search behind legacy_agent. Under single_agent_turn_legacy each agent creates its own sandbox and gets Exa search as the exa_search MCP tool through tool_servers; the stateless verifier grades the answer as before. The harness settings carry over (version pins, timeouts, context and output limits, thinking, Hermes's turn limit, image, sandbox ttl and memory), the prompts name the exa_search tool, and the sandbox reaches the model server and exa_search on the Gym host (use_absolute_ip). The manifests name the session agents. The Claude Code, Cline, Prime Agent, Simple Strands and NeMo Fabric DeepAgents copies stay on harness_exa_search. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
harness_exa_search runs each episode through its own legacy /run path. The session harnesses now get Exa search from the exa_search tool server, so the agent logs one DEPRECATED warning per process at startup (not in uvicorn workers) and its README opens with a deprecation banner, as #5222 did for the sandboxed agents. Five harness copies still use it. No behavior change beyond the log line. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 82bdf5e |
…server Signed-off-by: yaoyu-33 <[email protected]>
…arch server tavily_search takes search_provider: exa (default tavily) with exa_api_key, and serves web_search, find_in_page and scroll_page from Exa's /search and /contents through the same aiohttp client, exclusion policy, page cache, output limits, key pool and bounded retries. The DeepSearchQA and WideSearch session configs now run it as their exa_search tool server, with an exclusion policy that keeps each dataset's Hugging Face pages out of results. The separate exa_search resources server is removed: a server that grades nothing cannot ship the example data and rollouts every resources server must have. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test e3cfeca |
Contributor
…moved search configs Review fixes for the Exa provider and the twelve DeepSearchQA and WideSearch session copies: - Exa answers a key whose credits or budget ran out with 402; the key pool now tries the next key on it, as it does for Tavily's 432/433. The rejected-key statuses are a client field, unchanged for Tavily. - A 200 reply whose body is not a JSON object raises a provider-named error. aiohttp's decode error repr carries the request headers, key included, and a validation error quoted the body. - scroll_page no longer caches an empty page. Exa reports a failed crawl inside a 200, and the cached empty page hid that URL from every later session on the server. - OpenClaw copies: setup_timeout is read only on the host CLI path, so the 900 s install budget moves to sandbox_install_timeout_seconds. - OpenCode, OpenClaw and Kilo copies raise the per-call MCP timeout to 300 s, above the ~183 s worst case of one search; Hermes, whose 120 s limit has no knob, gets http_timeout_s: 30 on its exa_search instead. - Kilo copies leave ttl_s to Kilo, which sizes it from setup and run budgets. - Hermes copies disable Hermes's own web toolset, which registers a web_search of its own when a search key is in the sandbox environment. - READMEs: the exclusion policy covers the three tools only, scores are not comparable with the harness_exa_search versions, WideSearch's legacy copies need exa_api_key set in the copy, and which settings are Tavily-only. Signed-off-by: yaoyu-33 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
/ok to test b757c39 |
… flag empty pages - Closing a session drops its call metrics unless dump_session_id_to_metrics_on_exit is set; a tool-server session is never verified here, so they stayed for the server's lifetime. - With caching on, Exa /contents asks for at most max_cached_page_chars of page text instead of Exa's multi-million-character default that the cache truncated anyway. - scroll_page answers a page that could not be fetched with "No content found.", as find_in_page does. - DeepSearchQA's exclusion policy also blocks its Kaggle benchmark page and URLs naming the benchmark. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test 408000e |
Resolve the one conflict in responses_api_agents/harness_exa_search/app.py by importing both is_nemo_gym_fastapi_entrypoint (main's multi-worker entrypoint guard) and is_nemo_gym_fastapi_worker (this branch's once-per-process deprecation warning). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…ger need The README told readers to set exa_api_key in the selected config right after the OpenCode example, but the session copies read EXA_API_KEY; the paragraph above already says the harness_exa_search copies need the key set in the copy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
… in the session prompts The session copies told the model to call web_search, find_in_page and scroll_page, but most harnesses list granted MCP tools under a server prefix: Pi and Hermes show mcp__exa_search__web_search, Kilo Code and OpenCode exa_search_web_search, OpenClaw exa_search__web_search; only Codex shows web_search. In a smoke run Hermes called web_search twice and got "Tool 'web_search' does not exist" before finding the prefixed tool. The prompts now name the exa_search server and say the tools may carry its prefix. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
Contributor
Author
|
/ok to test ac8a646 |
This was referenced Nov 24, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
DeepSearchQA and WideSearch run every harness through
harness_exa_search. That legacy agent starts the harness and its own Exa integration inside a sandbox, behindlegacy_agent, and calls/verifyfrom its own/run. Each harness wires Exa differently there:exa-mcp-serverthroughnpx, a Pi extension, or Hermes' built-in web search. Most of these harnesses now serve sandbox sessions, and #5551 lets an Environment Server grant a tool server's MCP tools to a session agent; HLE's search configs already granttavily_searchtools over MCP to session harnesses undersingle_agent_turn_legacy. This PR givestavily_searchan Exa provider and moves the copies that can move onto it:Exa as a
tavily_searchprovider.search_provider: exa(the default staystavily) plusexa_api_keyserves the same three tools from Exa:web_searchposts to Exa's/searchand returns its query-matched highlights as each result's summary.find_in_pageposts to/contentswith the query and returns the matching passages, or the page text when Exa returns none.scroll_pagereads the page text from/contents.The requests go through the existing aiohttp adapter,
TavilySearchAIOHTTPClient. It now takes the key's header name and value prefix and the provider name used in errors (x-api-key, no prefix,Exa). Everything else works as it does for Tavily:excludeDomains);tavily_api_keyis now optional in the config and required at startup only when the provider is Tavily. Tavily configs see no change beyond the fixes for both providers below.Config moves. The Codex, Pi, Hermes, OpenCode, OpenClaw and Kilo Code copies of both benchmarks (12 files and their manifests) now run under
single_agent_turn_legacy, with anexa_searchtool server (tavily_searchwithsearch_provider: exa) intool_servers. Each episode seeds the stateless verifier and anexa_searchsession, grants the three tools to the agent over MCP, closes the agent, verifies, then closes both sessions.ttl_sand memory as before.thinking, and Hermes's turn limit, plus a 2-hour runner timeout. OpenCode'ssetup_timeoutbecomessandbox_install_timeout_seconds.exa_searchserver'sweb_search,find_in_pageandscroll_pagetools and say the tool list may show them with that server's prefix. Most harnesses prefix granted MCP tools (Pi and Hermesmcp__exa_search__web_search, Kilo Code and OpenCodeexa_search_web_search, OpenClawexa_search__web_search; Codex showsweb_search). With a prompt that named onlyweb_search, Hermes calledweb_searchtwice and got "Tool 'web_search' does not exist" before it found the prefixed tool.search_exclusions.jsonthat blockshuggingface.coandhf.co, where its dataset is published. DeepSearchQA's also blocks its Kaggle benchmark page and any URL containingdeepsearchqa,deep-search-qaordeep_search_qa(Kaggle hosts the dataset and leaderboard, and copies such as the Harbor hub's carry the name).tavily_searchrequires a policy, and the benchmark's own host is the one every answer key sits on. HLE's policy also lists both hosts. The policy covers the three tools only: the sandbox's shell and a harness's own fetch tool still have open network access.setup_timeout(read only on its host CLI path) becomessandbox_install_timeout_seconds; OpenCode, OpenClaw and Kilo Code get a 300 s per-call MCP timeout, above one search's ~183 s worst case, and Hermes (whose 120 s limit has no knob) getshttp_timeout_s: 30on itsexa_search; Kilo Code sizes its own sandboxttl_s; Hermes disables its ownwebtoolset, which registers aweb_searchof its own when a search key is in the sandbox environment.tavily_search, for both providers: a 200 reply whose body is not a JSON object raises a provider-named error (aiohttp's decode-error repr carries the request headers, key included), andscroll_pageno longer caches an empty page, which is usually a failed fetch (Exa reports a failed crawl inside a 200).tavily_search:scroll_pageanswers an empty page withNo content found., asfind_in_pagealready did, instead of a header showing words 0-0 of 0; closing a session drops its call metrics unlessdump_session_id_to_metrics_on_exitis set (a tool-server session is never verified there, so they stayed for the server's lifetime); and with caching on, Exa's/contentsasks for at mostmax_cached_page_charsof page text when that is set (Exa's own default is several million characters, which the cache truncated anyway).Deprecate
harness_exa_search. As in chore(agent): deprecate the legacy /run path of *_sandboxed_agent harnesses #5222: one startup warning per process and a README banner.An earlier revision of this PR added a separate
resources_servers/exa_searchserver. It is gone: a resources server that grades nothing cannot ship the example data and rollouts that CI requires of every resources server. Squash-merging leaves no trace of it.Issue: none public; this PR is self-contained.
Merge with main and version pins (2026-11-20)
origin/main(f57d175397); no rebase. The only conflict was thenemo_gym.utilsimport inresponses_api_agents/harness_exa_search/app.py: it now imports both main'sis_nemo_gym_fastapi_entrypoint(multi-worker entrypoint guard) and this branch'sis_nemo_gym_fastapi_worker(once-per-process deprecation warning), ashermes_sandboxed_agentdoes on main.hermes_agent's own pin.pi_version: 0.80.2is main'spi_agentpin (responses_api_agents/pi_agent/configs/pi_agent.yaml). It moves to 1.5.2 with feat(pi): upgrade the coding agent to 1.5.2 #6454, which is still open. feat(pi): upgrade the coding agent to 1.5.2 #6454 also editsdeepsearchqa_pi.yamlandwidesearch_pi.yaml, keeping them onharness_exa_searchat 0.80.2 because that path runs the pinned Gym commit's adapter in the sandbox. Whichever PR merges second keeps this PR's session version of both files withpi_version: 1.5.2and drops feat(pi): upgrade the coding agent to 1.5.2 #6454's comment.exa_api_keyin the config after the OpenCode example (the session copies readEXA_API_KEY), and the prompt change above.Behavior changes to review
exa_searchfrom its sandbox, so the moved copies setuse_absolute_ip: true.harness_exa_searchinstead relayed model calls out of the sandbox itself. Where sandboxes cannot reach the Gym node (for example remote sandboxes on a cluster), the moved copies cannot run as they are; the legacy copies keep working there.tavily_searchtools and block the dataset's Hugging Face pages. Their scores are therefore not directly comparable with earlierharness_exa_searchruns of the same harness.concurrencyis set to 32.harness_exa_searchhad no limit.tavily_searchfor every user, Tavily included:scroll_pageon a page that could not be fetched now returnsNo content found.withtotal_words: 0, not a header with an empty body. The HLE search configs see this text change only for failed fetches. Closing a session now frees its metrics; withdump_session_id_to_metrics_on_exitset, they are kept for the dump as before.Known limitations, not changed here
single_agent_turn_legacyconfigs do. A run that routes rows to the Environment Server explicitly fails before dispatch: core's pairing check compares the row'stask_source(the agent) with the server's resources server. Main's configs fail the same way (reproduced withaime24), so the fix belongs in core, not in these configs.network_access: inherit.model_and_toolswould block the harness runtime's own install in the generic image, and Kilo Code has no such setting, so restricting egress needs prebuilt harness images first.Still on
harness_exa_searchconfig.yaml: Claude Code refuses required MCP tool grants in a session.responses_api_agents/harness_exa_search/configs/harness_exa_search_claude_code.yaml, and the deepsearchqa and widesearch resources-server configs, which bind the Claude Code agent.So neither
harness_exa_searchnorharness_agent(whose registry it imports) can be removed yet.Why
harness_agentandharness_exa_searchare being retired rather than extended is in the "Why retire it instead of extending it" section of #5821.Validation
Run on the final head
ac8a646385(the merge with main plus two follow-up commits), on a Linux workstation, Python 3.13.14, one venv withnemo-gym[dev,sandbox]and each server's extra dependencies:pytest <server>/tests:resources_servers/tavily_search: 122 passed (main's tests plus the 22 intest_exa_provider.py);responses_api_agents/harness_exa_search: 9 passed;resources_servers/deepsearchqa: 3 passed;resources_servers/widesearch: 6 passed;environment_servers/single_agent_turn_legacy: 54 passed.pytest tests/unit_tests/{environment,data,eval,benchmarks} tests/unit_tests/test_public_api.py: 6485 passed, 37 failed, 32 errors. The same 69 tests fail on a pristineorigin/maintree with the same venv and host (compared by test ID). Their causes are the host: tests that shell out to the system Python 3.8, and Harbor fetch tests that need a newer Git.pre-commit run --all-files: all hooks pass and change no file. pre-commit 4.0.1 was used because the newest release needs a newer Git than the host has.gym env validate --config <copy> ++default_host=<docker bridge>for the 12 moved copies: all valid.gym env validate --manifest benchmarks/<b>/configs/<b>_<harness>/manifest.yamlfor the 12 moved manifests, with the datasets prepared byprepare.py: all valid. Each resolvesagent_serverto its session agent and loads 900 DeepSearchQA or 200 WideSearch rows.ac8a646385: 52 checks pass, 15 skipped. The only failure is the non-blocking Environment Server compliance probe ofresponses_api_agents/harness_exa_search, which runs because this PR touches itsapp.py. It reports A1 (the agent definesrun()) and A2 (no agent sessions). Both describe the deprecated agent this PR starts retiring; the PR adds only its deprecation warning.Rollout evidence
Real-model smokes of all 12 moved configs against a stub Exa backend. No run made a real Exa call. No Exa API key was available, so
exa_base_urlpointed every run'sexa_searchserver at a local stub. The stub serves:/search: two placeholder results,https://stub.example/page0andpage1. Each highlight only echoes the query./contents: for each requested URL, one placeholder sentence repeated 20 times as the page text. Whenhighlightsis requested it adds one placeholder passage that echoes the query.The stub logs each request it receives: path, body, and whether the key header was present.
Everything else ran as shipped:
gym env start --config benchmarks/<b>/configs/<b>_<harness>.yamlwithvllm_modeland the Docker sandbox provider, thengym eval run --no-serve --agent <agent> --input <row> --limit 1;nvidia/nemotron-3.5-super-vl-120b-a12bon a hosted endpoint;0(single answer, "New Zealand") and WideSearchws_en_005, withtask_sourceremoved so--agentroutes them;web_search×2,find_in_page×1/search2,/contents1mcp__exa_search__web_search×2/search2exa_search_web_search×5/search5exa_search__web_search×44,exa_search__find_in_page×3,exa_search__scroll_page×5/search44,/contents8exa_search_web_search×7/search7mcp__exa_search__web_search×2,mcp__exa_search__find_in_page×2/search2,/contents2web_search×8,find_in_page×7/search8,/contents7mcp__exa_search__web_search×8,mcp__exa_search__find_in_page×4/search8,/contents4exa_search_web_search×7,exa_search_find_in_page×4/search7,/contents4exa_search__web_search×42,exa_search__find_in_page×28/search42,/contents28exa_search_web_search×12,exa_search_find_in_page×4,exa_search_scroll_page×2/search12,/contents6mcp__exa_search__web_search×10,mcp__exa_search__find_in_page×4,mcp__exa_search__scroll_page×1/search10,/contents5In every run:
mask_sample: false, and the benchmark's judge graded the answer;x-api-keyheader, and every/searchsentexcludeDomains: ["huggingface.co", "hf.co"];find_in_pagesenthighlights: {query}, andscroll_pageasked for page text only;Pi's DeepSearchQA 0.0 is a wrong final answer: the judge saw "Luxembourg", although New Zealand was in Pi's own table. The same config with the first prompt wording answered New Zealand (1.0). WideSearch's reward is the strict whole-table score, so a stub-backed run scores 0, and item F1 shows the table was graded.
Before the prompt fix, all six DeepSearchQA copies also ran on the first prompt wording, all with reward 1.0. In that round Hermes called bare
web_searchtwice and got "Tool 'web_search' does not exist" before it foundmcp__exa_search__web_search. That run motivated the prompt change.Placeholder pages cannot answer the questions. The DeepSearchQA answers came from the harnesses' own shell and fetch tools, which keep open network access (see "Sandbox egress" above). These runs prove the wiring for each harness:
exa_searchsession is seeded;They say nothing about Exa's result quality. Exa's request and response shapes are covered only by the unit tests in
test_exa_provider.py.Not run: real Exa. No Exa API key was available, so no run in this PR sent a request to Exa.
🤖 Generated with Claude Code