Install aidaemon as a system service that starts on boot and runs forever.
./aidaemon install-service
This auto-detects the platform and generates the appropriate service configuration.
Creates /etc/systemd/system/aidaemon.service:
/etc/systemd/system/aidaemon.service
[Unit] Description=aidaemon AI Agent After=network-online.target Wants=network-online.target [Service] Type=simple ExecStart=/full/path/to/aidaemon WorkingDirectory=/path/to/config/dir Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target
Then enables and starts the service:
sudo systemctl daemon-reload sudo systemctl enable --now aidaemon
Creates $HOME/Library/LaunchAgents/ai.aidaemon.plist:
$HOME/Library/LaunchAgents/ai.aidaemon.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>ai.aidaemon</string> <key>ProgramArguments</key> <array> <string>/full/path/to/aidaemon</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>StandardOutPath</key> <string>/tmp/aidaemon.stdout.log</string> <key>StandardErrorPath</key> <string>/tmp/aidaemon.stderr.log</string> </dict> </plist>
Then loads the service:
launchctl load ~/Library/LaunchAgents/ai.aidaemon.plist
Once running as a service, verify with:
curl http://127.0.0.1:8080/health # {"status": "ok"}
The health endpoint is served by axum on the configured daemon.health_bind:daemon.health_port.
daemon.health_bind:daemon.health_port