Skip to content

Data model

Habitat works with a few core concepts you reference across the API.

Concept What it is Where it appears
Reagent A media, drug, or solution loaded into a reservoir on a pump valve port. Listed via GET /reagents; referenced by reagent_id on a media port in the port map.
Chip A microfluidic chip instance connected to a pump port. Referenced by chip_id on a chip port in the port map, and as the chip_id argument to fluidic operations.
Protocol A sequenced workflow that runs operations over time. Managed via /protocols — library protocols plus your own. See Protocols.

How they relate

  • Reagents sit on media ports; chips sit on chip ports. Which reservoir or chip is on which port is your device's port map.
  • Fluidic operations (atomics and routines) act on these by role or identifier — a dispense draws from a media port (its reagent) and delivers to a chip port (its chip_id).
  • Protocols schedule those operations over time — a drug study, a feeding cycle — so you don't issue each step by hand.

Reading them

curl http://mistyforest.local:8000/reagents     # reagents loaded on this device
curl http://mistyforest.local:8000/protocols    # available protocols
from openculture import HabitatClient

with HabitatClient("http://mistyforest.local:8000") as h:
    reagents  = h.reagents.list_reagents()
    protocols = h.protocols.list_protocols()

Chips aren't a standalone endpoint — a chip is identified by its chip_id, which you'll see in the port map and pass to operations that target it.