AgentKit
ReferenceCLI commands
BetaYou are reading docs for the beta channel (2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →

CLI commands

ak api status

Show the running state of the API server

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.

What changes on disk: Read-only: ~/.agentkit/api-state.json.

Usage

ak api status [flags]

Examples

ak api status          # human-readable one-liner
ak api status --json   # JSON envelope with schema_version, running, pid, uptime

Flags

FlagDescription
-h, --helphelp for status
--jsonEmit machine-readable JSON (implies --no-interactive)
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
-y, --yesAssume yes for all prompts

Output modes

ModeBehavior
prettydefault on TTY (colors, ASCII markers)
plainauto when stdout piped or --no-interactive
json--json (single-object envelope, NDJSON-safe)

Exit codes

CodeMeaning
0success
1runtime error
2invalid flags
3user-cancel (SIGINT, prompt-cancel)
  • ak api — Run a local API + proxy server for AgentKit

On this page