ππ Agent
Chapter 19 / 21

RPC Mode & pi-server

Beyond the terminal: JSONL RPC & a supervisor daemon

One pi --mode rpc child per instance; length-delimited IPC over a Unix socket

Key Source Files

modes/rpc/rpc-mode.ts (801)
rpc-client.ts (600)
server/{cli,serve,supervisor(354),rpc-process,radius(440)}.ts
ipc/protocol.ts (142)
Total size ~ ~66KB

Run Demo

# Directly runnable
$ cd Pi-Agent-Site
$ npx tsx agents/s19_rpc_server.ts