HTTP
On by default, bound to 127.0.0.1:8080. Disable it with --http "".
See API authentication before exposing it off-device — the agent will refuse a non-loopback bind without a token.
Endpoints
| Method | Path | Does |
|---|---|---|
GET | /healthz | Agent liveness. Exempt from auth |
GET | /metrics | Prometheus metrics |
GET | /v1/components | Every component with state, PID, restarts, health |
GET | /v1/plan/status | Plan path, status, last error |
GET | /v1/plan/graph | Nodes, edges and topological start order |
POST | /v1/plan/apply | Apply a plan (body = plan TOML). ?dry=true to preview; the result goes to the agent’s log |
POST | /v1/plan/reconcile | Repair the plan in effect: restart components that died and ran out of retries |
POST | /v1/plan/stop | Stop every component |
GET | /v1/recipes | List recipes in the store |
POST | /v1/recipes | Add a recipe (body = recipe TOML) |
DELETE | /v1/recipes/{name}/{version} | Remove a recipe from the store |
POST | /v1/components/{name}:stop | Stop one component |
POST | /v1/components/{name}:restart | Restart one component, cascading per dependency type |
Examples
The restart endpoint takes wait=pid (default — return once a new PID exists) or
wait=health (return once it probes healthy), and dry=true to see what a restart
would cascade to without doing it.
keystonectl
The same API with less typing:
It reads KEYSTONE_API_TOKEN from the environment and takes --addr for a remote
agent. See the keystonectl reference for every subcommand.
Bruno collection
bruno/ in the repository is a ready-made Bruno
collection with every request above, which beats hand-writing curl while you are
exploring.