# DesktopFly — a Mac desktop fly wired from the real FlyWire connectome

> A desktop pet whose behavior comes from a real fruit fly wiring diagram instead of hand-written animation.

- Org: Denis Sergeevitch
- Date: 2026-08-18
- Category: repo, showcase
- Source: https://github.com/DenisSergeevitch/desktop-fly
- Canonical page: https://ai-tldr.dev/releases/denis-sergeevitch-desktop-fly/

## In short

DesktopFly puts a 3D fruit fly on a macOS desktop and drives its behavior with a live spiking simulation of 668 real neurons from the FlyWire connectome. Move the cursor at it and the fly escapes in about 4 ms.

## What it is

DesktopFly is an open-source macOS app that renders a 3D fruit fly on your desktop, where its walking, grooming, sleeping and fleeing are produced by a live neural simulation rather than scripted animation. The circuit comes from FlyWire v783, the reconstructed wiring diagram of an adult Drosophila brain, which contains 139,255 neurons in total.

## How it works

The app draws 23,210 neuron soma positions and runs a 668-neuron circuit with roughly 19,000 real synaptic connections through a leaky-integrate-and-fire model at 1 kHz. The escape reflex shows the chain end to end: moving the cursor toward the fly feeds looming input to the LC4 and LPLC2 visual neurons, which drive the Giant Fiber escape command neuron through about 1,200 synapses of feedforward inhibition, matching the roughly 4 ms latency measured in real flies.

## Why it matters

Connectome datasets are usually explored in a browser viewer, one neuron at a time, which makes it hard to feel that the wiring produces behavior. DesktopFly runs the circuit in real time on a laptop and ties its output to something you can poke with a cursor, which makes it a compact teaching example for anyone learning spiking network simulation. The code is MIT-licensed and the derived data files are CC BY-NC 4.0.

## Who it's for

computational neuroscientists and curious developers

## Try it

git clone https://github.com/DenisSergeevitch/desktop-fly && ./build.sh

## Links

- [GitHub Repo](https://github.com/DenisSergeevitch/desktop-fly)
- [HN Discussion](https://news.ycombinator.com/item?id=49353221)
