Skip to content

Chapter 6 · agent-neuron · Lab

Suggest

The typing demo with a threshold: suggest holds one answer per keystroke and acts only when a second neuron answers the same one.

Two to agree

The typing demo plus one neuron: the answers of the three search neurons are forwarded to suggest with their cause attached. It holds one answer per keystroke and acts only when a second neuron answers the same keystroke, and each run prints the senders that agreed, the held answers dropped for a newer forward, and the ones that gave up waiting.

The rule it proves

A threshold counts distinct senders on one trace and nothing else (SPEC 5.2): one sender twice does not count, a forwarded answer does not start a hold, and the last keystroke is the only one that can still reach two, whatever the waiting cost.

Run it

npm run demo:suggest
npm run demo:typing       # the same demo, without the suggest neuron
CommandFrom the repo root. The typing demo is unchanged by the threshold; suggest holds what it alone needs.

What it is not

Not a weighted vote: each sender counts once for now, and whether agreement should weigh senders differently is one of the questions the demo is kept to answer.

overfocus/agent-neuron