Runtime (devkitd)
How the devkitd coordination daemon works, how it auto-starts, and the daemon commands for status, logs, and persistence.
On this page
Agent detection and session coordination run through devkitd, a small daemon written in Rust. You normally never manage it: any AI DevKit command that needs it auto-spawns it and connects over a Unix socket.
- Socket:
~/.ai-devkit/daemon.sock - Log:
~/.ai-devkit/daemon.log - Binary: resolved from the
DEVKITD_BINenvironment variable, the per-platform binary package that ships with the release, or a local cargo build.
Commands#
ai-devkit daemon status # running state, socket, binary path (-j for JSON)
ai-devkit daemon start # ensure it is running (auto-spawned anyway on use)
ai-devkit daemon stop # stop the daemon
ai-devkit daemon logs # tail the daemon log (-n <lines>, default 50)
ai-devkit daemon install # install a systemd --user unit for boot persistence (Linux)
daemon install writes a systemd --user unit so the daemon survives logout and reboot; it is available on Linux only. To remove persistence, disable the unit with systemctl --user and run ai-devkit daemon stop.
Environment variables#
| Variable | Purpose |
|---|---|
DEVKITD_BIN | Path to a custom devkitd binary (documented above) |
AI_DEVKIT_NO_DAEMON | When set, skip auto-spawning devkitd and use in-process behavior (useful when debugging stale daemon issues) |
Troubleshooting#
- "binary not found": the daemon binary is resolved from
DEVKITD_BIN, the platform package, or a cargo build — setDEVKITD_BINto a validdevkitdbinary if you run from a source checkout. - Stale socket: if the daemon crashed, delete
~/.ai-devkit/daemon.sockand let the next command respawn it. - Logs:
ai-devkit daemon logs -n 200(ordaemon logs --lines 200) shows recent daemon activity, including auto-spawn failures. - Stale daemon after upgrade: an old
devkitdcan keep serving until you runai-devkit daemon stop, then retry your command. UseAI_DEVKIT_NO_DAEMON=1to compare behavior without the daemon.
Upgrading to 0.69+#
0.69 is the first release that distributes a platform binary and runs the daemon. On upgrade:
- Run
ai-devkit daemon stopafter upgrading the CLI so a newdevkitdbinary is not mixed with an old long-running process. - The next
ai-devkit agentcommand auto-spawns the daemon if needed. - Everything lives under
~/.ai-devkit/(daemon.sock,daemon.log); nothing is written to your project. - To stop it entirely, run
ai-devkit daemon stop. To keep it running across reboots, runai-devkit daemon installon Linux.
Next Steps#
- Agent Management: the commands that run on top of the daemon
- Status & Capacity: operational checks for setup health and provider quota