Skip to content

Chapter 3 · agent-neuron · Lab

The first example

A shell script, a local HTTP API and a person on stdin, three neurons in one network, with one send waiting between them.

Three adapters, one network

One network wraps three kinds of program: a shell script, a local HTTP API, and a person answering on standard input. Three neurons, three adapters, no special cases; the word the command pipes in travels the links, a send waits between the neurons, and the run ends when the person answers.

The rule it proves

It is the neuron contract working (SPEC 3): the wrapper hands whatever is inside one JSON value and reads one back, whether it holds a script, an API call or a person. An answer carried onward joins the signal it answers, which is reply routing (4.3) in practice, and nothing in the middle decides what runs.

Run it

echo approve | npm run example
CommandFrom the repo root. The word approve is the person’s answer, piped in on stdin.

What it is not

Not a model in sight and nothing remote: the API is a local one, the person types into the terminal, and the desk page is a later demo’s.

overfocus/agent-neuron