News › #science

An agent that chooses the next measurement in a self-driving lab, inside limits a chemist approves

updated 24 Nov 20265 min readVerified
science

Aspuru-Guzik's group let Claude Opus 5 pick LC-MS measurements and interpret the data in an oxidant screen for an azo dye, while every injection had to pass human-approved limits, an allow-list, budget and emergency-stop checks. The ranking matched scripted analysis; in replays the best of 28 wells was measured at about the 7th injection (random: 14.5). We explain the layers, the numbers and the gaps.

In short

Eight authors from the group of Alán Aspuru-Guzik posted a paper on 18 November 2026 that lets a language-model agent decide which measurement a self-driving lab runs next, while every action that changes the lab must pass checks that a human approved in advance. In a real campaign on an LC-MS instrument the agent (Claude Opus 5) screened six oxidants for a dye-forming reaction, flagged failed wells and produced the same ranking as scripted peak integration. In replays of archived data it first measured the best of 28 conditions at about the 7th injection; random order needs 14.5 on average. The main contribution is the control design, not a new optimiser.

How it works

Self-driving labs run a cycle of Design → Make → Test → Analyze. Robots and instruments automate Make and Test well. The step from Analyze back to Design – looking at messy data and deciding what to do next – usually still needs a person. The paper puts an agent exactly at this point.

The system has three layers:

  1. A project room supervised by a human. Before a campaign, the agent drafts operational limits: objective, metric, instrument method, injection volume, injection budget and allowed wells. A chemist reviews and approves these limits and, separately, switches agent execution on. Every room has an emergency stop that overrides both.
  2. The agent. It interprets data, plans and calls tools: LC-MS tools built on the group's open-source Python framework MoSeS (extract chromatograms, peaks and peak-area ratios; compute expected ion masses and isotope patterns), literature search (OpenAlex and web search) and Python with RDKit and PubChemPy.
  3. Laboratory services that validate and execute. The agent can only propose a state-changing action, such as an injection. Separate services decide whether it runs.

Analogy: the agent is a skilled postdoc with a signed work order. It can choose the order of the work, but the instrument room only accepts jobs that match the order.

Under the hood

Layered checks. A submitted injection passes, in sequence:

Layer What it checks
Agent process tool arguments, emergency-stop state, execution switches, approved campaign limits, instrument-method contract
Lab backend the service token stays within the room owner's project; the sample exists; a measurement record is created before queuing
Device service instrument claim, approved-method allow-list, queue capacity, instrument state
Submission check immediate status polling for launch failures; interlocks and running operations stay under lab control

Failures come back to the agent as structured errors. In the real campaign, 12 requests were refused or deferred: 9 by the agent process and 3 by the device service.

Audit trail and restarts. Every tool call, its arguments and its result are stored in order (MongoDB), and raw files, measurements, analyses and versioned plans go to a PostgreSQL experiment database. A simple deterministic watcher polls for finished runs and starts a new agent turn only when new data exists. Each turn re-reads the saved state, so the loop survives restarts.

The chemistry. The target is 4,4'-dimethylazobenzene, formed by oxidative coupling of p-toluidine (product ion [M+H]+ at m/z 211). One plate held 28 wells: six oxidant systems (H2O2, TEMPOL + NaOCl, Oxone, persulfate, KMnO4, TEMPO + NaOCl) at 0.5, 1, 2 and 4 equivalents, plus four controls. Reactions ran 16 hours in 0.2 mL.

Real campaign. The agent submitted 20 campaign injections (the researcher raised the limit from 20 to 30 about 20 minutes after approval; the agent did not exceed it) and made 465 tool calls. Two failed liquid transfers (B2, C4) gave no usable data. Best condition: KMnO4 at 4 equivalents. The next three oxidants reached only 6.8–8.2% of that signal, inside the roughly 13% relative uncertainty, so the paper does not rank them against each other. Chemists confirmed the agent's spectral interpretations.

Simulation on archived data. 23 replayed campaigns at budgets from 1 to 28 injections:

  • budget 1 or 2: the best well was never found; budget 4: found in 2 of 3 campaigns; budget 8 or more: always found;
  • for budgets 8–24, the best condition was first measured at about the 7th injection; random order needs 14.5 on average and 27 injections for a 95% chance;
  • the full six-oxidant ranking was recovered in every campaign with 12 or more injections;
  • the agent never reported a condition as best without having measured it;
  • reasoning overhead was 10–24 minutes per campaign, against an assumed 15 minutes per injection, so the paper estimates about 2 hours saved versus random order.

Limits stated by the authors. One reaction, one instrument workflow, one plate, one language model. Humans designed the plate, approved the limits and prepared the reactions. No comparison with greedy rules or Bayesian optimisation – only with random order. The budget increase was written directly into the campaign record because the interface had no amendment path, which bypassed the approval workflow it was meant to enforce. The agent's reasoning time could limit throughput on faster instruments.

Our view. The 7-versus-14.5 comparison is against a weak baseline. A chemist who first measures the highest equivalent of each oxidant would also be fast on this plate (see the toy below). The stronger result is the engineering: a clear separation between "the model may suggest" and "the lab may execute", with refusals that actually happened in practice. It complements the runtime gates in Safe-SDL and the agent-built lab in Self-Building Labs, the latter from the same group.

Try it yourself

The paper's code release was not stated in the parts we could read; MoSeS is described as open source. Two experiments in the Python live panel:

1. Random versus structured order. The first snippet checks the paper's random-order numbers and then compares random order with a simple rule on toy plates (measure 4 equivalents of each oxidant, then the rest of the best family). Expected output (seed 0): expected position 14.5, probabilities 0.14 / 0.29 / 0.43 for 4 / 8 / 12 injections, 27 injections for 95%, then about 14.7 for random order and 3.9 for the rule on the toy plates. The toy plates are built so that yield rises with equivalents; that assumption makes the rule look good and is exactly the kind of prior knowledge an agent or a chemist brings.

2. An authorization gate. The second snippet implements a minimal version of the check sequence: emergency stop, execution switch, approval, method allow-list, allowed wells and budget, each refusal logged with its arguments. Expected output: the first injection is accepted, the next three are refused (well outside the plate, method not approved, emergency stop), and only 1 injection is counted. Try adding an "amend budget" function that bypasses approved – the same gap the authors found.

Python in your browser

Sources

  1. Closing the Analyze-to-Design Gap: An Authorization-Bounded Agent for Self-Driving Laboratories (arXiv:2611.25043)