AgentKit
DocsKitsCLI ReferenceDesktop App

host

ak host

Inspect host pressure before starting parallel work

From AgentKit CLI v3.3.0-beta.18, ak host reports CPU, memory, physical disk activity, free space, and the processes moving the most I/O on this machine, folded into one verdict. Parallel builds, tests, and agents on one machine usually saturate the disk before CPU or memory, so check the host before you fan out work.

VerdictWhenWhat to do
goNo metric is above the throttle lineStart heavy work.
throttleDisk active time at least 70% or latency at least 50 ms, CPU at least 85%, or memory at least 88%Add at most one more heavy job.
holdDisk active time at least 90% or latency at least 100 ms, CPU at least 95%, or memory at least 95%Start no new heavy job; wait and check again.
cleanA watched volume has less than the free-space floor (25 GB by default)Free space before more heavy work.
unknownNo pressure metric could be sampledRun heavy jobs one at a time.

The verdict is the most severe signal. A metric that cannot be sampled is reported as null with a reason, never guessed. Every verdict exits 0; read it from the output.

A typical flow:

  1. ak host status samples the host, or reads a fresh watcher snapshot, and prints the verdict.
  2. ak host watch --detach keeps one machine-wide watcher writing that snapshot so every runtime reads it at once.
  3. ak host gate -- <cmd> waits out hold or clean, then runs a heavy command at low priority.

The Engineer Kit also ships a host-pressure-reminder Hook that reads the watcher snapshot and reminds the agent to pace heavy commands; see Engineer Hooks.

Command contract

Inspect host pressure before starting parallel work

Synopsis

Reports CPU, memory, physical disk activity, free space and the processes moving the most I/O on this machine, folded into one verdict (go, throttle, hold, clean, unknown). Check status before fanning out parallel builds, tests or agents, keep one watcher running so every runtime reads a fresh snapshot, and run heavy commands through gate so they wait out a saturated disk and run at low priority.

Examples

  ak host status --json
  ak host watch --detach
  ak host gate -- go test ./...

Options

  -h, --help             help for host
      --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 prompts

SEE ALSO

  • ak host gate - Wait out a saturated host, then run a heavy command at low priority
  • ak host status - Sample CPU, memory, disk activity and free space into one verdict
  • ak host watch - Keep one machine-wide watcher writing the host status snapshot