Why executable biology needs a composable runtime
Biological models become more useful when their inputs, outputs, timing, and provenance form an explicit contract that other models can depend on.

On this page
A biological model is often treated as a destination: a notebook, a solver, a paper supplement, or a command that produces one set of files. That is enough to reproduce a result once. It is not enough to make the model a dependable part of a larger experiment.
Composability begins when the boundary around a model becomes explicit. The runtime needs to know what a model accepts, what it emits, how its clock advances, and which artifacts belong to the run. Once those rules are stable, the implementation inside the boundary can remain specialized.
The contract matters more than the solver
The open-source Biosimulant runtime defines a small interface around each simulation component. A module declares typed input and output ports, advances across a communication window, and returns the values that should be committed at that boundary.
import biosimulant as biosim
class ResponseModel(biosim.BioModule):
def inputs(self):
return {"dose": biosim.SignalSpec.scalar(unit="mg")}
def outputs(self):
return {"response": biosim.SignalSpec.scalar(unit="1")}
def advance_window(self, start, end):
self.response = self.solve(start, end, self.input("dose"))
def get_outputs(self):
return {"response": biosim.ScalarSignal(self.response, unit="1")}This contract does not erase domain detail. A pharmacology model can keep its ODE solver. A structure model can keep its accelerator-backed inference pipeline. A cell model can keep its own state representation. They only need a shared account of the information crossing the boundary.
The result is a graph whose edges are inspectable rather than hidden inside glue scripts.
Communication windows create a common clock
Models rarely advance in the same way. One solver takes adaptive steps; another evaluates a neural network once; another wraps a process that only exposes discrete checkpoints.
Biosimulant advances the world in communication windows. Every module sees the inputs committed at the beginning of a window, advances across that interval, and publishes its next boundary values atomically. In the simplest form:
The equation does not require every (F_i) to use the same numerical method. It says that modules agree on when information becomes visible to the rest of the graph.
| Layer | Responsibility |
|---|---|
| Module | Own its state, solver, parameters, and outputs |
| Wiring | Connect named outputs to compatible named inputs |
| World | Advance modules across shared communication windows |
| Run | Preserve configuration, logs, artifacts, and provenance |
This is intentionally narrower than a universal biological ontology. It is a runtime rule for making heterogeneous computation predictable.
Reproducibility belongs in the execution record
A runnable graph is only part of a reproducible experiment. The run also needs to record the exact package versions, resolved references, model inputs, runtime configuration, compute profile, random seed when present, and produced artifacts.
That distinction matters when “the same model” can resolve to new package contents over time. During exploration, a latest accessible version is convenient. In production or publication, an exact version is evidence.
namespace/model@versionManaged Biosimulant runs retain requested and resolved package references, package digests, runtime versions, and execution details. Local workflows can use the same package references and runtime contract without silently moving work to hosted infrastructure.
Local and managed execution should be an explicit choice
The open-source runtime runs locally and remains useful without an account. A
developer can instantiate modules, wire a BioWorld, and call run() on a
laptop or in CI. Managed execution is a separate interface for durable jobs,
GPU profiles, artifact storage, webhooks, and shared provenance.
Keeping that boundary explicit has two benefits:
- The scientific contract does not change when the execution location does.
- A local call cannot unexpectedly become a billable remote operation.
The same lab can therefore move from an exploratory local run to a managed experiment without being rewritten as a different scientific system.
Composition is an engineering discipline
The ambition is not to place every biological model into one enormous graph. It is to make the useful boundaries visible enough that researchers can decide what should compose.
Good modules have narrow ports, declared units, bounded responsibilities, and artifacts that remain meaningful outside the process that created them. Good labs pin the dependencies that matter, keep configuration separate from code, and test the wiring between modules, not only the modules in isolation.
That is the practical meaning of biology as code: biological computation that can be read, versioned, tested, connected, and run again.

