Skip to content

feat(zoo): query-driven collection — discovery + bring-up agents#35

Merged
ignorejjj merged 5 commits into
mainfrom
feat/benchmark-add-agents
Jun 25, 2026
Merged

feat(zoo): query-driven collection — discovery + bring-up agents#35
ignorejjj merged 5 commits into
mainfrom
feat/benchmark-add-agents

Conversation

@ignorejjj

@ignorejjj ignorejjj commented Jun 24, 2026

Copy link
Copy Markdown
Member

Stacked on #34 (natural-language format). Base is docs/zoo-overview; retargets to main when #34 merges.

Makes arbor benchmark add query-driven: describe what you want in natural language and Arbor searches, judges, fetches, and brings up a benchmark.

Flow

arbor benchmark add "<query>" [--bringup]:

  1. Discovery agent (Stage 0) — a search-enabled agent (keyless alphaXiv + Jina web tools + bash/file) searches GitHub / HuggingFace / arXiv, judges candidates (eval + baseline present? headroom? compute fit? license?), and proposes the single best source as a JSON choice.
  2. Human gate — shows the chosen repo + rationale and confirms (--yes to skip).
  3. Acquire + scaffold — clone into the global cache, scaffold a draft (the deterministic spine).
  4. Bring-up agent (--bringup) — an agent makes the baseline run, writes README + PROVENANCE, then the code runs the eval (dev) + structural verify to check the result.

A repo URL skips discovery and goes straight to acquire.

What's solid vs. what needs live iteration

  • Built + unit-tested (with an injected fake run_agent, no live LLM/web): the whole orchestration — discovery's query→parse-choice paths (ok / no-json / null-source / error) and bring-up's write→eval→score→verify paths. Tool wiring uses the real Agent runtime (create_provider + get_all_tools + keyless web factories), the same machinery the executor/search-agent use. Never wired into the Coordinator loop (§2.1).
  • Needs an API key + prompt iteration: the agents' actual judgment — whether discovery picks good benchmarks and bring-up reproduces an arbitrary repo's baseline. The plumbing and success-checks are here; the prompts will want tuning against real repos.

Tests

test_zoo_discovery.py + test_zoo_bringup.py cover the agent-stage orchestration via fake runners. ruff + mypy + full suite + mkdocs build --strict green.

The collection spine acquires + scaffolds a draft; this adds the first agent-driven
stage — baseline bring-up. `arbor.zoo.agent_stages.bringup()` runs one agent in the
draft folder to make the baseline actually run (install deps, get the reference working,
wrap an eval that prints `score:`, write the README + PROVENANCE), then checks its work
by running the eval (dev) and the structural verifier.

- Built on the core `Agent` runtime (`real_agent_runner` = create_provider + get_all_tools
  + Agent.run), the same machinery the executor uses; stays a standalone flow, never wired
  into the Coordinator loop.
- The agent run is behind an injected `run_agent` callable, so the orchestration (write →
  eval → score → verify) is unit-tested with a fake runner — no live LLM. The real runner
  needs a configured provider; validating its *reasoning* needs live iteration.
- CLI: `arbor benchmark add … --bringup [--max-turns N]` runs it after scaffolding and
  reports the dev score + verify; errors clearly if no provider is configured.

Tests: bring-up success / no-score / failed-verify / agent-error paths. ruff + mypy +
full suite green.
…e → pick)

Adds Stage 0: natural-language query → a discovery agent that searches GitHub /
HuggingFace / arXiv (keyless alphaXiv + Jina web tools), judges candidates (has an
eval + baseline? headroom? compute fit? license?), and proposes the single best source.

- `arbor.zoo.agent_stages.discover()` runs a search-enabled agent and parses its chosen
  source from a trailing JSON block (`{name, source:{kind,url}, metric, baseline, why}`).
  `real_agent_runner(with_search=True)` wires the keyless web search + fetch tools.
- CLI: `arbor benchmark add "<query>"` now resolves a query via discovery, shows the
  chosen repo + rationale, asks for confirmation (`--yes` to skip), then runs the existing
  acquire → scaffold (→ `--bringup`) flow. A URL still skips discovery.
- The agent run is behind the injected `run_agent` seam, so the orchestration (query →
  parse choice; success / no-json / null-source / error paths) is unit-tested with a fake
  runner — no live LLM or web. The live behavior needs an API key + prompt iteration.

Docs (overview, EN + zh) updated to the query-driven flow. ruff + mypy + full suite +
mkdocs --strict green.
@ignorejjj ignorejjj changed the title feat(zoo): bring-up agent stage (benchmark add --bringup) feat(zoo): query-driven collection — discovery + bring-up agents Jun 24, 2026
…to 100

Two fixes found by live-testing discovery on the WebThinker case:

1. Config inheritance — the collection agents built a bare AgentConfig, which defaulted
   to claude-sonnet and ignored ~/.arbor/config.yaml. They now run on the user's
   configured provider (e.g. openai-oauth / gpt-5.5), via a `_user_runner` helper that
   reads `llm_defaults()` in the CLI layer (keeps arbor.zoo independent of arbor.cli).
2. Turn budget — discovery over-explored and got cut off at 10–18 turns before emitting
   its JSON choice (and Agent.run returns only a stub on max_turns). `--max-turns` now
   defaults to 100 (discover() default raised to match) so the agent concludes naturally.
   Also nudged the discovery prompt to stop and answer once it has identified a suitable
   repo rather than exhaustively cloning/grepping.

Verified live: `discover("WebThinker benchmarks/baselines")` now returns ok=True with the
RUC-NLPIR/WebThinker repo and a correct metric/baseline breakdown (GPQA/GAIA/WebWalkerQA/
HLE + Search-o1 / naive-RAG / direct-gen baselines). ruff + mypy + full suite green.
Turn `arbor benchmark add "<request>"` into one interactive flow that produces a
single runnable draft task, instead of guessing.

- console AskUser tool (ConsoleAskUserTool) so the discovery / bring-up agents can
  ask the user the decisions that are genuinely theirs — which dataset, which
  baseline — at the terminal; TTY-gated so CI / piped runs never block
- discover: ask which dataset for a work that uses several; record a baseline_plan
  (harvest | implement | web)
- bring-up: baseline may be harvested from the repo, implemented to the user's
  described method, or found online; thread the user's original request into the
  task; produce a runnable draft and do NOT force-run the eval (ok = artifacts
  verify; a new `ran` flag marks whether it actually scored)
- a natural-language request runs find → acquire → bring-up by default; a bare
  URL/HF spec still does the single deterministic collect (+ optional --bringup)

All orchestration tested via injected fake runners (no LLM/network).
- README: add a "Collect a benchmark from a request" section
- zoo-overview EN/zh: rewrite the collect bullet, status line, entry-point row
- roadmap EN/zh: mark `arbor benchmark add` as built (discovery + interactive
  bring-up), reasoning still maturing
@ignorejjj ignorejjj changed the base branch from docs/zoo-overview to main June 25, 2026 01:23
@ignorejjj ignorejjj merged commit 74a9efb into main Jun 25, 2026
7 checks passed
@ignorejjj ignorejjj deleted the feat/benchmark-add-agents branch June 25, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant