Active learning and Bayesian optimization for experimental research.
Define the variables, run a first design, record what the lab measured, and let a Gaussian process choose the next experiment.
Install · Your first loop · Documentation · Changelog
The web app on a simulated methanol reactor: variables and results on the left, the model's predicted yield over temperature and pressure in the centre, the Gaussian process on the right. The screenshot follows your GitHub theme.
ALchemist is a modular Python toolkit that brings active learning and Bayesian optimization to experimental design in chemical and materials research. It is written for scientists and engineers who want to explore or optimize high-dimensional variable spaces with a graphical interface, a Python or REST API, or an autonomous optimization workflow.
NLR Software Record: SWR-25-102
Cite: Coatney, C. ALchemist: Active Learning Toolkit for Chemical and Materials Research. National Laboratory of the Rockies, software record SWR-25-102, DOE CODE, doi:10.11578/dc.20250707.1.
Overview
Key features:
- Real, integer, discrete and categorical variables, with linear input constraints that every design and suggestion respects
- Space-filling (LHS, Sobol), classical (CCD, Box-Behnken, factorial), screening (Plackett-Burman, GSD), D/A/I-optimal and split-plot designs
- AI-assisted choice of effects for optimal designs, through OpenAI, a local Ollama model or Edison Scientific literature search
- Gaussian-process models from BoTorch (Matern, RBF, IBNN kernels) or scikit-learn, with cross-validation diagnostics
- Expected Improvement (and its log form), Probability of Improvement, Upper Confidence Bound, batch qEI and qUCB, and qNIPV for exploration
- Several objectives at once, with Pareto fronts and hypervolume tracking
- A web app (React over FastAPI), a Python session API and a REST API over one session file, with an audit log
- A work queue that records what was suggested next to what was actually run, for reactor-in-the-loop and automated-laboratory work
- The deprecated CustomTkinter desktop app, installed with the
[desktop]extra
Architecture:
ALchemist has four parts:
- Core Session API: Headless Bayesian optimization engine (
alchemist_core) that powers all interfaces - Desktop Application (deprecated): CustomTkinter GUI using the Core Session API, designed for human-in-the-loop and offline optimization
- REST API: FastAPI server providing a thin wrapper around the Core Session API for remote access; includes a work queue for autonomous reactor-in-the-loop workflows
- Web Application: React UI consuming the REST API, supporting both interactive and autonomous optimization workflows; real-time WebSocket event streaming for live session monitoring
The web app, the Python API and the REST API share one session file format (JSON). The deprecated desktop app opens the same files, but refuses to save, train or log a session that holds something it cannot keep, such as an observed variable, input constraints or the provenance columns the work queue adds; see Desktop app (legacy).
Use Cases
- Interactive Optimization: Use the web app (or the deprecated desktop app) for manual experiment design and human-in-the-loop optimization
- Programmatic Workflows: Import the Session API in Python scripts or Jupyter notebooks for batch processing
- Autonomous Optimization: Use the REST API to integrate ALchemist with automated laboratory equipment in a closed loop (ALchemist never starts or stops a cycle; the controller does)
- Remote Monitoring: When a controller drives the session, the web app's monitor view shows the work queue and model health and lets you send pause and resume requests
For a worked example, see Your first loop in the documentation.
Installation
Requirements: Python 3.11 or higher
Recommended (Optional): We recommend using Anaconda to manage Python environments:
conda create -n alchemist-env python=3.13
conda activate alchemist-env
Basic Installation:
pip install alchemist-nrel
The desktop app is deprecated and is no longer installed by default; it needs pip install "alchemist-nrel[desktop]".
From GitHub:
Note: This installs the latest unreleased version. The web application is not pre-built with this method because static build files are not included in the repository.
pip install git+https://github.com/NatLabRockies/ALchemist.git
For advanced installation options, Docker deployment, and development setup, see the Install page in the documentation.
Running ALchemist
Web Application:
alchemist-web
Opens at http://localhost:8000
Desktop Application (deprecated):
pip install "alchemist-nrel[desktop]"
alchemist
For detailed usage instructions, see Install and Your first loop in the documentation.
Development Status
ALchemist is under active development at NLR as part of the DataHub project within the ChemCatBio consortium.
Issues & Troubleshooting
If you encounter any issues or have questions, please open an issue on GitHub or contact ccoatney@nlr.gov.
For the latest known issues and troubleshooting tips, see Troubleshooting in the documentation.
License
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
Repository
Metadata
Release files for alchemist-nrel 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alchemist_nrel-0.4.0.tar.gz | 3.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alchemist_nrel-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.5 MB
Release files / alchemist_nrel-0.4.0.tar.gz
| Download URL | alchemist_nrel-0.4.0.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c759e9782eebb77e41eb0019623fbd52e6677ecbfe421937118a336eee25d113
|
|
BLAKE2b-256 checksum How to use checksums |
cdf7b06e68ef054523c4ecc6d88a569f84fa4da20030db162b36f6fe6da2f724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / alchemist_nrel-0.4.0-py3-none-any.whl
| Download URL | alchemist_nrel-0.4.0-py3-none-any.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6afffb3004e173e3eab0d9a9e5733ecbd116ab2130bcbea47170028f3e0bcecf
|
|
BLAKE2b-256 checksum How to use checksums |
3fedd599080f5f87bae896ef1d6f79f3c8a6c5aa7e081208562e469d4bbc35cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency log