CLI commands
ak api status
Show the running state of the API server
ak api status
Show the running state of the API server
Synopsis
What it does:
Read the API server state file and report whether the server is running. Shows PID, bind address, uptime, and request count when running. Exits 0 whether or not the server is running - use the running field in --json output to branch.
Who it's for: Both: power devs polling server health in scripts (--json) and non-technical users checking status.
When to use it:
Checking whether ak api start has been run, or verifying the server is still up after a long idle period. Safe to call repeatedly - read-only.
Examples: ak api status # human-readable one-liner ak api status --json # JSON envelope with schema_version, running, pid, uptime
What changes on disk: Read-only: ~/.agentkit/api-state.json.
Output modes: pretty default on TTY (colors, ASCII markers) plain auto when stdout piped or --no-interactive json --json (single-object envelope, NDJSON-safe)
Exit codes: 0 success 1 runtime error 2 invalid flags 3 user-cancel (SIGINT, prompt-cancel)
ak api status [flags]Options
-h, --help help for status
--json Emit machine-readable JSON (implies --no-interactive)
--no-interactive Disable interactive prompts (CI-safe)
-q, --quiet Suppress non-error output on stderr
-V, --verbose Extra diagnostic output on stderr (loses to --quiet)
-y, --yes Assume yes for all promptsSEE ALSO
- ak api - Run a local API + proxy server for AgentKit