nervネルフ

The map

Four programs, three transports, and one program a person actually runs. Every edge below is a process boundary, and every one of them can be absent.

plate 01nothing in the ring talks to anything but magi

Every edge

edgewho starts itcarriesabsent?
magi → caspermagi, once per tool callthe call as argv and stdin; the result on stdoutthree builtin tools remain: read, write, edit
magi → melchiormagi, once per sessionwhat the session is doing, up; what the model said and who is calling, downno model and no siblings — the session runs and says so
magi → balthasarmagi, once per sessionevery entry out; recalled memory and prior sessions backthe journal on disk becomes the record instead
session → sessioneither, through melchiormessages, questions and answers between agentsa session with no siblings, which is the ordinary case
front end → sessionthe front endwhat was typed, up; everything to draw, downthe turn keeps running — close the window and come back

Why separate processes

Three things fall out of the split that do not fall out of modules in one binary.

A second implementation is what keeps a protocol honest. magi ships a second tool peer written in Lua, deliberately unlike the first — a different language, a different lifecycle, and one thing it cannot do at all. A protocol with one implementation is a function call with extra steps.