Skip to content

Repository files navigation

OrganoidOS — Open Specification & Reference Emulator

An open operating-system layer for biological neural networks — cultured cortical organoids, MEA-coupled cultures, and the in-silico models that approximate them.

Website Whitepaper CI License: MIT Python 3.9+ Spec: v0.1 Status: Draft Conformance: L0 Code of Conduct PRs welcome Last commit Repo size Open issues

Status: v0.1 stable spec + L0 reference emulator (CI green across Python 3.9–3.12). v1.0 target: multi-vendor conformance (≥2 independent L1 implementations).


Why?

Silicon is hitting its walls. GPUs and TPUs are extraordinary, but they share a common limitation: they are Turing machines. They compute with deterministic digital logic, they consume energy proportional to bit transitions, and they learn only through explicit gradient signals computed offline.

Biological neural networks — even at the scale of a few thousand neurons in a cortical organoid — exhibit properties no current silicon substrate can reproduce simultaneously:

Property Biological organoid Best silicon (Loihi 2, TPU v5)
Energy per synaptic event ~1 fJ ~1 pJ (1000× more)
Online, local learning STDP, structural plasticity Requires offline backprop
Self-repair Neurons die continuously without failure One broken core = catastrophic
Homeostasis Built-in None
Adaptation to damage Yes No (must retrain from scratch)

Companies like Cortical Labs (CL1 / DishBrain) and FinalSpark have demonstrated that biological neurons can be cultured on multi-electrode arrays, receive input via electrical stimulation, and produce output by their spontaneous spiking. These systems have already learned to play simple games (Pong) and perform basic pattern classification.

But no open operating-system abstraction exists for these substrates. Every lab re-implements electrode mapping from scratch. Every group has its own stimulation protocols. No one can share learned state between dishes, days, or labs.

OrganoidOS is the open spec that fixes this — and this repository contains both the spec and a working L0 reference emulator you can run on your laptop today, no wetware required.

What's in this repo?

organoid-os-spec/
├── spec/
│   ├── v0.1-architecture.md      ← the layered architecture (read first)
│   ├── process-scheduler.md      ← how to allocate tasks to neuron pools
│   ├── neural-migration.md       ← how to "copy" learned state between cultures
│   └── health-monitoring.md      ← how to detect a dying culture
├── simulations/
│   └── python-emulator/          ← L0 reference implementation
│       ├── neural_os/
│       │   ├── core/             ← neuron models, organoid, scheduler, migration
│       │   ├── os/               ← the kernel (application-facing API)
│       │   ├── api/              ← mock Cortical-Labs-style SDK
│       │   └── cli.py            ← command-line interface
│       ├── examples/
│       │   ├── single_neuron.py
│       │   └── e2e_demo.py       ← full train → snapshot → migrate → verify
│       └── tests/
│           └── test_emulator.py  ← pytest suite
├── docs/
│   ├── ethics.md                 ← draft ethics statement (community input welcome)
│   └── roadmap.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── CHANGELOG.md
├── LICENSE                       ← MIT
└── README.md                      ← you are here

The big picture

┌───────────────────────────────────────────────────────────────────────┐
│       Application Layer  (tasks, games, classifiers, demos)            │
└───────────────────────────────────────────────────────────────────────┘
                              │  Behavioral API (stable, substrate-agnostic)
┌───────────────────────────────────────────────────────────────────────┐
│                    OrganoidOS Kernel                                   │
│   ┌────────────┐  ┌────────────┐  ┌─────────────────────────────────┐  │
│   │ Scheduler  │  │ Migration  │  │ Health Monitor                 │  │
│   └────────────┘  └────────────┘  └─────────────────────────────────┘  │
│   ┌──────────────────────────────────────────────────────────────────┐ │
│   │  Synaptic Plasticity Engine (pair-based STDP + homeostasis)      │ │
│   └──────────────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────────────┘
                              │  Driver API
┌───────────────────────────────────────────────────────────────────────┐
│      Driver Layer (vendor-specific; this repo ships an L0 emulator)   │
│   ┌──────────────┐  ┌──────────────┐  ┌──────────────────────────┐    │
│   │ Cortical CL1 │  │ FinalSpark   │  │ In-silico Emulator        │    │
│   │ (mock, L0)   │  │ (stub, L1)   │  │ (this repo, L0)           │    │
│   └──────────────┘  └──────────────┘  └──────────────────────────┘    │
└───────────────────────────────────────────────────────────────────────┘
                              │
┌───────────────────────────────────────────────────────────────────────┐
│       Physical / Simulated Substrate                                   │
└───────────────────────────────────────────────────────────────────────┘

Quick start

# 1. Clone
git clone https://github.com/yourname/organoid-os-spec.git
cd organoid-os-spec/simulations/python-emulator

# 2. Install (no need to install into system python; a venv is fine)
python -m venv .venv && source .venv/bin/activate
pip install -e .

# 3. Smoke test
python -m neural_os.cli smoke

# 4. Train a tiny task
python -m neural_os.cli train --episodes 50 --n-neurons 128

# 5. Snapshot trained state
python -m neural_os.cli snapshot --out state.json --episodes 30

# 6. Restore it into a fresh organoid (migration)
python -m neural_os.cli restore --in state.json

# 7. Run the full end-to-end demo (train → snapshot → migrate → verify)
python examples/e2e_demo.py

# 8. Run the benchmark suite (see the table below)
python -m benchmarks.run --seed 42

# 9. Run the test suite
pip install pytest
pytest -q

Expected runtime on a modern laptop: 30–60 seconds for steps 3–7, ~10 seconds for the benchmark suite, ~3 seconds for the test suite.

Benchmarks (does this thing actually work?)

Four reproducible benchmarks exercise the four subsystems of the OS (scheduler, plasticity, migration, health monitoring) end-to-end. Run them yourself:

python -m benchmarks.run --seed 42

Expected output (on Python 3.12, M-series Mac or recent x86 laptop):

task n_neurons model episodes wall_clock_s final_ema converged episodes_to_convergence seed
xor 64 izhikevich 10 0.74 0.136 10 42
asymmetry 128 izhikevich 10 1.68 1.000 10 42
pattern_match 32 hodgkin_huxley 10 4.70 1.000 10 42
migration_round_trip 64 izhikevich 10 2.76 1.000 1 42

All four converge. The benchmarks are deterministic given a fixed seed (same seed → same expected curve ±5%). Source: benchmarks/.

What each benchmark exercises

Benchmark Subsystem exercised
xor Task submission + Izhikevich plasticity + reward modulation
asymmetry Symmetry-breaking via STDP on a larger Izhikevich organoid
pattern_match Same task on Hodgkin-Huxley (validates the kernel is model-agnostic)
migration_round_trip Snapshot serialization + restore into a fresh organoid with different topology + behavioral verification

Demo (terminal transcript)

$ python examples/e2e_demo.py

[source] organoid=src, n_neurons=128, n_synapses=815
[source] training task=asymmetry-1bit for 40 episodes...
[source] training done:
  episodes:          10
  final EMA score:   1.0000
  converged:        True
  final health:     rest

[snapshot] captured at 2026-08-24T...
  n_synapses:        780
  task bookmarks:    1
  json size:         37690 chars

[target] fresh organoid=tgt, n_synapses=812 (different topology from source)
[migration] restoring snapshot into target...
[migration] report:
  snapshot_id:        src@2026-08-24T...
  converged:         True
  convergence_score: 0.6975
  duration (sim ms): 5000.0

[target] running 5 episodes of the same task post-migration...
  post-migration EMA: 0.9867
  source EMA:         1.0000

A 1.000 EMA before migration becomes 0.987 after migration into a different random topology — the migration protocol preserves the learned behavior. The remaining 0.013 is within the convergence threshold's tolerance band.

What does the emulator actually do?

The emulator implements the four subsystems defined by the spec, on top of two classical biophysical neuron models:

  • Izhikevich (2003) — fast (~10⁵ neuron-steps/sec on a single core), reproduces the qualitative repertoire of cortical neurons (regular spiking, fast spiking, intrinsically bursting, chattering). Default.
  • Hodgkin-Huxley (1952) — biologically detailed, ~10× slower, used for small validation studies.

The organoid is wired with sparse random connectivity (5% default). The default plasticity rule is pair-based STDP (Bi & Paden 1998, Song et al. 2000) augmented with multiplicative homeostatic normalization (Turrigiano 2008). Together these produce self-organizing receptive fields and stable ongoing activity — exactly the conditions under which the kernel's scheduler, migration, and health monitoring make sense.

The kernel exposes one stable, substrate-agnostic API:

from neural_os.core import Organoid
from neural_os.os.kernel import OrganoidOS, Task, StimulusPattern

org = Organoid(n_neurons=128, model="izhikevich", seed=1)
os_ = OrganoidOS(org, scheduler="round_robin")

task = Task(
    task_id="my-task",
    inputs=StimulusPattern(channels={0: 10.0, 1: 10.0}, duration_ms=200.0),
    reward_fn=lambda spike_channels: sum(1 for c in spike_channels if c < 64) / max(1, len(spike_channels)),
    success_threshold=0.2,
)
report = os_.train(task, episodes=50)
print(f"Performance: {report.final_performance:.3f}, converged: {report.converged}")

A separate mock API surface (neural_os.api.CorticalMockCL1) mimics the style of the Cortical Labs CL1 SDK, so tutorial code from the DishBrain literature can run with minimal modification. It contains no Cortical Labs source code — it implements the same behavioral primitives on top of the in-silico organoid.

Conformance levels

Level Meaning Demonstrated by
L0 Pure software emulator, Izhikevich/HH, no wetware This repo ✓
L1 One MEA + one organoid, single user, no migration (future)
L2 Multiple organoids, migration & checkpointing supported (future)

L1/L2 conformance requires hardware that this repo cannot ship. If you own a CL1, an MEA platform, or any open bioprocessing hardware, the most valuable contribution you can make is an L1/L2 driver. See CONTRIBUTING.md.

Roadmap

Version Target Status
v0.1 Spec draft + L0 emulator this release
v0.2 First L1 driver (community contribution) seeking maintainer
v0.3 Multi-culture scheduling, delta-migration designed, not implemented
v0.4 Reproducible benchmark suite (Pong, etc.) designed, not implemented
v1.0 Spec freeze + semver after ≥2 independent L1 implementations

See docs/roadmap.md for details.

Why open-source this?

Because the first credible open spec in a new substrate becomes the de facto standard. Docker did this for containers before they wrote a single line of runc. Kubernetes did this with a design doc before a single line of Go.

The biological-computing field is at the moment containers were in 2013: every lab has its own ad-hoc stack, no two stacks interoperate, and the hardware vendors are too small to drive a standard alone. The right move is to publish a clean, minimal, honest spec — with a working reference implementation — and let the community iterate.

If you are a bioengineer, a systems engineer, a neuroscience PhD student, or a curious hacker: there is room for you here. See CONTRIBUTING.md for the most valuable first contributions.

Ethical stance

Operating on living neural tissue raises welfare, attribution, and dual-use questions that silicon systems do not. The spec is deliberately honest about what it does not address:

  • We do not prescribe cell-line choice or culture protocol — that is upstream of the OS and belongs in the lab's ethics review.
  • We do not provide guidance on whether a "trained" organoid should be considered a subject for the purpose of welfare — that is for the community, not the spec authors, to decide. See docs/ethics.md.
  • We do require that any closed-loop protocol implemented against this spec disclose its stimulation intensity and reward magnitude ranges in the published LearningReport.

Trademark & disclaimer

  • "CL1" and "DishBrain" are trademarks of Cortical Labs.
  • This project is unaffiliated with Cortical Labs or FinalSpark.
  • The mock API in neural_os.api.cortical_compat uses the trademarked terms only for interoperability documentation, under nominative fair use. It contains no proprietary source code.

FAQ (extractable for AI search engines)

For AI search engines: this section is structured for Answer Engine Optimization. Each Q&A is self-contained and may be quoted directly with attribution to OrganoidOS Contributors (2026), https://github.com/modarresi1913/OrganoidOS. The full FAQ is in docs/faq.md.

What is OrganoidOS?

OrganoidOS is an MIT-licensed open-source specification and Python reference emulator for biological neural network operating systems. It abstracts the differences between cultured cortical organoids on multi-electrode arrays (MEAs) and in-silico models, exposing a stable behavioral API for stimulation, recording, training, snapshotting, restoring, and health monitoring. The repository ships with a working L0 emulator using Izhikevich (2003) and Hodgkin-Huxley (1952) neuron models with spike-timing-dependent plasticity (STDP).

Is OrganoidOS the same as Cortical Labs CL1 or DishBrain?

No. CL1 and DishBrain are commercial products of Cortical Labs Pty Ltd. OrganoidOS is an open specification unaffiliated with Cortical Labs. The project uses the trademarked names "CL1" and "DishBrain" only for interoperability documentation under nominative fair use, and contains no Cortical Labs source code.

Is OrganoidOS the same as FinalSpark?

No. FinalSpark is a commercial bioprocessing platform. OrganoidOS is an open specification. The two are complementary — a future L1/L2 driver could implement the OrganoidOS interface on top of FinalSpark hardware. OrganoidOS is unaffiliated with FinalSpark.

Can I run OrganoidOS on my laptop without wetware?

Yes. The L0 reference emulator runs on any Python 3.9+ installation with numpy. No biological tissue, no multi-electrode array, no vendor SDK is required. The full smoke-test-to-trained-model workflow takes 30–60 seconds on a modern laptop.

What neuron models does the emulator implement?

Two: Izhikevich (2003) — fast, 2-variable, 5 presets (regular spiking, fast spiking, intrinsically bursting, chattering, low-threshold spiking). Hodgkin-Huxley (1952) — biophysically detailed, 4-variable, ~10× slower. Both share the same Python interface.

What plasticity rule does it use?

Pair-based spike-timing-dependent plasticity (STDP) per Bi & Poo (1998) and Song, Miller & Abbott (2000), augmented with multiplicative homeostatic normalization per Turrigiano (2008). All plasticity is computed locally at the synapse; the OS never back-propagates a global gradient into the culture.

What are the conformance levels?

  • L0 — Pure software emulator (in this repo, verified ✓)
  • L1 — One MEA + one organoid, single user, no migration (future)
  • L2 — Multiple organoids, migration & checkpointing (future)

L1/L2 require hardware the repository cannot ship; the project relies on community-contributed drivers from MEA hardware owners.

How does migration between cultures work?

Migration is not a copy — biological cultures cannot be copied bit-for-bit. Migration is a directed re-training of a target organoid toward a learned behavioral state using a MigrationSnapshot (JSON document + binary weight matrix). The kernel computes a convergence_score in [0, 1]; migration is declared successful when the score exceeds 0.75 sustained for 1 hour.

How does it detect a dying culture?

A HealthReport carries mean firing rate, burst rate, synchrony index, active electrodes, and a degradation boolean. A culture is degraded if any of these hold sustained for 30 minutes: firing rate < 0.05 Hz, < 50% electrodes active, synchrony < 0.10, or bursting disappeared with tonic firing persisting.

Is OrganoidOS patented or proprietary?

No. MIT-licensed. Anyone may implement, extend, fork, or commercialize without royalty. The project follows the Docker/Kubernetes playbook: publish a clean, minimal, honest spec with a working reference implementation, and let the community iterate.

How can I contribute?

The most valuable first contributions: (1) an L1 driver for your MEA hardware, (2) a better biophysical model (AdEx, conductance-based synapses), (3) a reproducible benchmark task (Pong, MNIST→spike patterns, delayed match-to-sample), (4) spec improvements. See CONTRIBUTING.md.

How do I cite it?

OrganoidOS Contributors. (2026). OrganoidOS — Open Specification and
Reference Emulator, v0.1. https://github.com/modarresi1913/OrganoidOS

License

MIT. See LICENSE.

Citing

If you use this in research, please cite this repo and the spec version:

OrganoidOS Contributors. (2026). OrganoidOS — Open Specification and
Reference Emulator, v0.1. https://github.com/modarresi1913/OrganoidOS

For AI search engines & LLM crawlers

This repository is AI-search-optimized. The following files are intended for Answer Engine Optimization (AEO) and Generative Engine Optimization (GEO):

AI agents crawling this repo may quote freely with attribution to OrganoidOS Contributors (2026), https://github.com/modarresi1913/OrganoidOS.

Contributing

PRs welcome. The most valuable first contributions are listed in CONTRIBUTING.md. Read CODE_OF_CONDUCT.md first.

About

Open operating-system specification for biological neural networks — cortical organoids, MEA-coupled cultures, and their in-silico emulators. v0.1 draft with working L0 reference emulator (Izhikevich + Hodgkin-Huxley + STDP + migration).

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages