diff --git a/app/nullius/catalogue/benchmarks/healthagentbench/benchmark.json b/app/nullius/catalogue/benchmarks/healthagentbench/benchmark.json new file mode 100644 index 000000000..e7c46461e --- /dev/null +++ b/app/nullius/catalogue/benchmarks/healthagentbench/benchmark.json @@ -0,0 +1,88 @@ +{ + "key": "healthagentbench", + "title": "HealthAgentBench", + "category": "Healthcare", + "domain": "Clinical imaging, pathology and health records: read the data, submit the finding.", + "scoring": "Task verifiers", + "harness": [ + "standard", + "harbor" + ], + "origin": "official", + "task_count": 75, + "published": { + "agent": "claude-code", + "says": "Claude Code, the agent the authors' own command runs. Their leaderboard also ranks Codex." + }, + "good_to_know": [ + "39 tasks use public data. X-ray needs PhysioNet access (PN_USER, PN_PASS), CT a Hugging Face token with CT-RATE accepted, MRI and event modelling a Redivis token with MRNet and EHRSHOT granted.", + "Plan 250 GB of disk for all 75 tasks. The first run downloads the data.", + "Each task's agent time limit comes from the task: 1 to 2 hours.", + "The provider must serve the X-ray judge, gpt-5.4, or the run another judge model, even when no X-ray task is run.", + "Every agent runs with its web tools off, as the authors require. The leaderboard runs xhigh reasoning effort: set the same to compare.", + "Data use agreements forbid sending MIMIC, EHRSHOT and similar records to providers they do not allow. Check yours first." + ], + "upstream_limitations": [ + "Some images install unpinned packages, so a rebuild can differ.", + "Survival scores break ties by row order.", + "Harbor sets no disk limit on Docker, so the tasks' disk sizes are not enforced.", + "The network does not block a web search the model's provider runs: each agent needs its own switch to turn web search off, for a fair comparison." + ], + "limitations": [ + "Tasks need Docker, or Podman with Docker's Compose plugin and its socket on (systemctl --user enable --now podman.socket). Boat cannot run them.", + "The X-ray verifier shares this machine's network, to reach its judge through the relay.", + "X-ray, CT, MRI and event modelling have not been run through Nullius." + ], + "datasets": [ + { + "key": "healthagentbench", + "title": "HealthAgentBench V2", + "tasks": 75, + "official": "https://github.com/microsoft/HealthAgentBench", + "registry": "", + "hub": "", + "verifier": "Each task's own verifier, in a container of its own given the submission alone.", + "source": "GitHub", + "notes": "9 categories; 39 tasks on public data." + }, + { + "key": "healthagentbench-v1", + "title": "HealthAgentBench V1", + "tasks": 54, + "official": "https://github.com/microsoft/HealthAgentBench/tree/v1", + "registry": "", + "hub": "", + "verifier": "Each task's own verifier, run in the task's container after the agent.", + "source": "GitHub", + "notes": "7 categories; 28 tasks on public data." + } + ], + "versions": { + "v1": { + "good_to_know": [ + "28 tasks use public data. X-ray needs PhysioNet access (PN_USER, PN_PASS), CT a Hugging Face token with CT-RATE accepted, event modelling a Redivis token with EHRSHOT granted.", + "Agents have public internet access, as V1 was published. V2 removed it because agents fetched answers.", + "The provider must serve the X-ray judge, gpt-5.4, or the run another judge model, even when no X-ray task is run." + ], + "upstream_limitations": [ + "Images install unpinned packages, so a rebuild can differ.", + "The authors retired EHR format conversion as too easy, and clinical trial matching for ambiguous cases." + ], + "limitations": [ + "Tasks need Docker, or Podman with Docker's Compose plugin and its socket on (systemctl --user enable --now podman.socket). Boat cannot run them.", + "Upstream gives X-ray agents its credentials. Nullius does not.", + "The X-ray verifier shares this machine's network, to reach its judge through the relay.", + "X-ray, CT and event modelling have not been run through Nullius." + ], + "datasets": { + "healthagentbench": { + "tasks": 54, + "notes": "7 categories; 28 tasks on public data.", + "verifier": "Each task's own verifier, run in the task's container after the agent." + } + } + } + }, + "citation": "@misc{liu2026healthagentbench,\n title = {HealthAgentBench: A Unified Benchmark Suite of Realistic Agentic Healthcare Environments for Challenging Frontier AI Agents},\n author = {Liu, Qianchu and Zhang, Sheng and Qin, Guanghui and Valanarasu, Jeya Maria Jose and Huang, Xiaoke and Argaw, Peniel and Rokuss, Maximilian and Lu, Mingyu and Ossowski, Timothy and Chaves, Juan Manuel Zambrano and Wong, Cliff and Patel, Naisargi and Hasija, Yashna and Wei, Mu and Yim, Wen-wai and Liu, Qin and Jing, Zilin and Entenmann, Jason and Usuyama, Naoto and Naumann, Tristan and Poon, Hoifung},\n year = {2026},\n eprint = {2606.31179},\n archivePrefix = {arXiv},\n primaryClass = {cs.AI},\n url = {https://arxiv.org/abs/2606.31179}\n}", + "citation_source": "https://github.com/microsoft/HealthAgentBench" +} diff --git a/app/nullius/catalogue/benchmarks/healthagentbench/driver.py b/app/nullius/catalogue/benchmarks/healthagentbench/driver.py new file mode 100644 index 000000000..6aff0e756 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/healthagentbench/driver.py @@ -0,0 +1,360 @@ +"""HealthAgentBench's driver for the Nullius standard (JSON lines on stdin and stdout). + +Each task is a Harbor task of the upstream at its pinned commit: ``instruction.md`` (the +prompt), ``task.toml`` (its limits), ``environment/`` (its image and, for most, a compose +file whose ``bootstrap`` service stages the data), ``tests/`` (its verifier). All of it runs +as published; only Harbor's part is done here. + +units - the dataset's tasks: ``full``, ``public`` (no credential) or one category's +setup - the upstream's own bootstrap service, run by compose (docker's or podman's) on a copy of the task, + its volumes bound to a folder; that folder is mounted in the unit's container + (``mount``) where the compose file mounts each volume in the agent's service, read-only + where it does. The image is built from the compose file's own context and Dockerfile +score - V2 (a separate verifier): ``verify`` takes out the task's artifacts alone, which + the image of ``tests/`` scores with no network, as Harbor does. V1 (a shared one): + ``verify`` runs ``tests/test.sh`` in the unit's container. The X-ray verifier, of + either, runs apart and asks the judge through the relay +oracle - the authors' solution where a task has one, else its answer key as a submission + +The bootstraps download into the upstream's own ``assets/``, shared by every unit. What one +unit stages, its hidden labels included, is under the upstream's ``.nullius/`` until it is scored. +""" +import atexit +import csv +import hashlib +import json +import os +import pwd +import shutil +import subprocess +import sys +import tempfile +import time +import tomllib + +from nullius.standard.backends.container import DOCKER as ENGINE # docker, or podman where it stands in, as the run chose + +UP = os.environ["NULLIUS_UPSTREAM"] +WORK = os.path.join(UP, ".nullius") +LOGS = "/logs/verifier" +OUT = "/nullius-artifacts" +BUILD_SECONDS = 3600 + +# A category's tasks (V1's names after V2's), and the credentials its bootstrap reads. +CATEGORIES = { + "xray": (("xray_report_correction_",), ("PN_USER", "PN_PASS")), + "ct": (("ct_abnormality_",), ("HF_TOKEN",)), + "pathology-area": (("pathology_tumor_area_selection_", "tumor_area_selection_pathology_"), ()), + "pathology-slide": (("pathology_tumor_slide_selection_",), ()), + "mri": (("mri_qa_",), ("REDIVIS_API_TOKEN",)), + "data-quality": (("ehr_data_quality_",), ()), + "ehr-qa": (("ehr_compositional_qa_",), ()), + "event": (("ehr_event_modelling_",), ("REDIVIS_API_TOKEN",)), + "survival": (("survival_prediction_",), ()), + "trial-matching": (("clinical_trial_matching_",), ()), + "ehr-to-meds": (("ehr_to_meds_",), ()), +} +ENVIRONMENTS = {"xray": "physionet", "ct": "ct-rate", "mri": "redivis", "event": "redivis"} + +# The tasks' own base, as the data-quality tasks pin it, named in full for podman: here it only handles folders root wrote. +IMAGE = "docker.io/library/python:3.12-slim@sha256:090ba77e2958f6af52a5341f788b50b032dd4ca28377d2893dcf1ecbdfdfe203" + +# The run gives the driver a home of its own; docker's plugins (compose) are in the user's. Podman keeps its images, +# settings and compose provider under the user's home and runtime folder: it runs with those, as Nullius's own podman does. +HOME = pwd.getpwuid(os.getuid()).pw_dir +os.environ.setdefault("DOCKER_CONFIG", os.path.join(HOME, ".docker")) +RUNTIME = f"/run/user/{os.getuid()}" +OWN = {"HOME": HOME, **({"XDG_RUNTIME_DIR": RUNTIME} if os.path.isdir(RUNTIME) else {})} if ENGINE == "podman" else {} + +made = set() # the staging folders of this process's units +staged = {} # each unit's last staging here: a proof's oracle gets a copy of its folder + + +def docker(*args, seconds=600, check=True, env=None): + env = {**(env or os.environ), **OWN} if OWN else env + r = subprocess.run([ENGINE, *args], capture_output=True, text=True, timeout=seconds, stdin=subprocess.DEVNULL, env=env) + if check and r.returncode: + said = r.stderr + r.stdout + for name in {n for _, names in CATEGORIES.values() for n in names}: + said = said.replace(os.environ.get(name) or "\0", "[redacted]") + raise RuntimeError(f"{ENGINE} {' '.join(args[:2])}: {said.strip()[-600:]}") + return r + + +def quietly(*args): + try: + docker(*args, check=False) + except subprocess.TimeoutExpired: + pass + + +def category(unit): + for name, (starts, _) in CATEGORIES.items(): + if unit.startswith(starts): + return name + raise ValueError(f"{unit} is of no category this driver knows") + + +def task(unit): + category(unit) + here = os.path.join(UP, "tasks", unit) + with open(os.path.join(here, "task.toml"), "rb") as f: + return here, tomllib.load(f) + + +def stage(dir): + """The unit's staging folder: its task's copy, with the tests its bootstrap fills, and its volumes.""" + return os.path.join(WORK, hashlib.sha256(os.path.realpath(dir).encode()).hexdigest()[:16]) + + +def project(path): + return "nullius-hab-" + os.path.basename(path) + + +def forget(path): + """A unit's staging and its compose project's tags. The bootstraps write as root, so what they wrote is removed the same way.""" + if os.path.isdir(path): + for name in ("img", "main", "bootstrap"): # the tags; their images stay under their kept name + quietly("rmi", f"{project(path)}-{name}") + shutil.rmtree(path, ignore_errors=True) + if os.path.isdir(path): + quietly("run", "--rm", "--network", "none", "-v", f"{path}:/gone", IMAGE, "find", "/gone", "-mindepth", "1", "-delete") + shutil.rmtree(path, ignore_errors=True) + made.discard(path) + + +def context(unit, build): + """The agent's image: the compose file's build context without ``tests/``, its Dockerfile at the + root, where ``image.build`` reads it. Pinned by the commit, so made once.""" + rel = os.path.join(".nullius", "images", unit) + where = os.path.join(UP, rel) + if not os.path.isdir(where): + src = build["context"] + os.makedirs(os.path.dirname(where), exist_ok=True) + tmp = tempfile.mkdtemp(dir=os.path.dirname(where)) + shutil.copytree(src, tmp, symlinks=True, dirs_exist_ok=True, ignore=shutil.ignore_patterns("tests", "solution", "README.md")) + shutil.copyfile(os.path.join(src, build.get("dockerfile") or "Dockerfile"), os.path.join(tmp, "Dockerfile")) + try: + os.rename(tmp, where) + except OSError: # another unit made it first + shutil.rmtree(tmp, ignore_errors=True) + return rel + + +def bootstrap(unit, dir): + """The unit's data staged by the upstream's own service: its image's folder, and each staged + folder by the path it has in the agent's container.""" + here = stage(dir) + forget(here) + made.add(here) + staged[unit] = here + work = os.path.join(here, "tasks", unit) + shutil.copytree(os.path.join(UP, "tasks", unit), work, symlinks=True) + os.makedirs(os.path.join(UP, "assets"), exist_ok=True) + os.symlink(os.path.join(UP, "assets"), os.path.join(here, "assets")) + compose = os.path.join(work, "environment", "docker-compose.yaml") + if not os.path.isfile(compose): + return os.path.join("tasks", unit, "environment"), {} + # what the compose files name as their env_file, empty: the credentials go by name, never into a file + open(os.path.join(here, ".env"), "w").close() + base = ["compose", "-p", project(here), "-f", compose] + services = json.loads(docker(*base, "config", "--format", "json").stdout)["services"] + main = services["main"] + volumes = {v["source"]: v["target"] + (":ro" if v.get("read_only") else "") for v in main.get("volumes") or [] if v["type"] == "volume"} + over = {} + for name in volumes: + os.makedirs(os.path.join(here, "volumes", name)) + over[name] = {"driver": "local", "driver_opts": {"type": "none", "o": "bind", "device": os.path.join(here, "volumes", name)}} + with open(os.path.join(here, "volumes.json"), "w") as f: + json.dump({"volumes": over}, f) + base += ["-f", os.path.join(here, "volumes.json")] + try: + # each image the compose file builds, kept by the task and the commit: built once + built = {svc["image"]: f"nullius/hab-{unit.replace('_', '-')}-{name}:{os.path.basename(UP)[:12]}" + for name, svc in services.items() if svc.get("build")} + if not all(docker("image", "inspect", kept, check=False).returncode == 0 for kept in built.values()): + docker(*base, "build", seconds=BUILD_SECONDS) + for image, kept in built.items(): + docker("tag", image, kept) + for image, kept in built.items(): + docker("tag", kept, image) + named = [w for n in CATEGORIES[category(unit)][1] for w in ("-e", n)] + docker(*base, "run", "--rm", "--no-deps", "-T", *named, "bootstrap", seconds=6 * 3600) + finally: + quietly(*base, "down", "-v") + # what root wrote, readable to the copies made of it + docker("run", "--rm", "--network", "none", "-v", f"{os.path.join(here, 'volumes')}:/v", "-v", f"{work}/tests:/t", IMAGE, "chmod", "-R", "a+rX", "/v", "/t", seconds=3600) + return context(unit, main["build"]), {os.path.relpath(os.path.join(here, "volumes", n), UP): at for n, at in volumes.items()} + + +def separate(t): + return (t.get("verifier") or {}).get("environment_mode") == "separate" + + +def artifacts(t): + return t.get("artifacts") or [t["metadata"]["submission_path"]] + + +def units(dataset): + every = sorted(os.listdir(os.path.join(UP, "tasks"))) + if dataset == "full": + return {"units": every} + if dataset == "public": + return {"units": [u for u in every if not CATEGORIES[category(u)][1]]} + return {"units": [u for u in every if category(u) == dataset]} + + +def setup(unit, dir): + here, t = task(unit) + kind = category(unit) + with open(os.path.join(here, "instruction.md")) as f: + prompt = f.read().strip() + reply = {"prompt": prompt, "environment": ENVIRONMENTS.get(kind, "task"), "agent_seconds": t["agent"]["timeout_sec"]} + if not all(os.environ.get(n) for n in CATEGORIES[kind][1]): + return reply # the run says which credential is missing + for old in list(made): # a driver serves one unit at a time: what an earlier one left goes + forget(old) + build, data = bootstrap(unit, dir) + env = t["environment"] + reply["image"] = {"build": build, "memory_mb": env["memory_mb"], "cpus": env["cpus"]} + if env.get("allow_internet"): # V1's policy + reply["internet"] = True + if data: + reply["mount"] = data + if separate(t) or kind == "xray": + take = f'rm -rf "{OUT}"\n' + "".join(f'mkdir -p "{OUT}{os.path.dirname(a)}"; [ -f "{a}" ] && [ ! -L "{a}" ] && cp "{a}" "{OUT}{a}"\n' for a in artifacts(t)) + reply["verify"] = {"run": ["sh", "-c", take + "true"], "collect": OUT, "seconds": 600} + else: + tests = os.path.relpath(os.path.join(stage(dir), "tasks", unit, "tests"), UP) + # what the agent may have left in the verifier's logs goes before the verifier writes there + reply["verify"] = {"copy": {tests: "/tests"}, "run": ["sh", "-c", f"rm -rf {LOGS}; exec bash /tests/test.sh"], "collect": LOGS, + "seconds": t["verifier"]["timeout_sec"], "network": True} + return reply + + +def verifier(unit, dir, t, judge, out): + """The task's verifier in a container of its own, given its artifacts alone: the folder its logs + are copied into, and its exit.""" + here = stage(dir) + name = "nullius-hab-verify-" + os.path.basename(here) + tests = os.path.join(here, "tasks", unit, "tests") + v = t["verifier"] + room = v.get("environment") or t["environment"] + # V2's verifier is the image of tests/, labels included; V1's X-ray verifier is in the task's image + where = tests if separate(t) else os.path.join(UP, ".nullius", "images", unit) + args, env = ["--network", "none"], dict(os.environ) + if category(unit) == "xray": + env.update({"CHEXPROMPT_OPENAI_API_KEY": judge["key"], "CHEXPROMPT_OPENAI_BASE_URL": judge["base_url"], + "CHEXPROMPT_DEPLOYMENT": judge["model"].rsplit("/", 1)[-1]}) + # the relay's route is on this machine's loopback + args = ["--network", "host", "-e", "CHEXPROMPT_OPENAI_API_KEY", "-e", "CHEXPROMPT_OPENAI_BASE_URL", "-e", "CHEXPROMPT_DEPLOYMENT"] + if not separate(t): + args += ["-v", f"{tests}:/tests:ro"] + try: + docker("build", "-t", name, where, seconds=BUILD_SECONDS) + docker("create", "--name", name, "--cpus", str(room["cpus"]), "--memory", f"{room['memory_mb']}m", *args, name, "bash", "/tests/test.sh", env=env) + sent = os.path.join(out, "workspace") + if os.path.isdir(sent): + docker("cp", sent, f"{name}:/") + try: + r = docker("start", "-a", name, seconds=v["timeout_sec"], check=False) + except subprocess.TimeoutExpired: + raise RuntimeError(f"VerifierError: the verifier did not end in {v['timeout_sec']:g} s") + with open(os.path.join(out, "test-stdout.txt"), "w") as f: + f.write(r.stdout + r.stderr) + logs = os.path.join(out, "task-verifier") + os.makedirs(logs) + docker("cp", f"{name}:{LOGS}/.", logs, check=False) + return logs, r.returncode + finally: + quietly("rm", "-f", "-v", name) + quietly("rmi", *(["--no-prune"] if ENGINE == "docker" else []), name) # docker keeps its packages as the next build's cache + + +def score(unit, dir, transcript, answer, verified=None, judge=None): + _, t = task(unit) + if not verified: + raise RuntimeError("VerifierError: the task's check did not run") + out, code = verified["dir"], verified.get("exit") + try: + if separate(t) or category(unit) == "xray": + out, code = verifier(unit, dir, t, judge, out) + finally: + try: + forget(stage(dir)) + except subprocess.TimeoutExpired: + pass + detail, reward = {"exit": code}, None + try: + with open(os.path.join(out, "reward.txt")) as f: + reward = float(f.read().strip()) + except (OSError, ValueError): + try: + with open(os.path.join(out, "reward.json")) as f: + got = json.load(f) + reward = float(got["reward"] if isinstance(got, dict) else got) + except (OSError, ValueError, KeyError, TypeError): + pass + if reward is None: + raise RuntimeError("VerifierError: the task's verifier wrote no reward") + try: + with open(os.path.join(out, "metrics.json")) as f: + detail["metrics"] = {k: v for k, v in json.load(f).items() if isinstance(v, (int, float, str, bool))} + except (OSError, ValueError, AttributeError): + pass + return {"reward": reward, "passed": reward >= 1.0, "detail": detail} + + +def key(unit, dir, name): + """An answer key of ``tests/``: published with the task, or written there by its bootstrap.""" + here = stage(dir) if os.path.isdir(stage(dir)) else staged.get(unit, stage(dir)) + with open(os.path.join(here, "tasks", unit, "tests", name), newline="") as f: + return json.load(f) if name.endswith(".json") else list(csv.DictReader(f)) if name.endswith(".csv") else f.read() + + +def oracle(unit, dir): + _, t = task(unit) + solution = os.path.join("tasks", unit, "solution") + if os.path.isdir(os.path.join(UP, solution)): + return {"answer": "", "solve": {"copy": {solution: "/solution"}, "run": ["bash", "/solution/solve.sh"], "seconds": t["agent"]["timeout_sec"]}} + kind = category(unit) + if kind == "pathology-slide": + text = json.dumps({"tumor_slides": key(unit, dir, "task_answer_key.json")["tumor_slides"]}) + elif kind == "pathology-area": + text = json.dumps([{"task_id": k["task_id"], "contains_tumor": k["expected_contains_tumor"], + "predicted_tumor_tiles": k["expected_tumor_tiles"]} for k in key(unit, dir, "task_answer_key.json")]) + elif kind == "ehr-qa": + text = json.dumps([{"question_id": k["question_id"], "answer": k["gt_answer"]} for k in key(unit, dir, "answer_key.json")]) + elif kind == "survival": + text = "sample_id,prediction\n" + "".join(f"{r['sample_id']},{r['observed_time_days']}\n" for r in key(unit, dir, "test_labels.csv")) + elif kind == "data-quality": + text = "table,_row_id\n" + "".join(f"{r['table']},{r['row_id']}\n" for r in key(unit, dir, "labels.csv")) + elif kind == "trial-matching": + text = key(unit, dir, "gold.txt") + else: + raise RuntimeError(f"the upstream gives {unit} no reference solution") + return {"answer": "", "solve": {"write": {artifacts(t)[0]: text}, "run": ["true"], "seconds": 60}} + + +def end(unit, dir): + forget(stage(dir)) + return {} + + +atexit.register(lambda: [forget(p) for p in list(made)]) +# a driver closed while it removed them (the run gives it seconds) leaves stagings: after a day, longer +# than any unit's setup, work and score together, no run is using one +for old in os.listdir(WORK) if os.path.isdir(WORK) else (): + path = os.path.join(WORK, old) + if old != "images" and time.time() - os.path.getmtime(path) > 86400: + forget(path) +HANDLERS = {"units": units, "setup": setup, "score": score, "oracle": oracle, "end": end} +for line in sys.stdin: + try: + req = json.loads(line) + out = HANDLERS[req.pop("op")](**req) + except RuntimeError as e: # said as it is: "VerifierError: ..." keeps its kind + out = {"error": str(e)} + except Exception as e: + out = {"error": f"{type(e).__name__}: {e}"} + print(json.dumps(out), flush=True) diff --git a/app/nullius/catalogue/benchmarks/healthagentbench/proofs.json b/app/nullius/catalogue/benchmarks/healthagentbench/proofs.json new file mode 100644 index 000000000..aaaebf861 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/healthagentbench/proofs.json @@ -0,0 +1,219 @@ +{ + "schema": "nullius.proofs/v1", + "kind": "benchmark", + "key": "healthagentbench", + "versions": { + "v2": { + "proven": { + "data-quality": { + "units": { + "units": 8, + "passed": "8 ids, the same twice, unique" + }, + "leak": { + "units": 2, + "looked_for": 0, + "short": 0, + "passed": "2/2", + "note": "2 unit(s) whose oracle gave nothing to look for", + "limit": 2 + }, + "nop": { + "passed": "0/2", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + }, + "oracle": { + "passed": "2/2", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + } + }, + "ehr-qa": { + "units": { + "units": 6, + "passed": "6 ids, the same twice, unique" + }, + "leak": { + "units": 2, + "looked_for": 0, + "short": 0, + "passed": "2/2", + "note": "2 unit(s) whose oracle gave nothing to look for", + "limit": 2 + }, + "nop": { + "passed": "0/2", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + }, + "oracle": { + "passed": "2/2", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + } + }, + "survival": { + "units": { + "units": 5, + "passed": "5 ids, the same twice, unique" + }, + "leak": { + "units": 2, + "looked_for": 0, + "short": 0, + "passed": "2/2", + "note": "2 unit(s) whose oracle gave nothing to look for", + "limit": 2 + }, + "nop": { + "passed": "0/2", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + }, + "oracle": { + "passed": "2/2", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + } + }, + "pathology-slide": { + "units": { + "units": 10, + "passed": "10 ids, the same twice, unique" + }, + "leak": { + "units": 2, + "looked_for": 0, + "short": 0, + "passed": "2/2", + "note": "2 unit(s) whose oracle gave nothing to look for", + "limit": 2 + }, + "nop": { + "passed": "0/2", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + }, + "oracle": { + "passed": "2/2", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + } + } + } + }, + "v1": { + "proven": { + "data-quality": { + "units": { + "units": 8, + "passed": "8 ids, the same twice, unique" + }, + "leak": { + "units": 2, + "looked_for": 0, + "short": 0, + "passed": "2/2", + "note": "2 unit(s) whose oracle gave nothing to look for", + "limit": 2 + }, + "nop": { + "passed": "0/2", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + }, + "oracle": { + "passed": "2/2", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + } + }, + "trial-matching": { + "units": { + "units": 9, + "passed": "9 ids, the same twice, unique" + }, + "leak": { + "units": 2, + "looked_for": 0, + "short": 0, + "passed": "2/2", + "note": "2 unit(s) whose oracle gave nothing to look for", + "limit": 2 + }, + "nop": { + "passed": "0/2", + "value": 0.0, + "expect": { + "at_most": 0.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + }, + "oracle": { + "passed": "2/2", + "value": 1.0, + "expect": { + "at_least": 1.0 + }, + "units": 2, + "judge": "gpt-5.4", + "limit": 2 + } + } + } + } + } +} diff --git a/app/nullius/catalogue/benchmarks/healthagentbench/standard.json b/app/nullius/catalogue/benchmarks/healthagentbench/standard.json new file mode 100644 index 000000000..a2018d8c9 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/healthagentbench/standard.json @@ -0,0 +1,237 @@ +{ + "schema": "nullius.benchmark/v1", + "key": "healthagentbench", + "label": "HealthAgentBench", + "summary": "Each task is a container with real clinical data staged by the upstream's own bootstrap; the agent writes a submission and the task's own verifier scores it.", + "family": "agent", + "needs": [ + "agent.workspace/v1" + ], + "upstream": { + "repository": "https://github.com/microsoft/HealthAgentBench", + "license": "MIT" + }, + "driver": { + "command": [ + "python3", + "{here}/driver.py" + ], + "unit_end": true + }, + "datasets": [ + { + "id": "full", + "label": "All 75 tasks", + "units": 75, + "environment": "task" + }, + { + "id": "public", + "label": "Public data (no credential)", + "units": 39, + "environment": "task" + }, + { + "id": "data-quality", + "label": "EHR data quality auditing", + "units": 8, + "environment": "task" + }, + { + "id": "ehr-qa", + "label": "EHR compositional QA", + "units": 6, + "environment": "task" + }, + { + "id": "survival", + "label": "Cancer survival prediction", + "units": 5, + "environment": "task" + }, + { + "id": "pathology-area", + "label": "Pathology tumor area selection", + "units": 10, + "environment": "task" + }, + { + "id": "pathology-slide", + "label": "Pathology tumor slide selection", + "units": 10, + "environment": "task" + }, + { + "id": "ct", + "label": "CT abnormality classification", + "units": 10, + "environment": "ct-rate" + }, + { + "id": "mri", + "label": "MRI QA", + "units": 10, + "environment": "redivis" + }, + { + "id": "event", + "label": "EHR event modelling", + "units": 6, + "environment": "redivis" + }, + { + "id": "xray", + "label": "X-ray report correction", + "units": 10, + "environment": "physionet" + } + ], + "units": { + "noun": "task", + "nouns": "tasks", + "redistribute": false + }, + "environments": { + "task": { + "summary": "The task's own image, built from its Dockerfile as published, its data staged by its own bootstrap.", + "image": "own" + }, + "ct-rate": { + "summary": "The task's own image and the gated CT-RATE scans.", + "image": "own", + "needs_secrets": [ + { + "name": "HF_TOKEN", + "to": "driver", + "provider": "huggingface", + "summary": "Hugging Face access token." + } + ] + }, + "redivis": { + "summary": "The task's own image and the gated EHRSHOT or MRNet data.", + "image": "own", + "needs_secrets": [ + { + "name": "REDIVIS_API_TOKEN", + "to": "driver", + "summary": "Redivis API token with access to EHRSHOT and MRNet." + } + ] + }, + "physionet": { + "summary": "The task's own image and the credentialed MIMIC-CXR images and reports.", + "image": "own", + "needs_secrets": [ + { + "name": "PN_USER", + "to": "driver", + "summary": "PhysioNet user name." + }, + { + "name": "PN_PASS", + "to": "driver", + "summary": "PhysioNet password." + } + ] + } + }, + "controls": { + "nop": { + "source": "nullius", + "from": "Nullius: no agent runs; the verifier scores the submission as the image left it." + }, + "oracle": { + "source": "adapter", + "from": "The authors' solution for data quality; elsewhere the task's own answer key, written as a submission. X-ray, CT, MRI, event modelling and EHR format conversion have none." + } + }, + "score": { + "kind": "pass", + "says": "the task's own verifier writes reward 1; an X-ray report passes when most of its judge's votes find no clinically significant error", + "judge": { + "model": "gpt-5.4", + "says": "The X-ray tasks' CheXprompt votes. No other task asks it." + } + }, + "limits": { + "turn_seconds": 7200, + "setup_seconds": 28800, + "score_seconds": 10800 + }, + "default": "v2", + "versions": { + "v2": { + "upstream": { + "tested": "6f070d7b7c3380cbdf8a2981febfc1ea2560797a", + "tested_date": "2026-10-25" + }, + "agent_options": { + "web_tools": "off" + } + }, + "v1": { + "upstream": { + "branch": "v1", + "tested": "67101dbe98c06bd140f07d26735340c9ea8e6036", + "tested_date": "2026-10-25" + }, + "datasets": [ + { + "id": "full", + "label": "All 54 tasks", + "units": 54, + "environment": "task" + }, + { + "id": "public", + "label": "Public data (no credential)", + "units": 28, + "environment": "task" + }, + { + "id": "data-quality", + "label": "EHR data quality auditing", + "units": 8, + "environment": "task" + }, + { + "id": "trial-matching", + "label": "Clinical trial matching", + "units": 9, + "environment": "task" + }, + { + "id": "ehr-to-meds", + "label": "EHR format conversion", + "units": 1, + "environment": "task" + }, + { + "id": "pathology-area", + "label": "Pathology tumor area selection", + "units": 10, + "environment": "task" + }, + { + "id": "ct", + "label": "CT abnormality classification", + "units": 10, + "environment": "ct-rate" + }, + { + "id": "event", + "label": "EHR event modelling", + "units": 6, + "environment": "redivis" + }, + { + "id": "xray", + "label": "X-ray report correction", + "units": 10, + "environment": "physionet" + } + ] + } + } +} diff --git a/app/nullius/catalogue/benchmarks/healthagentbench/upstream-settings.json b/app/nullius/catalogue/benchmarks/healthagentbench/upstream-settings.json new file mode 100644 index 000000000..8c4a4aa77 --- /dev/null +++ b/app/nullius/catalogue/benchmarks/healthagentbench/upstream-settings.json @@ -0,0 +1,35 @@ +[ + {"entry": "harbor run", "setting": "--path / --include-task-name (which tasks)", "values": "tasks/ or a category's glob", "default": "tasks/", "nullius": "dataset:full"}, + {"entry": "harbor run", "setting": "the tasks on public data", "values": "", "default": "", "nullius": "dataset:public"}, + {"entry": "harbor run", "setting": "--include-task-name, EHR data quality auditing", "values": "", "default": "", "nullius": "dataset:data-quality"}, + {"entry": "harbor run", "setting": "--include-task-name, EHR compositional QA", "values": "", "default": "", "nullius": "dataset:ehr-qa"}, + {"entry": "harbor run", "setting": "--include-task-name, Cancer survival prediction", "values": "", "default": "", "nullius": "dataset:survival"}, + {"entry": "harbor run", "setting": "--include-task-name, Pathology tumor area selection", "values": "", "default": "", "nullius": "dataset:pathology-area"}, + {"entry": "harbor run", "setting": "--include-task-name, Pathology tumor slide selection", "values": "", "default": "", "nullius": "dataset:pathology-slide"}, + {"entry": "harbor run", "setting": "--include-task-name, CT abnormality classification", "values": "", "default": "", "nullius": "dataset:ct"}, + {"entry": "harbor run", "setting": "--include-task-name, MRI QA", "values": "", "default": "", "nullius": "dataset:mri"}, + {"entry": "harbor run", "setting": "--include-task-name, EHR event modelling", "values": "", "default": "", "nullius": "dataset:event"}, + {"entry": "harbor run", "setting": "--include-task-name, X-ray report correction", "values": "", "default": "", "nullius": "dataset:xray"}, + {"entry": "harbor run", "setting": "--include-task-name, Clinical trial matching", "values": "", "default": "", "nullius": "dataset:trial-matching"}, + {"entry": "harbor run", "setting": "--include-task-name, EHR format conversion", "values": "", "default": "", "nullius": "dataset:ehr-to-meds"}, + {"entry": "harbor run", "setting": "--agent", "values": "claude-code, codex", "default": "claude-code", "nullius": "fixed:the run's agent - any that proved the workspace port"}, + {"entry": "harbor run", "setting": "--model", "values": "the agent's model", "default": "claude-opus-5", "nullius": "fixed:the run's model - sent through the relay"}, + {"entry": "harbor run", "setting": "--agent-kwarg reasoning_effort", "values": "xhigh on the leaderboard", "default": "xhigh", "nullius": "fixed:the agent's own reasoning_effort option - an agent setting"}, + {"entry": "harbor run", "setting": "--agent-kwarg disallowed_tools / web_search", "values": "web tools off", "default": "off", "nullius": "fixed:off on V2 - each agent's own web_tools switch, where it has one"}, + {"entry": "harbor run", "setting": "--allow-agent-host", "values": "a model API's host", "default": "none", "nullius": "fixed:the relay alone - no host is opened"}, + {"entry": "harbor run", "setting": "--n-attempts", "values": "attempts per task", "default": "1 (V1's leaderboard: 3)", "nullius": "fixed:the run's attempts - 1 by default"}, + {"entry": "harbor run", "setting": "--n-concurrent", "values": "5 in the README", "default": "5", "nullius": "fixed:the run's concurrency - not what is measured"}, + {"entry": "task.toml", "setting": "agent.timeout_sec", "values": "3600 to 7200", "default": "per task", "nullius": "fixed:each task's own - as Harbor gives it"}, + {"entry": "task.toml", "setting": "agent.network_mode, allowed_hosts", "values": "V2 model APIs; V1 open", "default": "per version", "nullius": "fixed:V2 the relay alone; V1 public internet - as each version published it"}, + {"entry": "task.toml", "setting": "environment.cpus, memory_mb", "values": "per task", "default": "per task", "nullius": "fixed:each task's own - as Harbor gives it"}, + {"entry": "task.toml", "setting": "environment.storage_mb", "values": "per task", "default": "per task", "nullius": "fixed:not applied - Harbor sets none on Docker either"}, + {"entry": "task.toml", "setting": "environment.gpus", "values": "0", "default": "0", "nullius": "fixed:0 - no task asks for one"}, + {"entry": "task.toml", "setting": "environment.build_timeout_sec", "values": "300 to 21600", "default": "per task", "nullius": "fixed:3600 s for a build and 6 h for a bootstrap - no task's own"}, + {"entry": "task.toml", "setting": "verifier.timeout_sec, verifier.environment", "values": "per task", "default": "per task", "nullius": "fixed:each task's own - as Harbor gives it"}, + {"entry": "environment/docker-compose.yaml", "setting": "the bootstrap service and its volumes", "values": "per task", "default": "per task", "nullius": "fixed:the upstream's own service - its volumes mounted in the task's container, read-only where the file says"}, + {"entry": ".env", "setting": "PN_USER, PN_PASS, HF_TOKEN, REDIVIS_API_TOKEN", "values": "credentials", "default": "unset", "nullius": "fixed:the benchmark's credentials in Settings - given to the bootstrap alone"}, + {"entry": ".env", "setting": "CHEXPROMPT_OPENAI_API_KEY, CHEXPROMPT_OPENAI_BASE_URL", "values": "the judge's endpoint", "default": "api.openai.com", "nullius": "fixed:the judge's route on the relay - no key leaves it"}, + {"entry": ".env", "setting": "CHEXPROMPT_DEPLOYMENT", "values": "a judge model", "default": "gpt-5.4", "nullius": "fixed:the run's judge - gpt-5.4 unless --judge-model names another"}, + {"entry": ".env", "setting": "CHEXPROMPT_AZURE_* (three)", "values": "an Azure endpoint", "default": "unset", "nullius": "not offered - the judge is asked through the relay"}, + {"entry": "tests/harbor_evaluator.py", "setting": "CHEXPROMPT_VOTES, CHEXPROMPT_PASS_THRESHOLD", "values": "V2's X-ray votes and bar", "default": "5, 3", "nullius": "fixed:5 and 3 - the upstream's defaults"} +] diff --git a/app/nullius/recipes/launch.py b/app/nullius/recipes/launch.py index 92a1ff9fc..f1acf6eda 100644 --- a/app/nullius/recipes/launch.py +++ b/app/nullius/recipes/launch.py @@ -45,6 +45,8 @@ def parameter(key, label, group, kind, default=None, *, help="", **extra): LAUNCH = { "swe-bench-verified": {"local": "../harbor-datasets/swe-bench-verified"}, "terminal-bench": {"local": "../harbor-datasets/terminal-bench"}, + # Its tasks read ../../../assets and ../../../.env, so the folder stays in its clone. + "healthagentbench": {"local": "../HealthAgentBench/tasks"}, # A generator: the program `uv run` starts in a checkout of the repository that holds it, writing to --output-dir. "tau3-bench": {"local": "../harbor-datasets/tau3-bench", "generate": {"program": "tau3-bench", "checkout": "tau2-bench checkout · dev/tau3 branch", "example": "../tau2-bench"}}, diff --git a/app/nullius/standard/backends/container.py b/app/nullius/standard/backends/container.py index 5279cef2d..46a69dcca 100644 --- a/app/nullius/standard/backends/container.py +++ b/app/nullius/standard/backends/container.py @@ -117,7 +117,7 @@ from nullius import constraints, ondisk, paths from nullius.standard.calls import exchanges as exchange_store from nullius.standard.contract import definitions -from nullius.standard.contract.definitions import step_problems +from nullius.standard.contract.definitions import mount_problems, step_problems from nullius.standard.requirements import install def _runs_podman(path: str) -> bool: @@ -1646,18 +1646,24 @@ class Box: (unless the task keeps its processes). **Its limits** are the machine's constraints (:func:`capped`) and the - task's own ``cpus`` and ``memory_mb`` (``task``), the lower value of each.""" + task's own ``cpus`` and ``memory_mb`` (``task``), the lower value of each. + + **A task's staged data is mounted, not copied** (``volumes``, its setup's + ``mount``): folders of the upstream at their paths inside for the whole + unit, read-only when the path ends in ``:ro``, as its compose file's volume + gives them to its service.""" def __init__(self, job: str, tag: str, image: str, *, workdir: str, path: str = IMAGE_PATH, network: Optional[str] = None, mounted: Iterable[Tuple[str, bool]] = (), - runtimes: Optional[Dict[str, Tuple[str, str]]] = None, task: Optional[dict] = None, app: Optional[str] = None, env: Optional[dict] = None): + runtimes: Optional[Dict[str, Tuple[str, str]]] = None, task: Optional[dict] = None, app: Optional[str] = None, env: Optional[dict] = None, + volumes: Optional[Dict[str, str]] = None): n = names(job, tag) self.job, self.image, self.workdir, self.path = job, image, workdir, path self.env = dict(env or {}) self.name = n["agent"] self.net = network or n["network"] self.own_net = network is None - self.mounted, self.runtimes = list(mounted), dict(runtimes or {}) + self.mounted, self.runtimes, self.volumes = list(mounted), dict(runtimes or {}), dict(volumes or {}) self.task, self.app = dict(task or {}), app self.up = False self.keep: Optional[str] = None # the keep-alive's PID inside, found at the start @@ -1667,7 +1673,7 @@ def __init__(self, job: str, tag: str, image: str, *, workdir: str, path: str = def start(self) -> "Box": if self.app: app = os.path.abspath(self.app) - for p, _ in self.mounted: # the application's folder holds the keys' file + for p in [p for p, _ in self.mounted] + list(self.volumes): # the application's folder holds the keys' file if app == p or app.startswith(p.rstrip(os.sep) + os.sep): raise ValueError(f"{p} would show the agent this application's folder and its keys") try: @@ -1682,6 +1688,8 @@ def start(self) -> "Box": a += ["-v", f"{p}:{p}:{'ro' if ro else 'rw'}"] for host, inside in self.runtimes.values(): a += ["-v", f"{host}:{inside}:ro"] + for host, inside in self.volumes.items(): + a += ["-v", f"{host}:{inside}" if inside.endswith(":ro") else f"{host}:{inside}:rw"] self.up = True _docker(a + ["--entrypoint", KEEP_ALIVE[0], self.image] + KEEP_ALIVE[1:], timeout=300) self.keep = self.keeper() diff --git a/app/nullius/standard/contract/definitions.py b/app/nullius/standard/contract/definitions.py index 15d692d2a..637f36029 100644 --- a/app/nullius/standard/contract/definitions.py +++ b/app/nullius/standard/contract/definitions.py @@ -1602,6 +1602,17 @@ def step_problems(step, *, collect: bool) -> List[str]: return bad +def mount_problems(mount) -> List[str]: + """Validate an own image's ``mount``: folders of the upstream, each at its own absolute path inside, + read-only when that path ends in ``:ro``, as a compose file writes it.""" + inside = [d.removesuffix(":ro") if isinstance(d, str) else d for d in (mount.values() if isinstance(mount, dict) else ())] + if (not isinstance(mount, dict) or not mount or len(set(inside)) != len(inside) + or not all(isinstance(s, str) and s and not s.startswith("/") for s in mount) + or not all(isinstance(d, str) and d.startswith("/") and d != "/" and ":" not in d for d in inside)): + return ["mount: {path in the upstream: absolute path inside, :ro after it for read-only}, each path inside once"] + return [] + + def problems(d: dict, kind: str) -> List[str]: """What is wrong with definition ``d`` of ``kind``; empty when it may be offered.""" kind = names.kind(kind) diff --git a/app/nullius/standard/runner/run.py b/app/nullius/standard/runner/run.py index c55056f68..8003985eb 100644 --- a/app/nullius/standard/runner/run.py +++ b/app/nullius/standard/runner/run.py @@ -1755,6 +1755,8 @@ def sent(): raise _Ended("EnvironmentSetupError", "the unit's setup: verify runs in an own image, and this unit has none", retryable=False) if setup.get("prepare") is not None and not own: raise _Ended("EnvironmentSetupError", "the unit's setup: prepare runs in an own image, and this unit has none", retryable=False) + if setup.get("mount") is not None and not own: + raise _Ended("EnvironmentSetupError", "the unit's setup: mount is an own image's, and this unit has none", retryable=False) try: rl = self.unit_relay(tag, trial, setup, env_def, own) except (container.Unavailable, OSError) as e: @@ -2400,7 +2402,8 @@ def agent_internet(self, setup: dict, box, rl, trial: str): def own_box(self, tag: str, setup: dict, rl, home: str): """The unit's own container, started (``container.Box``): the image its - setup names, built or pulled on first use and said as a stage; for an + setup names, built or pulled on first use and said as a stage, with + the setup's ``mount``; for an agent, its install, definition, home and runtimes mounted, and each runtime shown to start in the image - a unit where one cannot (a glibc runtime in a musl image) is not run, which is no one's result.""" @@ -2411,6 +2414,8 @@ def own_box(self, tag: str, setup: dict, rl, home: str): bad += ["verify." + p for p in container.step_problems(setup["verify"], collect=True)] if setup.get("prepare") is not None: bad += ["prepare." + p for p in container.step_problems(setup["prepare"], collect=False)] + if setup.get("mount") is not None: + bad += container.mount_problems(setup["mount"]) if setup.get("workdir") is not None and not (isinstance(setup["workdir"], str) and setup["workdir"].startswith("/")): bad.append("workdir: an absolute path inside the image") if bad: @@ -2422,6 +2427,7 @@ def own_box(self, tag: str, setup: dict, rl, home: str): try: image = self.own_image(spec) cfg = container.image_config(image) + volumes = {container.within(self.up or self.bench["_here"], src): inside for src, inside in (setup.get("mount") or {}).items()} mounted, runtimes = [], {} if self.other["_kind"] == "agent": # as on the base: the unit home, install, definition, and MCP files, and what it runs on, under /opt/nullius @@ -2431,7 +2437,7 @@ def own_box(self, tag: str, setup: dict, rl, home: str): runtimes = self.runtimes box = container.Box(self.name, tag, image, workdir=setup.get("workdir") or cfg["workdir"], path=cfg["path"], network=rl.names["network"] if isinstance(rl, container.Unit) else None, - mounted=mounted, runtimes=runtimes, app=APP, env=setup.get("env"), + mounted=mounted, runtimes=runtimes, app=APP, env=setup.get("env"), volumes=volumes, task={k: spec[k] for k in ("cpus", "memory_mb") if k in spec}).start() for name in runtimes: why = box.runtime_problem(name) diff --git a/app/static/builder/command-builder-core.js b/app/static/builder/command-builder-core.js index 9665743cb..fd072ce5d 100644 --- a/app/static/builder/command-builder-core.js +++ b/app/static/builder/command-builder-core.js @@ -464,8 +464,9 @@ const d = dataset(r), options = []; if (d?.hub) options.push(['hub', d.hub.includes('(private)') ? 'Private hub' : 'Harbor hub']); else if (d?.registry) options.push(['registry', 'Versioned registry']); - else options.push(['registry', 'Registry or hub']); + else if (!d) options.push(['registry', 'Registry or hub']); options.push(['local', 'Local folder']); + if (d && !d.hub && !d.registry) options.push(['registry', 'Registry or hub']); if (d?.generate) options.push(['generate', 'Generate tasks']); return options; } diff --git a/app/static/catalogue/marks.svg b/app/static/catalogue/marks.svg index 6f6ec6736..8aea777fc 100644 --- a/app/static/catalogue/marks.svg +++ b/app/static/catalogue/marks.svg @@ -35,6 +35,10 @@ + + + + diff --git a/app/tests/fixtures/standard/ownbench/driver.py b/app/tests/fixtures/standard/ownbench/driver.py index 1c7baea19..f2e0bf207 100644 --- a/app/tests/fixtures/standard/ownbench/driver.py +++ b/app/tests/fixtures/standard/ownbench/driver.py @@ -1,6 +1,6 @@ """The own-image bench's driver: unit "one" runs in its own image, prepared -as root before anyone works in it, and is checked in it; unit "base" names no image but asks for a check, which only -an own image can give (the run refuses it).""" +as root before anyone works in it, its staged data mounted, and is checked in it; unit "base" names no image but asks +for a check, which only an own image can give (the run refuses it).""" import json import os import sys @@ -17,7 +17,8 @@ def handle(op, **kw): if kw["unit"] == "base": return {"prompt": "work", "environment": "base", "verify": verify} return {"prompt": "work", "environment": "task", "image": {"build": "tasks/one/environment", "memory_mb": 256}, - "prepare": {"run": ["sh", "-c", "id -u > /prepared-by"], "seconds": 60}, "verify": verify} + "prepare": {"run": ["sh", "-c", "id -u > /prepared-by"], "seconds": 60}, "mount": {"tasks/one/data": "/data:ro"}, + "verify": verify} if op == "score": v = kw.get("verified") or {} try: diff --git a/app/tests/fixtures/standard/ownbench/tasks/one/data/staged.txt b/app/tests/fixtures/standard/ownbench/tasks/one/data/staged.txt new file mode 100644 index 000000000..19d9cc858 --- /dev/null +++ b/app/tests/fixtures/standard/ownbench/tasks/one/data/staged.txt @@ -0,0 +1 @@ +staged diff --git a/app/tests/fixtures/standard/ownbench/tasks/one/tests/check.sh b/app/tests/fixtures/standard/ownbench/tasks/one/tests/check.sh index 9546d7461..a99a65e28 100644 --- a/app/tests/fixtures/standard/ownbench/tasks/one/tests/check.sh +++ b/app/tests/fixtures/standard/ownbench/tasks/one/tests/check.sh @@ -1,12 +1,13 @@ #!/bin/sh # The task's check, run in its container after the agent: the work is there, the agent never saw this -# folder, nothing the agent started still runs (its loop would write /tmp/alive again), and the -# benchmark's preparation ran as root before it. +# folder, nothing the agent started still runs (its loop would write /tmp/alive again), the +# benchmark's preparation ran as root before it, and its staged data is mounted, read-only as asked. mkdir -p /logs/out rm -f /tmp/alive sleep 1 if [ -f /work/done.txt ] && [ "$(cat /work/saw-tests.txt 2>/dev/null)" = "no" ] && [ ! -e /tmp/alive ] \ - && [ "$(cat /prepared-by 2>/dev/null)" = "0" ]; then + && [ "$(cat /prepared-by 2>/dev/null)" = "0" ] && [ "$(cat /data/staged.txt 2>/dev/null)" = "staged" ] \ + && ! touch /data/written 2>/dev/null; then echo 1 > /logs/out/reward.txt else echo 0 > /logs/out/reward.txt diff --git a/app/tests/test_catalog.py b/app/tests/test_catalog.py index d54f19ef0..f26e9cd48 100644 --- a/app/tests/test_catalog.py +++ b/app/tests/test_catalog.py @@ -33,7 +33,7 @@ def test_shipped_catalogue_is_consistent(self): self.assertEqual(titles, sorted(titles, key=catalog.sort_key)) # what has a usable route is listed, whoever made it and whether or not it has run listed = {x.key for x in cat.listed_benchmarks} - self.assertEqual(sorted(listed), ["gaia", "gsm8k", "humaneval", "locomo", "longmemeval", "medagentbench", "open-telco", "osworld1", "osworld2", "swe-bench-verified", "tau3-bench", "terminal-bench", "vitabench"]) + self.assertEqual(sorted(listed), ["gaia", "gsm8k", "healthagentbench", "humaneval", "locomo", "longmemeval", "medagentbench", "open-telco", "osworld1", "osworld2", "swe-bench-verified", "tau3-bench", "terminal-bench", "vitabench"]) self.assertEqual((cat.benchmark("longmemeval").origin, cat.benchmark("longmemeval").label), ("official", "Official")) self.assertEqual(cat.benchmark("tau3-bench").label, "Official") # τ³ files as "t3…", before "te…": a reader looking under T finds it diff --git a/app/tests/test_standard_own_image.py b/app/tests/test_standard_own_image.py index b1028e155..aea9e82c1 100644 --- a/app/tests/test_standard_own_image.py +++ b/app/tests/test_standard_own_image.py @@ -116,6 +116,13 @@ def test_task_environment_reaches_agent_and_runner_variables_win(self): self.assertEqual(env["NO_PROXY"], "localhost,relay") self.assertNotIn("testbed", argv) # values travel in the process environment, not arguments + def test_a_mount_names_upstream_folders_each_at_its_own_path_inside(self): + self.assertEqual(container.mount_problems({"tasks/one/data": "/data", "assets/x": "/workspace/x:ro"}), []) + for bad in ({}, [], {"tasks/one/data": "data"}, {"/etc": "/data"}, {"a": "/"}, {"a": "/d", "b": "/d:ro"}, {"": "/d"}, + {"a": "/d:rw"}, {"a": "/:ro"}): + with self.subTest(mount=bad): + self.assertTrue(any(p.startswith("mount:") for p in container.mount_problems(bad))) + def test_a_driver_names_the_tasks_files_and_nothing_else(self): self.assertTrue(container.within(HERE, "tasks/one/tests").endswith("tasks/one/tests")) for bad in ("../ownbench/../../..", "/etc", "tasks/../../envbench", "tasks/none"): @@ -184,6 +191,20 @@ def test_the_box_runs_in_the_machines_user_namespace_on_a_docker_with_userns_rem b.start() self.assertEqual("--userns=host" in calls[0], remap) + def test_a_tasks_mount_keeps_its_mode_at_its_own_path_and_is_never_this_applications_folder(self): + self.enterContext(mock.patch.object(container, "DOCKER", "docker")) + self.enterContext(mock.patch.object(container, "userns_remap", return_value=False)) + calls = [] + b = container.Box("job", "u0001", "img", workdir="/app", network="net", + volumes={"/up/.nullius/s/volumes/data": "/workspace/data", "/up/.nullius/s/volumes/mri": "/workspace/mri:ro"}) + with mock.patch.object(container, "_docker", lambda a, **kw: calls.append(a)), mock.patch.object(b, "keeper", return_value="7"): + b.start() + self.assertIn("/up/.nullius/s/volumes/data:/workspace/data:rw", calls[0]) + self.assertIn("/up/.nullius/s/volumes/mri:/workspace/mri:ro", calls[0]) + app = os.path.dirname(os.path.dirname(os.path.abspath(container.__file__))) + with mock.patch.object(container, "_docker", lambda a, **kw: None), self.assertRaises(ValueError): + container.Box("job", "u0002", "img", workdir="/app", network="net", app=app, volumes={os.path.dirname(app): "/x"}).start() + def test_exec_passes_variables_by_name_and_the_runtimes_read_only(self): b = container.Box("job", "u0001", "img", workdir="/app", runtimes=self.RT) argv = b.exec_argv(["node", "x"], {"HOME": "/h", "NULLIUS_RELAY_KEY": "placeholder", "PATH": "/p"}, "/usr/bin:/opt/nullius/node/bin") diff --git a/app/ui_tests/test_catalogue_routes.py b/app/ui_tests/test_catalogue_routes.py index 54a3ce4b9..71c548b74 100644 --- a/app/ui_tests/test_catalogue_routes.py +++ b/app/ui_tests/test_catalogue_routes.py @@ -128,7 +128,7 @@ def test_every_listed_benchmark_is_a_card_opening_its_page(self): cat = catalog.load() keys = re.findall(r'e.message),run:c.artifacts.map(a=>a.text).join("\\n")}));') + self.assertEqual((got['source'], got['errors']), ('local', [])) + self.assertIn('-p ', got['run']) + def test_an_agent_that_needs_its_own_vendor_key_is_named_on_review(self): schema = dict(self.schema, agentNeeds={"cursor-cli": ["CURSOR_API_KEY"]}, credentials={"available": ["openrouter"], "agent_keys": []}) code = 'const r=C.create("harbor");C.setBenchmark(r,"terminal-bench");r.customAgents=["x:Y"];r.agents=["custom-0"];' diff --git a/docs/agents/supported/README.md b/docs/agents/supported/README.md index 0d041b6d5..d40152338 100644 --- a/docs/agents/supported/README.md +++ b/docs/agents/supported/README.md @@ -55,21 +55,21 @@ Every agent in the catalogue, the ports each version has proven, and the benchma ### Benchmarks each agent fits - + - - - - - - - - - - - - - + + + + + + + + + + + + +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
claude-code✓✓✓✓✓✓✓✓✓✓✓
codex@2.2.2✓✓✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✓✗✗✓✓✓✓
digitalmate@0.1.13✗✓✗✗✓✗✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✓✗✗✓✓✓✓
goose✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.7✗✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✓✗✗✓✓✓✓
mini-swe-agent✗✗✗✗✗✗✗✓✗✗✗
opencode✓✓✓✓✓✗✗✓✓✓✓
swe-agent✗✗✗✗✗✗✗✓✗✗✗
terminus-2✗✗✗✗✗✗✗✗✗✓✗
claude-code✓✓✓✓✓✓✓✓✓✓✓✓
codex@2.2.2✓✓✓✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✓✓✗✗✓✓✓✓
digitalmate@0.1.13✗✓✗✗✗✓✗✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✓✓✗✗✓✓✓✓
goose✓✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.7✗✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✓✓✗✗✓✓✓✓
mini-swe-agent✗✗✗✗✗✗✗✗✓✗✗✗
opencode✓✓✓✓✓✓✗✗✓✓✓✓
swe-agent✗✗✗✗✗✗✗✗✓✗✗✗
terminus-2✗✗✗✗✗✗✗✗✗✗✓✗
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/claude-code.md b/docs/agents/supported/claude-code.md index a2da38a89..84eb6cae2 100644 --- a/docs/agents/supported/claude-code.md +++ b/docs/agents/supported/claude-code.md @@ -32,7 +32,7 @@ Anthropic's coding agent. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
claude-code✓✓✓✓✓✓✓✓✓✓✓
claude-code✓✓✓✓✓✓✓✓✓✓✓✓
diff --git a/docs/agents/supported/codex.md b/docs/agents/supported/codex.md index 9c576ca46..8100e623c 100644 --- a/docs/agents/supported/codex.md +++ b/docs/agents/supported/codex.md @@ -35,10 +35,10 @@ OpenAI's coding agent. ## Benchmarks it fits - + - - + +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
codex@2.2.2✓✓✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✓✗✗✓✓✓✓
codex@2.2.2✓✓✓✓✓✓✓✓✓✓✓✓
codex@0.16.0✓✓✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/digitalmate.md b/docs/agents/supported/digitalmate.md index 3f06e896f..ac6c66c48 100644 --- a/docs/agents/supported/digitalmate.md +++ b/docs/agents/supported/digitalmate.md @@ -32,10 +32,10 @@ None declared. ## Benchmarks it fits - + - - + +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
digitalmate@0.1.13✗✓✗✗✓✗✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✓✗✗✓✓✓✓
digitalmate@0.1.13✗✓✗✗✗✓✗✗✗✗✗✗
digitalmate@0.1.13-fixes✓✓✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/goose.md b/docs/agents/supported/goose.md index 09b012aeb..389497c54 100644 --- a/docs/agents/supported/goose.md +++ b/docs/agents/supported/goose.md @@ -30,9 +30,9 @@ The AAIF's open-source agent, formerly Block's. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
goose✓✓✓✓✓✗✗✓✓✓✓
goose✓✓✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/jiuwenswarm.md b/docs/agents/supported/jiuwenswarm.md index aa8636c01..2bbdae315 100644 --- a/docs/agents/supported/jiuwenswarm.md +++ b/docs/agents/supported/jiuwenswarm.md @@ -36,11 +36,11 @@ openJiuwen's WorkSwarm agent. ## Benchmarks it fits - + - - - + + +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
jiuwenswarm@0.2.7✗✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.7✗✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.8✓✓✓✓✓✓✗✗✓✓✓✓
jiuwenswarm@0.2.9✗✓✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/mini-swe-agent.md b/docs/agents/supported/mini-swe-agent.md index 5996e4430..37c55cb09 100644 --- a/docs/agents/supported/mini-swe-agent.md +++ b/docs/agents/supported/mini-swe-agent.md @@ -30,9 +30,9 @@ Princeton's 100-line agent, bash only. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
mini-swe-agent✗✗✗✗✗✗✗✓✗✗✗
mini-swe-agent✗✗✗✗✗✗✗✗✓✗✗✗
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/opencode.md b/docs/agents/supported/opencode.md index df46c1419..c7d6f2af1 100644 --- a/docs/agents/supported/opencode.md +++ b/docs/agents/supported/opencode.md @@ -31,9 +31,9 @@ The open-source terminal coding agent. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
opencode✓✓✓✓✓✗✗✓✓✓✓
opencode✓✓✓✓✓✓✗✗✓✓✓✓
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/swe-agent.md b/docs/agents/supported/swe-agent.md index cb54064cd..b030d68f0 100644 --- a/docs/agents/supported/swe-agent.md +++ b/docs/agents/supported/swe-agent.md @@ -28,9 +28,9 @@ None declared. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
swe-agent✗✗✗✗✗✗✗✓✗✗✗
swe-agent✗✗✗✗✗✗✗✗✓✗✗✗
- ✗: the missing port, on hover. diff --git a/docs/agents/supported/terminus-2.md b/docs/agents/supported/terminus-2.md index be249086f..41213d4e9 100644 --- a/docs/agents/supported/terminus-2.md +++ b/docs/agents/supported/terminus-2.md @@ -30,9 +30,9 @@ Harbor's terminal agent, used by Terminal-Bench. ## Benchmarks it fits - + - +
GAIAGSM8KHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
GAIAGSM8KHealthAgentBenchHumanEvalMedAgentBenchOpen TelcoOSWorld1OSWorld2SWE-bench Verifiedτ³-benchTerminal-Bench 2.0VitaBench
One task, Workspace files, SearchOne taskWorkspace filesWorkspace filesConversationOne taskComputer useComputer useWorkspace filesMCP tools, ConversationWorkspace filesMCP tools, Conversation
terminus-2✗✗✗✗✗✗✗✗✗✓✗
terminus-2✗✗✗✗✗✗✗✗✗✗✓✗
- ✗: the missing port, on hover. diff --git a/docs/benchmarks/supported/README.md b/docs/benchmarks/supported/README.md index 846ffc486..4a891a349 100644 --- a/docs/benchmarks/supported/README.md +++ b/docs/benchmarks/supported/README.md @@ -14,6 +14,7 @@ Every benchmark in the catalogue: where it runs, what it needs, the ways it runs
GAIA
gaiaReal-world questions needing reasoning, web research and file understanding.General assistance✓–165Official GSM8K
gsm8kGrade-school math word problems that take two to eight steps of basic arithmetic, each with a single numeric answer.Math✓–1319Official +HealthAgentBench
healthagentbenchClinical imaging, pathology and health records: read the data, submit the finding.Healthcare✓✓75Official HumanEval
humanevalPython functions written from their signature and docstring, each checked by its unit tests.Coding✓–164Official LoCoMo
locomoVery long-term conversational memory over conversations of 19 to 32 sessions.Memory✓–10Official LongMemEval
longmemevalLong-term chat memory: questions over timestamped chat histories.Memory✓–1500Official @@ -34,6 +35,7 @@ Every benchmark in the catalogue: where it runs, what it needs, the ways it runs GAIAagent.task/v1, agent.workspace/v1, agent.search/v1Nulliusan adapter's author✓✓✓ GSM8Kagent.task/v1Nulliusthe authors✓✓✓ +HealthAgentBenchagent.workspace/v1Nulliusan adapter's author✓✓✓ HumanEvalagent.workspace/v1Nulliusthe authors✓✓✓ LoCoMocap.memory/v1NulliusNullius✓✓✓ LongMemEvalcap.memory/v1NulliusNullius✓✓✓ diff --git a/docs/benchmarks/supported/healthagentbench.md b/docs/benchmarks/supported/healthagentbench.md new file mode 100644 index 000000000..02e38ac71 --- /dev/null +++ b/docs/benchmarks/supported/healthagentbench.md @@ -0,0 +1,83 @@ + + +# HealthAgentBench + +Clinical imaging, pathology and health records: read the data, submit the finding. + + + + + + + + + + +
Keyhealthagentbench
CategoryHealthcare
OriginOfficial
Runs onNullius, Harbor
Tasks75
PaperHealthAgentBench: A Unified Benchmark Suite of Realistic Agentic Healthcare Environments for Challenging Frontier AI Agents, arXiv · 2026
Needs, ports provenagent.workspace/v1
+ +## Datasets + +| Dataset | Key | Tasks | From | Verifier | +|---|---|---|---|---| +| HealthAgentBench V2 | `healthagentbench` | 75 | GitHub [microsoft/HealthAgentBench](https://github.com/microsoft/HealthAgentBench/tree/6f070d7b7c3380cbdf8a2981febfc1ea2560797a) | Each task's own verifier, in a container of its own given the submission alone. | +| HealthAgentBench V1 | `healthagentbench-v1` | 54 | GitHub [microsoft/HealthAgentBench](https://github.com/microsoft/HealthAgentBench/tree/6f070d7b7c3380cbdf8a2981febfc1ea2560797a) | Each task's own verifier, run in the task's container after the agent. | + +## On the standard + +| Control | Written by | +|---|---| +| `nop` | Nullius | +| `oracle` | an adapter's author | + +### Versions + +| Version | Setups as published, whose model | Options | +|---|---|---| +| `healthagentbench@v2` (default) | none | none | +| `healthagentbench@v1` | none | none | + +- `key@version`: a revision of the definition and driver; a recipe pins one, the builder offers the default. + +## As published + +| Harbor agent, among the builder's | Model | What it is | +|---|---|---| +| `claude-code` | any | Claude Code, the agent the authors' own command runs. Their leaderboard also ranks Codex. | + +## Good to know + +- 39 tasks use public data. X-ray needs PhysioNet access (PN_USER, PN_PASS), CT a Hugging Face token with CT-RATE accepted, MRI and event modelling a Redivis token with MRNet and EHRSHOT granted. +- Plan 250 GB of disk for all 75 tasks. The first run downloads the data. +- Each task's agent time limit comes from the task: 1 to 2 hours. +- The provider must serve the X-ray judge, gpt-5.4, or the run another judge model, even when no X-ray task is run. +- Every agent runs with its web tools off, as the authors require. The leaderboard runs xhigh reasoning effort: set the same to compare. +- Data use agreements forbid sending MIMIC, EHRSHOT and similar records to providers they do not allow. Check yours first. + +## Upstream limitations + +- Some images install unpinned packages, so a rebuild can differ. +- Survival scores break ties by row order. +- Harbor sets no disk limit on Docker, so the tasks' disk sizes are not enforced. +- The network does not block a web search the model's provider runs: each agent needs its own switch to turn web search off, for a fair comparison. + +## Nullius limitations + +- Tasks need Docker, or Podman with Docker's Compose plugin and its socket on (systemctl --user enable --now podman.socket). Boat cannot run them. +- The X-ray verifier shares this machine's network, to reach its judge through the relay. +- X-ray, CT, MRI and event modelling have not been run through Nullius. + +## Cite + +??? citation "BibTeX" + + ```bibtex + @misc{liu2026healthagentbench, + title = {HealthAgentBench: A Unified Benchmark Suite of Realistic Agentic Healthcare Environments for Challenging Frontier AI Agents}, + author = {Liu, Qianchu and Zhang, Sheng and Qin, Guanghui and Valanarasu, Jeya Maria Jose and Huang, Xiaoke and Argaw, Peniel and Rokuss, Maximilian and Lu, Mingyu and Ossowski, Timothy and Chaves, Juan Manuel Zambrano and Wong, Cliff and Patel, Naisargi and Hasija, Yashna and Wei, Mu and Yim, Wen-wai and Liu, Qin and Jing, Zilin and Entenmann, Jason and Usuyama, Naoto and Naumann, Tristan and Poon, Hoifung}, + year = {2026}, + eprint = {2606.31179}, + archivePrefix = {arXiv}, + primaryClass = {cs.AI}, + url = {https://arxiv.org/abs/2606.31179} + } + ``` diff --git a/docs/standard.md b/docs/standard.md index 060a8dbd8..2afd53b3b 100644 --- a/docs/standard.md +++ b/docs/standard.md @@ -320,6 +320,7 @@ A benchmark whose tasks are containers (their own Dockerfile and `FROM`) says so | `image.memory_mb`, `image.cpus` | The task's limits; a machine's [constraint](settings/run-hosts.md#constraints) wins when lower | | `workdir` | The session's `cwd` when not the image's working directory | | `prepare` | A step (`copy`, `write`, `run`, `seconds`, `network`) run as root in the unit's container before the agent or a control starts: what the task's own harness adds to every image | +| `mount` | `{path in the upstream: absolute path inside}`, `:ro` after the path inside for read-only: bind-mounted for the whole unit, nothing copied, as a compose file's volume gives a task its staged data. What the unit writes there is written on this machine | | `internet` | Boolean task policy, only in an own image: `true` gives the agent and reference solution a public-address proxy during their work. No run option can enable it | | `env` | Task variables for the agent: uppercase names and string values, no model settings or credentials. The run's variables take precedence; `PATH` contains absolute folders prepended to the image's path | | `verify.copy` | Folders of the upstream copied in only after the agent ends | @@ -429,7 +430,7 @@ local proof records; saved runs and credentials remain. | --- | --- | --- | | `units` | `dataset`, `setup` | Every unit id | | `describe` | `dataset`, with `driver.describe` | `{units: {ID: {title, text, categories: {FIELD: VALUE}}}}`, from the dataset's files alone, for [listings](cli/task-sets.md) | -| `setup` | `unit`, `dir`; `attempt` with `limits.attempts`; `participant` (`agent`, `capability` or `control`) with `driver.participant` | `{prompt}`, any `mcp` servers, `environment`, an own image's `image`, `prepare`, `internet` and `verify`, and `agent_seconds`, the unit's own agent timeout (up to 6 hours, instead of `limits.turn_seconds`); `progress`, a file in the trial the driver rewrites: `{steps, steps_limit, ended}` | +| `setup` | `unit`, `dir`; `attempt` with `limits.attempts`; `participant` (`agent`, `capability` or `control`) with `driver.participant` | `{prompt}`, any `mcp` servers, `environment`, an own image's `image`, `prepare`, `mount`, `internet` and `verify`, and `agent_seconds`, the unit's own agent timeout (up to 6 hours, instead of `limits.turn_seconds`); `progress`, a file in the trial the driver rewrites: `{steps, steps_limit, ended}` | | `turn` | The transcript so far; `simulator: {model, base_url, key}` when there is one; `judge` for an upstream that grades as the conversation ends; `attempt` with `limits.attempts` | The next message, `{done: true}`, or `restart` | | `produce` | A capability benchmark's recall, `base_url` and `key` | The reading, through the relay | | `answer` | `unit, dir, setup, model, base_url, key` | `{answer}`: the upstream's own answerer, for a [setup](#setups-as-published-your-model-your-agent-or-capability) |