News › #agents

The Agentic Scientist: Sakana AI orchestrates Claude Code, Codex and other coding agents through a staged research loop

updated 23 Nov 20269 min readVerified
Screenshot of the README of the SakanaAI/AI-Scientist-v3 repository on GitHub (repository licensed Apache-2.0)

Sakana AI's successor to the AI Scientist runs coding agents in parallel through task drafting, ideation, experiments, ablations and paper writing, with rubric checks at each stage. We explain the pipeline, the 70-campaign model comparison and the case studies, and (updated 9 Nov) what the released code really does: task contract, deterministic rubrics, single-run selection, evidence checks and sandbox defaults.

In short

Sakana AI released The Agentic Scientist (arXiv:2610.18933, 13 October 2026), the successor of its "AI Scientist". Instead of one model that does research end to end, it orchestrates existing coding agents (Claude Code, Codex, OpenCode, Pi) through explicit research stages, runs them in parallel, and checks each stage against written rubrics. A human can steer at any stage or let it run alone. One paper produced with a development version was accepted as an oral at ALIFE 2026, and the code is published as SakanaAI/AI-Scientist-v3. The authors' main claim is that reliable autonomy depends on the orchestration layer, not only on the base model.

How it works

The system needs a task with a scripted evaluator: a program that returns a metric for any candidate solution. The paper describes four stages (the released code splits them into six phases, see "Inside the code" below):

  1. Task setup. Humans provide the task and evaluator, or a drafting agent writes them from a research brief; agent-written tasks must pass execution checks and an independent review.
  2. Parallel investigation. A controller splits a fixed budget of research cycles across workers. In each worker, an ideation agent proposes a hypothesis, a plan and rubrics (what the experiment must show), and an execution agent edits code, runs the evaluator and logs metrics. Workers share memory and conclusions at cycle boundaries. Long runs reset the context through a hand-off note that keeps each worker's best program.
  3. Evidence. The best correct program is selected and its components are removed one by one (ablation). An analysis agent interprets the logs.
  4. Writing. A writer agent produces a LaTeX paper and an "evidence map" that links each claim to its source; automated checks and an audit agent look for unsupported numbers and overclaiming, then a reviewer agent comments.

Analogy: a lab head who does not do the experiments but assigns them, defines in advance what counts as a result, and refuses any claim without a logged number behind it.

Under the hood

Scale of the study. 9 frontier models (four GPT, four Claude, one DeepSeek) in 4 harnesses, 14 model–harness combinations, 70 research campaigns over 5 tasks with 20 idea iterations each. The base model mattered more than the harness; within Claude, newer models received higher reviewer scores. Task performance and AI-reviewer score ranks correlated with r = 0.44, so the reviewer score is only a weak proxy for the actual result.

Case studies.

Case What the system found Caveat
Doc-to-LoRA (long-context retrieval) Merging adapters before the query is known causes interference; query-conditioned adapter selection plus better chunking raised exact match from 52% to 98% with no new trainable parameters Synthetic multi-needle data only
Learned evolution strategies A CMA-ES variant with learned adjustments Its own ablation showed plain CMA-ES kept much of the advantage; the learned part mainly sped up early progress
Error diffusion (with humans) Extended a biologically motivated alternative to backpropagation from binary to multi-class and to RL with PPO The only output reviewed by external peers (ALIFE 2026 oral)

Known failure modes, stated by the authors. Reward hacking when constraints are only implicit; drift toward hyperparameter tuning on mature benchmarks; literature search only at writing time, not during ideation; no reliable way to rebuild strong published baselines; and all tasks were computational ML, so physical experiments are untested. Cost and compute per campaign are not reported on the project page.

Why the evidence stage matters. When many agents each try ideas and report the best evaluator score, the best score is biased upward even if no idea is better than the baseline: noise alone produces a winner. This "winner's curse" is the statistical reason for the ablation step, for independent re-runs, and for treating a single best number with suspicion.

Inside the code (update 9 November 2026)

Readers asked for more depth, so we read the released repository (commit df83138, 18 October 2026, about 193k lines of Python). We did not run it. File paths are relative to the repository root.

Six phases, not four. The README and configs/preset/paper.yaml run task_drafting → investigation → ablations → final_evaluation → posthoc → paper, plus optional review and revision. The paper's "evidence" stage is split into ablations, a sealed final evaluation and post-hoc analyses.

The task contract. A minimal task (examples/circpack/) is a short task.md, an evaluate.py, a starting program (program_0/ with program_spec.toml) and requirements.txt. The evaluator is called as evaluate.py --program_path <file> --results_dir <dir> and must write metrics.json with a numeric combined_score and correct.json with {"correct": true|false, "message": ...}. There is no field for the metric direction: combined_score is always maximised (src/investigation/files.py). An optional task_contract.json separates the search evaluator from a final one, forbids search data roles named test or final, pins upstream repositories to a fixed revision and artifacts to SHA-256 digests, and sets CPU, memory, GPU and wall-clock limits.

Budget and shared memory. By default workers pull research cycles from one shared queue until max_idea_cycles is used up (20 in the campaign preset); an optional pruning mode works in rounds and re-seeds each worker from its own best program. Workers share an append-only memory.md / memory.jsonl (fields: timestamp, step, scope, summary, evidence, next_action), merged under file locks after each cycle, and each worker keeps a short conclusions.md (at most 300 words, no exact numbers) that the other workers read.

Rubrics are checked deterministically, not by an LLM. In the campaign ("harness") mode, the ideation agent's own metric rubrics are replaced by a single gate, combined_score > incumbent score (src/investigation/idea_generation.py). Each implementation rubric must state source-code patterns, which are matched against Python tokens with comments and docstrings ignored (rubric_checks.py). A rubric is not assessed at all if the program crashes or correct is false. In the non-harness mode the execution agent fills in rubric_status.json itself, so it grades its own work.

Best program and ablations. The best program is the arg-max of combined_score over correct programs, from a single evaluation with no noise handling. Ablations are not mechanical removals: an LLM proposes up to three single-change ablations and three baselines from the diff against the reference, and an agent re-implements each one. Replications are configurable (the generic pipeline default is 5, the campaign preset uses 1); the report gives mean, standard deviation, min and max, and mean differences, but no significance test. This is exactly the setting where the winner's curse below applies.

Evidence map. Claims are stored in claims_grounding.json and linked to files by @evidence[[path#locator]] tags. The deterministic verifier checks that the target file or ledger entry exists; its own message says the locator is "not interpreted". Whether a number in the paper matches the logs is left to the LLM audit agent, which reads the paper and data files in a read-only workspace.

Sandbox and guards. Coding agents run with full tool permissions inside Docker; the pipeline's default Docker network mode is host (src/pipeline/config.py). The sealed final evaluation is stricter: --network none, read-only file system, all capabilities dropped, PID and resource limits, and it refuses to run twice. Final evaluator and contract files are hidden from agent containers by /dev/null bind mounts, and in harness mode the agent may not pre-write metrics.json or correct.json.

Cost. Token use and cost estimates are logged to metrics/cost_events.jsonl and cost_summary.json; the docs call this "operational telemetry", not a spending limit. Spend is bounded only by cycle counts, evaluation caps and timeouts, so set them before a long run.

What changed since (update 23 November 2026)

We compared commit df83138 with f8ae47d (20 November 2026): 57 commits, 95 files, about 6,200 added lines. We read the diffs; we did not run the pipeline. The changes that matter for readers:

  • Evaluator replay check (17 Nov, commit 7109acb). During task drafting the unchanged baseline is now evaluated twice. If combined_score differs beyond float rounding (relative tolerance 1e-9) or correct differs, the draft fails as non-deterministic and goes to repair. The error message tells the drafting agent to seed every random stream from task-owned constants and to avoid secrets, os.urandom, uuid4, time-based or unseeded random numbers. Production evaluations are not replayed. This closes one hole: an evaluator whose score changes on every call turns the "beat the incumbent" gate into a lottery. It does not remove the winner's curse described above, because a fixed seed freezes the noise rather than removing it (see the third snippet).
  • Native runs (15–16 Nov). Investigation and ablations can run directly on the host when container.enabled=false; agsci investigate is native by default, while agsci run keeps Docker on by default. The coding agents still run with full tool permissions (--allow yolo), so a native run gives them your user account. The paper phase is now always containerised, and native harness-evaluated runs refuse more than one parallel worker because the workers would share GPUs and seeds.
  • Paper-writing rules (17–20 Nov). Writer prompts now forbid search-time scores, run counts and run lineage in the results text and captions, tighten the abstract, and add rules for negative-result papers. The aim is that a paper reports the sealed final evaluation and ablations, not the search history.
  • Reviewer model. The default reviewer moved from the retired o4-mini to gpt-5.6-terra (21 Nov).
  • Agent skills (6 Nov). New setup-task and run-campaign skills generate task scaffolds and launch scripts for coding agents.

Try it yourself

The Python live panel simulates the winner's curse with numpy (seed 0, 2000 simulated campaigns, true idea quality ~ N(70, 1), evaluation noise σ = 2). Expected output:

  1 ideas: reported best  70.0  true  70.0  re-run  70.0  optimism +0.0
  5 ideas: reported best  72.6  true  70.5  re-run  70.6  optimism +2.0
 20 ideas: reported best  74.2  true  70.8  re-run  70.8  optimism +3.4
 80 ideas: reported best  75.4  true  71.1  re-run  71.2  optimism +4.3

With 80 ideas the reported best is about 4 points above its true value, while an independent re-run recovers the truth. Change noise to 0.5 and the optimism almost disappears: precise evaluators matter more than many ideas.

The second Python live snippet re-implements the idea of a token-level source_contains rubric with the standard tokenize module. Expected output: a plain substring test accepts both an honest program and one that only mentions the promised code in a docstring and a comment (True True); the token-level test accepts only the honest one (True False). This is why a deterministic rubric must ignore comments.

The third Python live snippet shows what the new replay check catches and what it does not. Expected output: the unseeded evaluator fails the replay check (False), the fixed-seed evaluator passes (True), and the best of 80 programs still has a search score of 75.3 against a true quality of 71.0; the mean over 20 fresh seeds (70.8) is close to the truth. A deterministic evaluator is necessary, but only re-evaluation with new seeds or held-out data removes the optimism.

To see the pipeline without spending tokens, the README offers agsci doctor examples/circpack (checks the setup) and agsci run examples/circpack --dry-run (prints every phase command and runs nothing). Its cheapest complete run on the CPU-only example is agsci run examples/circpack investigation.execution.max_idea_cycles=2 ablations.execution.num_replications=1 ablations.execution.max_evals_per_variant=2 posthoc.execution.max_selected_analyses=1; it needs Docker, the built image and a Claude login. For the full system, see the repository SakanaAI/AI-Scientist-v3 (Apache-2.0). Its README asks for Python 3.11+, uv, Docker and API keys for the agent you use; GPU tasks need GPUs (the example GRPO task needs two). The README warns that agents run with full tool permissions, so use the Docker setup. We did not run it, and the cost of a campaign is not published.

Python in your browser

Sources

  1. The Agentic Scientist (arXiv:2610.18933)
  2. Sakana AI project page
  3. SakanaAI/AI-Scientist-v3 (GitHub, Apache-2.0)
  4. SakanaAI/AI-Scientist-v3 at commit df83138 (code read for the 9 Nov update)
  5. SakanaAI/AI-Scientist-v3 at commit f8ae47d (code read for the 23 Nov update)