flyOS is a living fly camera. Open the app and you're looking at your room through the rear camera with a fly standing in it: on your desk, your wall, the back of a chair. The fly is not an animation: its nervous system is a real connectome running on the phone, so when your hand comes at it, the fly actually sees the threat and jumps to escape. Everything on screen is either measured from the circuits actually running, or a stated model, and the app says which.
That's the pitch. Below is everything else: the actual neuron counts, the equations the engine integrates, the five circuits we built and chose not to turn on, and every source we built it from. It gets technical fast. That's on purpose.
flyOS's fly is not a rigged animation reacting to hand-tuned triggers. Its nervous system is built out of MaleCNS v1.0, the complete, synapse-resolution connectome of the adult male Drosophila melanogaster central nervous system: roughly 166,000 real, traced neurons and their real synaptic connections, released by the FlyEM project at HHMI Janelia in collaboration with the University of Cambridge, the MRC Laboratory of Molecular Biology, and Google Research[1]. It ships as a set of flat connectome tables: per-neuron annotations (type, instance, soma side, consensus neurotransmitter prediction) and per-pair synaptic weights at a minimum confidence of 0.5. We downloaded them directly from Janelia's own distribution[2], not through any intermediary.
We take real, induced subgraphs of that connectome: a named list of cell types plus every real positive synapse between them, nothing added, nothing fitted. We then simulate them as populations of spiking neurons on the phone. No connection weight is invented and no contact count is adjusted to make a demo work; the only editorial choices are which cells to include and, in the larger assets, a minimum-contact threshold that exists purely to keep an asset under an 8 MB bundle budget, never to shape the result.
The raw source tables are about 1.1 GB total and never ship in the app. They're a development-only cache, re-downloaded on demand by our extraction scripts. What actually ships is the derived output: eleven small JSON circuit assets, on the order of tens of kilobytes to a few megabytes each, totaling well under the size of a single photo. The data is released under a Creative Commons Attribution 4.0 International license[3]; our derived assets remain CC BY 4.0 and we impose no further restriction on them. The Janelia FlyEM team, the University of Cambridge, MRC LMB, and Google Research do not endorse flyOS.
The connectome has roughly 166,000 neurons. flyOS runs four real, induced subgraphs of it, totaling 3,494 distinct neurons, as event-driven leaky-integrate-and-fire populations, in real time, on the phone's CPU. Each one is wired to a real sensory input and a real behavioral output: nothing is simulated in isolation just to produce a number.
| Circuit | Neurons | Directed edges | Synaptic contacts | Drives |
|---|---|---|---|---|
looming | 1,307 | 68,495 | 441,250 | LC4 / LPLC2 → the giant fiber → the jump |
clock | 52 | 475 | 3,904 | The wingbeat floor and the sleep gate |
premotor | 2,083 | 135,413 | 1,244,769 | LC10 → AOTU → DNa02, which owns steering |
feeding | 77 | 1,207 | 7,898 | Tracked food → sweet cells → a sustained MN9 gate |
(Neuron counts don't sum to 3,494 exactly: a couple dozen cells are members of more than one circuit, most often a cell type that's both a named population in one asset and a generic connectivity-derived input to another, and each is counted once in the total.)
looming is the one you'll actually see. All 126 LC4 and all 185 LPLC2 cells from both optic lobes are bundled, whole, along with both giant fiber cells (type DNp01) and everything the connectome shows presynaptic to them at 50 or more summed contacts: 753 cells feeding LC4, 241 feeding LPLC2. Every LC4 and every LPLC2 cell in the asset synapses directly onto a giant fiber: 385 edges, 16,433 contacts, straight into the two cells that decide whether the fly jumps[4][5]. When the eye encoder detects expansion (something getting closer, fast), it drives LC4 and LPLC2 with a Poisson-like input, and if the giant fiber's mean firing rate crosses 20 Hz in a window, the fly jumps. Nothing else can trigger that reflex, and cutting the synaptic wiring (connections off, same driven input) silences the giant fiber completely. A 3 m/s human swat is escaped every time in our own testing, with a median 60 ms to spare.
premotor exists because an earlier version of the descending-neuron rack measured embarrassingly badly: DNa02, DNp09, MDN and DNg02, the actual steering and walking outputs, were reachable only through Johnston’s-organ targets, at 0–19% of their real input and mostly inhibitory, and sat at 0–0.1 Hz under saturating drive. Turning didn't work because nothing was really wired to it. So we went back to the connectome and pulled every cell actually presynaptic to those output neurons: LC9, LC10, LC31 and LoVP12 (the visual route in: LC10 alone supplies 43–74% of the input to the AOTU relay cells that reach DNa02), PFL2 and PFL3 (the central complex’s own steering output), and 742 further “premotor” cells with at least 100 summed contacts onto the five output populations. The result: DNa02's real measured coverage went from 2.7% of its total synaptic input to 70.4%; MDN from 0.4% to 72.2%; DNp09 from 3.0% to 37.7%. Under a 50 Hz test drive on the visual inputs, DNa02 hit 227 Hz and DNp09 hit 177 Hz. With the synaptic wiring cut, identical input produces exactly zero on every output population.
One honest finding from that work: PFL3, the central complex’s own steering output, does not drive DNa02 on its own in this model at any input rate up to 200 Hz we tried. Its 736 real contacts land on two cells that need roughly 26 coincident synaptic events within one synaptic time constant to matter, and the premotor layer it feeds sits at 2–5 Hz under that drive. The wiring from the compass to the legs is there in the connectome. Getting it to actually carry a signal, in a model this simplified, is a different problem, and we're telling you that rather than quietly shipping a compass that does nothing.
Every circuit (including the feeding subgraph above, which we also validated against a dense reference simulator running the identical wiring at fixed 0.1 ms timesteps) runs on the same engine: an event-driven leaky integrate-and-fire simulator, written from scratch in Swift, with no language model, web view, Python runtime, or network call anywhere near it. For membrane voltage v and decaying synaptic drive g, between events each neuron follows the exact closed-form solution of:
Rest and reset potential are −52 mV; the spike threshold is strictly above −45 mV. A spike resets both v and g and opens a 2.2 ms refractory period, during which incoming synaptic drive is discarded; externally driven sensory cells are the one exception and have no refractory lockout, matching the reference model we built this from. A synaptic event is delivered 1.8 ms after the presynaptic spike that caused it. Each real synaptic contact contributes 0.275 mV of drive, multiplied by the presynaptic cell's consensus-transmitter sign: acetylcholine treated as excitatory (+1); GABA, glutamate, and histamine as inhibitory (−1); the monoamines and any “unclear” prediction carry sign 0 and simply never transmit. Nothing here is fit to produce a desired behavior: these are the published reference model's stated parameters[6], reimplemented independently from the equations, not ported from the authors' own MIT-licensed Brian2 code[7].
External sensory drive is a Poisson process with exponential inter-arrival times, sampled from a seeded SplitMix64 generator (deterministic and repeatable for a given seed), which is what makes our regression tests possible at all. There is no learning, no neuromodulation, no gap-junction model, no detailed neuron morphology, and no spontaneous firing beyond what a circuit explicitly models as tonic drive. The simulator advances 100 ms of model time per update; on an iPhone 15 that takes at or under 100 ms of wall time, every window, which is what “real time” means here.
This is the part most apps wouldn't tell you. We built nine circuits from the connectome, not four. Five of them are real, tested, fully wired classes sitting dormant in the app's source tree right now (7,698 more neurons across them) because when we actually measured what they produced, none of them earned the compute. Running all nine would cost roughly 11,140 simulated neurons for the same four causal chains you already get from the four that are registered: escape, steering, the crepuscular clock, and feeding.
| Circuit | Neurons | What we measured |
|---|---|---|
| central complex (the compass ring) | 434 | The E-PG ring (the fly's heading-direction bump[8]) never holds a stable bump under this app's simplified dynamics, and PFL3 can't drive DNa02 at any rate we tried (see above). motor.heading was being written and read by nothing. |
| Johnston’s organ (the ears) | 1,444 | Nothing feeds it any more. The wind/sound encoder that used to drive it from the phone's microphone was removed along with the rest of the audio pipeline, so it runs on gravity alone, which never reaches its own startle or bracing thresholds. |
| color / object vision (R7/R8, Dm8, LC10, LC11) | 4,134 | Its one measured, useful output (LC11 driving forward locomotion) reads roughly 0 Hz on every real camera scene we tested. The single genuinely useful thing it computed, a yellow-patch attraction bearing read directly off the retina, was moved into premotor, which already holds the same retina sample for its own purposes. |
| thermosensory (TRN / HRN, VP) | 374 | The app no longer asks the owner for a room temperature at all, so there is no celsius reading anywhere left to give it. Not a modeling failure: an input that simply doesn't exist any more. |
| descending rack (every typed descending neuron) | 1,312 | Its steering and walking outputs were always redundant with premotor, which already owns those decisions outright, and its wing-motor readout measured 0 Hz on every scene. Worse: registering it alongside the feeding circuit would let it drive its own copy of MN9 from the same sweet-taste cells, risking a feeding event getting credited twice in the same window. Leaving it dormant is what keeps a meal counted exactly once. |
None of this is hidden inside the shipped app, either: it's a doc comment directly above the four lines of Swift that register the circuits that do run, so the reasoning sits right next to the decision it explains.
The metadata sheet behind the brain icon shows three internal states, and we were careful about what we claim for each. We do not say the fly feels anything. We show internal states, which is the vocabulary the literature actually uses and measures[9], and we label each one MEASURED or MODELLED depending on whether the number is a live reading out of the running network or a documented stand-in for physiology our subgraph doesn't contain.
Defensive arousal is MEASURED: a leaky integrator charged directly by the giant fiber's own firing rate in the looming circuit, discharging with a 120-second time constant. It only charges upward: a threat that has passed leaves the bar standing, and it comes down on its own clock, which is the actual behavioral signature of an emotion-primitive-like state rather than just a second copy of the giant fiber's instantaneous rate. One swat measures 0.451 on a 0–1 scale; three swats ten seconds apart measure 0.729; five measure 0.809. Cut the looming circuit's wiring and it never leaves zero, even with identical driven input.
Locomotor drive is also MEASURED: the mean firing rate of the real DNa02 and DNp09 populations from the premotor circuit above, divided by a 60 Hz scale chosen against what those cells actually reach under saturating drive. Sleep pressure is the one we label MODELLED: a two-process homeostat gated by circadian phase read from the real 52-cell clock network, because real clock neurons keep time with intracellular transcriptional loops and neuropeptide signaling that fast synaptic connectivity alone can't reproduce, and we say so on screen rather than pretending otherwise.
306 automated tests run the real bundled assets, not mocks, including equivalence against a dense reference simulator on the feeding circuit at fixed 0.1 ms steps. Every circuit carries a causal control: run it with synaptic transmission on, then run the identical driven input again with connectionsEnabled false. Silent input must stay silent. Cutting a specific population’s output connections (MN9's, for instance) must remove exactly that motor output while leaving upstream relay activity untouched, which is how we know the effect is really flowing through the wiring we think it is, and not some other path we didn't account for. The extraction scripts themselves are deterministic and reproducible: rerunning them against the same cached source tables produces the identical asset, byte for byte.
On an iPhone 15, the full running brain holds real time: our own internal brainTime metric, simulated milliseconds of neural activity per wall-clock millisecond, reads 1.00, and reports honestly below that if the phone ever falls behind. Circuits advance concurrently on separate actors so their 100 ms windows overlap across CPU cores. An optimized macOS probe running the bundled feeding graph alone measured 4–17 ms of wall-clock compute per 2 seconds of simulated time across a range of stimulus conditions. Thermal behavior and battery use over a long session remain unmeasured by us so far.
To be unambiguous: this is not a reconstruction of a living fly's complete nervous system, and it has not been biologically validated against a real animal. These are selected subgraphs with deliberately simplified dynamics: uniform synaptic physiology, transmitter effects collapsed to a single sign per neurotransmitter, no receptor-specific pharmacology, no learning. The reference numerical model we built from was itself validated on an earlier connectome (FlyWire, not MaleCNS) in a different lab's published experiments; our adaptation onto MaleCNS has not been through that process. The fly's body, its flight mechanics, and the ethogram deciding what it's doing moment to moment are engineered models we designed, not measurements of anything, and the app itself labels them that way, every time, on screen.
Further citations (for the color/object pathway, the descending-neuron nomenclature, the gustatory connectome, and every individual circuit's full population breakdown) are bundled in the app itself, in its research credits.