Skip to content

Latest commit

 

History

History
88 lines (72 loc) · 2.39 KB

File metadata and controls

88 lines (72 loc) · 2.39 KB

Ginkgo and OpenAI Cell Free Protein Synthesis (CFPS) automation interface

This repository provides the interface between OpenAI’s GPT-5 LLM and Ginkgo Bioworks’ autonomous laboratory to optimize the cost efficiency of cell-free protein synthesis (CFPS). This allows iterative optimization on experimental design, experiment execution, data capture and analysis.

The interface uses Pydantic schemas to validate AI-designed experiments before they are translated by Ginkgo’s Catalyst software into programmatic multi-instrument biological workflows and executed on Ginkgo’s Reconfigurable Automation Carts (RACs).

Installation

git clone https://github.com/ginkgobioworks/ginkgo-automation-cfps.git
cd ginkgo-automation-cfps
uv sync --all-extras

Usage

import json
from openai_cfps import models as om

# Define JSON according to schema (skip_validation allows a minimal one-sample example)
plates = [
    {
        "plate_id": "20260203-example",
        "samples": [
            {
                "sample_id": "71",
                "sample_type": "experimental",
                "reagent_list": {
                    "potassium_glutamate": 2900.0,
                    "magnesium_glutamate": 250.0,
                    "hepes_koh": 750.0,
                    "amino_acid_mix_17": 1500.0,
                    "tyrosine": 100.0,
                    "cysteine": 400.0,
                    "glucose": 150.0,
                    "ribose": 1200.0,
                    "nicotinamide": 800.0,
                    "spermidine": 100.0,
                    "kpo_monobasic_mix": 300.0,
                    "kpo_dibasic_mix": 300.0,
                    "cmp": 400.0,
                    "gmp": 400.0,
                    "ump": 400.0,
                    "adenosine": 450.0,
                    "nuclease_free_water": 600.0,
                },
            }
        ],
        "n_rows": 16,
        "n_columns": 24,
        "array_order": "column",
        "reserved_columns": [],
        "replicate_factor": 1,
        "positive_controls_mixed": 0,
    }
]

for plate in plates:
    om.Plate.model_validate_json(json.dumps(plate))

with open("plates.json", "w") as f:
    json.dump(plates, f, indent=2)

Development

Running tests

uv run pytest tests/

Code formatting

uv run ruff format openai_cfps/ tests/

Linting

uv run ruff check openai_cfps/ tests/