TRANSMISSION // 2605.04375v3

Turning Lab Experiments into Code

Source published

A proposed software stack translates experiment descriptions into instrument commands, with checks for safety and lab state. A battery-lab case study offers an early demonstration.

AI-generated conceptual illustration for Turning Lab Experiments into Code
AI-generated conceptual illustration; not documentary evidence.

AI can propose experiments on a screen, but testing them means working with real equipment, where instruments differ and conditions can change. Experiment-as-Code aims to bridge that gap by describing what an experiment should do separately from the device-specific steps needed to carry it out.

AI systems can suggest hypotheses, analyze data and run simulations. But a scientific claim about the physical world ultimately needs to be tested with real materials and instruments. Turning an AI-generated idea into a safe, repeatable laboratory procedure is not simply a matter of sending a command: devices use different interfaces, depend on their current state and may behave unpredictably when conditions drift.

A paper by Zhenning Yang and colleagues proposes a software framework called Experiment-as-Code (EaC) to help connect AI agents with automated laboratories. The central idea is to describe an experiment declaratively: specify what should be done, the resources and parameters it requires, and how its steps depend on one another. A software stack then checks and translates that description into the commands understood by particular instruments.

The work is a systems proposal, not a demonstration that AI agents can independently make scientific discoveries. Its focus is the infrastructure between an experimental plan and physical execution.

From experimental intent to instrument control

The authors organize EaC into three layers. A specification layer represents the experiment in a standardized form, aiming to make procedures easier to understand, version and reuse. An execution layer checks proposed operations against device capabilities, safety constraints and the laboratory’s current state. An orchestration layer coordinates workflows that share equipment, accounting for dependencies and resource availability.

That separation matters because similar scientific tasks can require different low-level commands on different instruments. A pump, valve or measurement device may have its own API, terminology and status signals. In the EaC approach, device-specific wrappers translate a common description into those individual interfaces. The system also maintains a model of laboratory state—such as whether equipment is available or calibration assumptions remain valid—and uses it for checks before and during a run.

The paper draws an analogy with “Infrastructure-as-Code,” a way of managing computing resources through written configurations rather than manual setup. But laboratory equipment is not just a collection of interchangeable servers: instruments can require exclusive access, warm-up or stabilization, and some actions consume materials or cannot be undone. The proposed framework is meant to account for those physical constraints rather than assume that software alone can abstract them away.

A battery-lab demonstration

The authors put the design into a case study at the University of Michigan’s Clio autonomous battery laboratory. They adapted its existing, device-specific control system to use EaC descriptions and ran an ionic-conductivity experiment on aqueous lithium sulfate solutions. The workflow coordinated pumps, valves and a potentiostat, a device used for electrochemical measurements.

The reported experiment measured conductivity at six concentrations under controlled temperature conditions. The paper says the highest conductivity in this test occurred at 2.15 mol/kg, and that the measurements were consistent with prior experimental studies. It also describes specifying only the steps needed for conductivity measurement, rather than running the original workflow’s additional density and viscosity measurements. The authors report that this avoided unnecessary procedures and reduced time and material use, though the supplied account gives no quantified savings.

This case supports a limited conclusion: the team could use its framework to specify and run this particular instrument-coordinated workflow. It does not show that the system improves scientific discovery generally, nor does it establish performance across different laboratories, scientific fields or equipment vendors.

What remains uncertain

EaC’s broader promise—portable experiment descriptions, safer operation and more efficient scheduling—depends on substantial engineering. Instruments must be represented accurately; device wrappers and safety rules must be correct; and the system must detect problems that may not appear as explicit error messages. A check in software cannot guarantee safety if relevant hazards or live conditions are missing from the laboratory model. Nor does a standardized description by itself ensure that experiments conducted on different equipment will produce comparable results.

The battery-lab example is a case study, not a broad comparative evaluation. The paper presents a design and an initial implementation, while many of its proposed benefits, including portability across labs and scalable orchestration, remain goals for future development. The authors also identify a continuing need for scientists and laboratory operators to define experimental steps, constraints and validation criteria clearly.

The source is an arXiv preprint, and the available material does not establish that it has undergone peer review. Its claims should therefore be read as the authors’ proposal and preliminary demonstration, not as settled evidence that a general-purpose autonomous laboratory stack is ready for widespread use. For now, EaC is best understood as an attempt to make the software bridge between scientific plans and physical instruments more explicit—and, potentially, easier to check and reuse.

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.