Lab Automation Orchestration Backend
Backend that orchestrates robots, microscopes, incubators, and a cell-analysis vision service into one programmable system for autonomous cell culture.
From protocol to orchestrated robots (or simulated ones).
Scientists describe protocols as ordered steps and actions. An async job executor walks the Project → Protocol → Step → Action graph and dispatches each action to the right microservice — incubator, liquid-handler, microscope, or the cell-analysis vision service. Every dispatch lands in a forensic JobLog. Flip mock mode on and the same protocol runs on your laptop without touching hardware.
Protocol editor
Project · Stem cell expansion 2025-W12 · 1 protocol
This is an animated mockup of the lab-orchestration capability — not a live product. Protocol steps, log entries, and latencies are illustrative.
Typed ActionType registry
Each hardware capability is registered as a typed ActionType — new instruments onboard as data, not code changes. The executor only knows the registry.
Async job executor
Walks Project → Protocol → Step → Action eagerly, dispatches each action to the right microservice, and refreshes job state so pause/cancel is honored cleanly.
Hardware microservice dispatch
One async dispatcher fans out to incubators, liquid-handlers, microscopes, and the cell-analysis vision service over httpx — concurrent, never blocking.
Forensic JobLog
Every action persists full request/response payloads, latency, and execution status — full traceability across physical operations for regulated environments.
First-class mock mode
Live HTTP calls swap to canned responses with simulated latency, so the full job lifecycle runs on a laptop with zero hardware reservations.
PostgreSQL + SQLAlchemy 2.0 async
Projects, protocols, steps, actions, and logs persist through fully async SQLAlchemy 2.0 over asyncpg — schema migrated with Alembic.
Backend that orchestrates robots, microscopes, incubators, and a cell-analysis vision service into one programmable system for autonomous cell culture.
Async FastAPI + SQLAlchemy 2.0 over PostgreSQL; a typed ActionType registry and a custom job executor dispatch each step to the right microservice.
Scientists describe protocols as ordered Steps and Actions; the executor walks the Project → Protocol → Step → Action graph and dispatches each action to the correct microservice. Every action produces a JobLog entry with full request/response payloads and latency, giving full forensic traceability across all physical operations.
How a request flows through it
Each request enters at the top of the diagram, flows through every box, and lands at the bottom — exactly the way the production system behaves. The scan-line traces where a live request would be right now.
What it's built with
The interesting parts
Typed action registry
Each hardware capability registered as a typed ActionType — new instruments are onboarded as data, not code changes.
Async job executor
Walks Project → Protocol → Step → Action eagerly, dispatches each action to the right microservice, and refreshes job state between actions so pause/cancel is honored cleanly.
Forensic JobLog
Every action persists request/response payloads, latency, and execution status — full traceability for regulated environments.
First-class mock mode
Live HTTP calls swap to canned responses with simulated latency, so the full job lifecycle runs on a laptop without hardware.
The calls that did most of the work
A handful of engineering choices shape how a system feels. Here are the ones we'd still defend — alongside what each one cost.
Typed ActionType registry — onboard hardware as data
A new brand of incubator or a different liquid handler shouldn't require code changes to the orchestration layer; registering capabilities as data keeps the platform extensible.
Tradeoff: Indirection — the call site for a robot action goes through a registry lookup instead of a direct method call. Less greppable, more flexible.
Async-by-default Python backend
Job execution is dominated by waiting on physical hardware. A synchronous worker model would spend most of its wall-clock time blocked on sockets.
Tradeoff: Every code path is colored async; mixing in a synchronous helper requires care, and the team has to know FastAPI/asyncio idioms well.
First-class mock mode for hardware-free dev
A six-figure hardware rig per engineer doesn't scale. Mock mode lets the full job lifecycle — including cell-analysis output — run on a laptop.
Tradeoff: Mock responses drift from real hardware unless the system is exercised against both regularly; CI needs to cover the mock path explicitly.
Pause/cancel honored between action boundaries
Stopping cleanly between actions is safe in a wet lab; interrupting mid-pipette is not. Refreshing job state between every action gives the operator a clean stop point.
Tradeoff: An in-progress action can't be aborted; the operator may wait seconds for a long action to finish before pause takes effect.
Tell us what you're building.
Free 30-minute call. Real humans, real timelines, no follow-up emails forever.