STDIO Transport
The STDIO transport launches an agent as a subprocess and communicates via newline-delimited JSON-RPC over its stdin and stdout. No network involved.
When to use
Section titled “When to use”- Agents that should only run on demand (spawned per request)
- Embedding agents without running a server
- Testing agents locally without opening ports
- Wrapping tools that read from stdin and write to stdout
Registration
Section titled “Registration”society onboardAgent name: local-claudeDescription: Claude Code via stdioTransport [http/ssh/docker/stdio] (http): stdioCommand: societyArgs (space-separated, optional): run --config agents/claude.yaml --stdioRegistry entry
Section titled “Registry entry”{ "name": "local-claude", "url": "stdio://society", "transport": { "type": "stdio", "config": { "command": "society", "args": "run --config agents/claude.yaml --stdio" } }}Config reference
Section titled “Config reference”| Key | Required | Default | Description |
|---|---|---|---|
command | Yes | — | Executable to run (must be on PATH) |
args | No | — | Space-separated arguments |
How it works
Section titled “How it works”- Verifies the command exists on PATH
- Starts the subprocess with stdin/stdout pipes
- Writes a JSON-RPC request as a single line to the process’s stdin
- Reads the JSON-RPC response from the process’s stdout
- Routes responses by JSON-RPC
idfield (supports concurrent requests) - On close: closes stdin, waits up to 5 seconds, then kills the process
Subprocess stderr is logged at DEBUG level — it doesn’t interfere with the JSON-RPC protocol.
Example: stdio-only agent
Section titled “Example: stdio-only agent”Run an agent in stdio mode (no HTTP server):
society run --config agents/echo.yaml --stdioThen pipe messages to it:
echo '{"jsonrpc":"2.0","id":"1","method":"tasks/send","params":{"id":"1","message":{"role":"user","parts":[{"type":"text","text":"hello"}]}}}' | society run --config agents/echo.yaml --stdioMultiplexing
Section titled “Multiplexing”The STDIO transport supports multiple concurrent requests. Each request gets a unique JSON-RPC id, and responses are routed back to the correct caller by matching IDs. This means you can send multiple messages to a stdio agent without waiting for each response.