Skip to main content

an open-source Python package enabling Self-Driving Labs (SDLs) interoperability

Project description

Documentation Status PyPI version License YouTube Published Discord

ivoryOS: interoperable Web UI for self-driving laboratories (SDLs)

"plug and play" web UI extension for flexible SDLs.

Table of Contents

Description

Granting SDLs flexibility and modularity makes it almost impossible to design a UI, yet it's a necessity for allowing more people to interact with it (democratisation). This web UI aims to ease up the control of any Python-based SDLs by displaying functions and parameters for initialized modules dynamically. The modules can be hardware API, high-level functions, or experiment workflow. With the least modification of the current workflow, user can design, manage and execute their experimental designs and monitor the execution process.

System requirements

This software is developed and tested using Windows. This software and its dependencies are compatible across major platforms: Linux, macOS, and Windows. Some dependencies (Flask-SQLAlchemy) may require additional setup.

Python Version

Python >=3.10 for best compatibility. Python >=3.7 without Ax.

Python dependencies

This software is compatible with the latest versions of all dependencies.

  • bcrypt~=4.0
  • Flask-Login~=0.6
  • Flask-Session~=0.8
  • Flask-SocketIO~=5.3
  • Flask-SQLAlchemy~=3.1
  • SQLAlchemy-Utils~=0.41
  • Flask-WTF~=1.2
  • python-dotenv==1.0.1
  • ax-platform (optional ~=0.4 for Python>=3.9)

Installation

pip install ivoryos

or

git clone https://gitlab.com/heingroup/ivoryos.git
cd ivoryos
pip install .

The installation may take 10 to 30 seconds to install. The installation time may vary and take up to several minutes, depending on the network speed, computer performance, and virtual environment settings.

Instructions for use

Quick start

In your SDL script, use ivoryos(__name__).

import ivoryos

ivoryos.run(__name__)

Login

Create an account and login (local database)

Features

  • Direct control: direct function calling Device tab
  • Workflow design and iteration:
    • Design: add function to canvas in Design tab. click Compile and Run button to go to the execution page
    • Execution: configure iteration methods and parameters in Compile/Run tab.
    • Database: manage workflows in Library tab.
  • Info page: additional info in About tab.

Additional settings (not actively maintained)

AI assistant

To streamline the experimental design on SDLs, we also integrate Large Language Models (LLMs) to interpret the inspected functions and generate code according to task descriptions.

Enable LLMs with OpenAI API

  1. Create a .env file for OPENAI_API_KEY
OPENAI_API_KEY="Your API Key"
  1. In your SDL script, define model, you can use any GPT models.
ivoryos.run(__name__, model="gpt-3.5-turbo")

Enable local LLMs with Ollama

  1. Download Ollama.
  2. pull models from Ollama
  3. In your SDL script, define LLM server and model, you can use any models available on Ollama.
ivoryos.run(__name__, llm_server="localhost", model="llama3.1")

Add additional logger(s)

ivoryos.run(__name__, logger="logger name")

or

ivoryos.run(__name__, logger=["logger 1", "logger 2"])

Offline (design without hardware connection)

After one successful connection, a blueprint will be automatically saved and made accessible without hardware connection. In a new Python script in the same directory, use ivoryos.run() to start offline mode.

ivoryos.run()

Demo

In the abstract_sdl.py, where instances of AbstractSDL is created as sdl, addresses will be available on terminal.

ivoryos.run(__name__)

Deck function and web form

Directory structure

When you run the application for the first time, it will automatically create the following folders and files in the same directory:

  • ivoryos_data/: Main directory for application-related data.

    • ivoryos_data/config_csv/: Contains iteration configuration files in CSV format.
    • ivoryos_data/llm_output/: Stores raw prompt generated for the large language model.
    • ivoryos_data/pseudo_deck/: Contains pseudo-deck .pkl files for offline access.
    • ivoryos_data/results/: Used for storing results or outputs during workflow execution.
    • ivoryos_data/scripts/: Holds Python scripts compiled from the visual programming script design.
  • default.log: Log file that captures application logs.

  • ivoryos.db: Database file that stores application data locally.

Roadmap

  • Allow plugin pages ✅
  • pause, resume, abort current and pending workflows ✅
  • dropdown input ✅
  • show line number option ✅
  • snapshot version control

Citing

If you find this project useful, please consider citing the following manuscript:

Zhang, W., Hao, L., Lai, V. et al. IvoryOS: an interoperable web interface for orchestrating Python-based self-driving laboratories. Nat Commun 16, 5182 (2025).

@article{zhang_et_al_2025,
  author       = {Wenyu Zhang and Lucy Hao and Veronica Lai and Ryan Corkery and Jacob Jessiman and Jiayu Zhang and Junliang Liu and Yusuke Sato and Maria Politi and Matthew E. Reish and Rebekah Greenwood and Noah Depner and Jiyoon Min and Rama El-khawaldeh and Paloma Prieto and Ekaterina Trushina and Jason E. Hein},
  title        = {{IvoryOS}: an interoperable web interface for orchestrating {Python-based} self-driving laboratories},
  journal      = {Nature Communications},
  year         = {2025},
  volume       = {16},
  number       = {1},
  pages        = {5182},
  doi          = {10.1038/s41467-025-60514-w},
  url          = {https://doi.org/10.1038/s41467-025-60514-w}
}

For an additional perspective related to the development of the tool, please see:

Zhang, W., Hein, J. Behind IvoryOS: Empowering Scientists to Harness Self-Driving Labs for Accelerated Discovery. Springer Nature Research Communities (2025).

@misc{zhang_hein_2025,
  author       = {Wenyu Zhang and Jason Hein},
  title        = {Behind {IvoryOS}: Empowering Scientists to Harness Self-Driving Labs for Accelerated Discovery},
  howpublished = {Springer Nature Research Communities},
  year         = {2025},
  month        = {Jun},
  day          = {18},
  url          = {https://communities.springernature.com/posts/behind-ivoryos-empowering-scientists-to-harness-self-driving-labs-for-accelerated-discovery}
}

Authors and Acknowledgement

Ivory Zhang, Lucy Hao

Authors acknowledge all former and current Hein Lab members for their valuable suggestions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ivoryos-1.1.0.tar.gz (336.4 kB view details)

Uploaded Source

Built Distribution

ivoryos-1.1.0-py3-none-any.whl (360.1 kB view details)

Uploaded Python 3

File details

Details for the file ivoryos-1.1.0.tar.gz.

File metadata

  • Download URL: ivoryos-1.1.0.tar.gz
  • Upload date:
  • Size: 336.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for ivoryos-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6984a5f50faebe38d10eed6eb037b1f031941331183bdfb2f2ab63e682c27cbb
MD5 4a48a1bb282c9484e3c6e57df3d1a56c
BLAKE2b-256 452176aac8ad939c236cdb3a2673e65906124bbf88743e79351b9d617be79ff3

See more details on using hashes here.

File details

Details for the file ivoryos-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ivoryos-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 360.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for ivoryos-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2a0a16068e34aae759bbc65d6e7b8a457d4801c52434d868cc42fd7d3b388fa
MD5 b04ac080b81afcc79c81c365190dd207
BLAKE2b-256 9006836aeddcdc10241aeb1c614a11403249fc885f0f90001cf0fb99a0092ffd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page