Daemon Mode
The daemon starts all your agents from a single command, either in the foreground (for development) or as a background process.
Start in the background
Section titled “Start in the background”society daemon startDaemon started (PID 12345) echo on :8001 greeter on :8002 claude on :8003The daemon re-executes the society binary as a child process. Logs go to ~/.society/daemon.log and state is tracked in ~/.society/daemon.json.
Start in the foreground
Section titled “Start in the foreground”society daemon runSame behavior, but logs go to stdout and Ctrl+C stops everything. Useful during development.
Start specific agents only
Section titled “Start specific agents only”# By namesociety daemon start echo claude
# Or run in foregroundsociety daemon run echo greeterNames must match the name field in your YAML configs.
Custom agents directory
Section titled “Custom agents directory”By default, the daemon looks for *.yaml and *.yml files in the agents/ directory. Override with --agents:
society daemon start --agents /etc/society/agentssociety daemon run --agents ~/my-agentsCheck status
Section titled “Check status”society daemon statusDaemon: running (uptime: 2h 15m) [PID 12345] echo on :8001 greeter on :8002 claude on :8003
3 agents activeStop the daemon
Section titled “Stop the daemon”society daemon stopSent SIGTERM to daemon (PID 12345)Daemon stoppedThe daemon handles SIGTERM gracefully — it shuts down all HTTP servers and cleans up the PID file.
Port conflicts
Section titled “Port conflicts”The daemon checks for port conflicts before starting. If two agent configs use the same port, you get an immediate error:
society daemon start# error: port 8001 conflict: echo and my-other-agentBackground daemon logs are written to ~/.society/daemon.log. Check them if the daemon fails to start or agents crash:
tail -f ~/.society/daemon.log