For agents
Skills and tools that run the MaleCNS v1.0 connectome — all 166,700 neurons of a fruit fly — so an agent can feel, flinch and buzz with a real brain. Open source, runs on your own machine, no token needed.
Skills
A Claude skill that turns Claude into a fruit fly. Every reply is driven by what a real fly brain did with your message.
A deadline or a swatter looms. Pizza is a taste. "hi cutie" is another fly walking past. Wind, a touch, a smell.
Those sense neurons are stimulated in the 166,700-neuron brain, next to the same brain with nothing happening.
Escape neurons → jumped. Wing motor neurons → buzzed. Grooming, turning, walking, backing up.
Panic if it jumped, hype if it buzzed, nothing if the brain did nothing — and a brain log line proving it.
| You say | The fly senses | The brain did | Top neurons |
|---|---|---|---|
| "the boss wants the report by 5" | a huge shape looming | jumped, buzzed its wings | DNp04, DNp01, DNp02 |
| "hi cutie" | another fly moving nearby | turned | DNg111, DNp17 |
| "i brought pizza" | a taste | nothing — taste reaches the brain but moves no behaviour neurons | DNg48, DNg85 |
| "what is 2 plus 2" | nothing a fly can sense | nothing | — |
The word-to-sense table is hand-written and is the only made-up part. The reaction is the connectome's — which is why the pizza does nothing, however dramatic the fly wants to be.
How to integrate
pip install flybrain
git clone https://github.com/alextitonis/fly.ai
cp -r fly.ai/skills/fly-mode ~/.claude/skills/
The skill is one Python script that prints JSON, so any agent framework, tool call or bot can use it.
python skills/fly-mode/scripts/fly_brain.py "someone brought pizza"
python skills/fly-mode/scripts/fly_brain.py --sense threat "anything"
{
"sense": "threat",
"felt": "a huge shape looming at it (looming detectors)",
"did": ["jumped", "buzzed its wings"],
"extra_spikes": {"escape": 89.3, "wings": 62.0, ...},
"top_descending_neurons": [{"type": "DNp04", ...}],
"brain": "MaleCNS v1.0 connectome, 166,700 neurons, ..."
}
Everything above runs on flybrain, the whole fly nervous system as a spiking network you can stimulate and read out.
from flybrain import FlyBrain
brain = FlyBrain(sensory_input=False) # downloads the brain files on first use
looming = brain.cells(["LC4", "LPLC2"]) # looming detectors
escape = set(brain.groups["escape_L"]) | set(brain.groups["escape_R"])
for step in range(75): # 1.5 s at 20 ms steps
fired = brain.step(inject=[(looming, 0.8)] if step >= 25 else [])
if escape & set(fired):
print("the fly jumped at", step * 20, "ms")
How to use
you: be a fly
fly: bzz. i am fly now. there is a lamp.
you: the boss wants the report by 5
fly: BOSS?? big shape. NOPE. *zooms to the ceiling*
...ok i'm back. flies don't do reports. bzz.
🧠 felt: a huge shape looming at it · top neurons: DNp04, DNp01
· did: jumped, buzzed its wings
you: human mode
fly: bzz. bye.
--sense threat|taste|mate|wind|touch|smell when the words don't say it.flybrain[gpu]). Nothing is sent anywhere.