How to Compose Nested Labs
Nested labs let you treat a composed subgraph as a reusable child with explicit external ports.
Step 1: expose child lab I/O
schema_version: "2.0"
title: "E/I Microcircuit"
models:
- path: ../../models/excitatory
alias: exc
- path: ../../models/inhibitory
alias: inh
wiring:
- from: exc.spikes
to:
- inh.input_spikes
runtime:
duration: 1.0
communication_step: 0.001
io:
inputs:
- name: external_current
maps_to: exc.current
outputs:
- name: exc_spikes
maps_to: exc.spikesWithout io, the child lab has no external ports for parent wiring.
Step 2: reference the child from a parent
children:
- path: ../ei-microcircuit
alias: circuit_a
parameters: {}
wiring:
- from: stim.current
to:
- circuit_a.external_currentChild references
Supported child locators:
pathpackage+version
The old lab_id form is not part of the current manifest schema.
Notes
- Parent wiring addresses child ports as
child_alias.external_port_name. - Child labs can themselves contain
children, so composition can be recursive.
For self-contained packaged labs, prefer path-based children so the full graph can be bundled into one archive.