Safe Lab Agents: Sandboxed AI Agents for Lab Work

Safely run an AI agent inside a sandbox to control a scientific experiment. Define the interface to the experiment easily in a few lines. Automatically obtain electronic lab notebook documentation of the entire runs. Supports Claude Code and OpenClaw as agent frameworks.

By Maximilian Nägele and Florian Marquardt. Made at the Max Planck Institute for the Science of Light in Germany. Open source and forever free. First release July 2026.

How it works

  1. 1

    Install the package

    Simply use pip install. Also needed: Docker or Podman (for the sandboxing) and an account/API key for Claude Code or Open Claw.

    pip install safe-lab-agents
  2. 2

    Write an interface using simple python functions

  3. 3

    Launch the agent

    agent start --task "Characterize this setup!"

    The setup wizard guides you through a few questions, installs everything needed inside the agent's sandbox, and launches the AI agent, here in autonomous mode.

  4. 4

    Browse the results

    Conveniently browse both the full AI agent exploration history, as well as all experimental data, analysis scripts, and resulting figures. Easy export as an electronic lab notebook (.eln) document.

Learn more

github.com/MaxNaeg/safe_lab_agents