How the CLI works
The agent normally runsmiles <command>. Commands operate on the active Miles site saved on that machine. Use miles sites to list known sites, miles site-attach <siteId> to resume one from anywhere, and miles use <siteId> to switch between locally known sites.
Use --json when an agent needs a structured result. It is supported by the commands documented in this reference. Human-readable output is the default.
The CLI is the supported API surface. The service routes it uses are not a separate public HTTP API.
Canonical commands
Use the canonical names below for new integrations. Earlier names remain as compatibility aliases and are listed in Lifecycle and compatibility.Modes
Outcomes and exit codes
Long-running work returns an outcome. Do not treat printed text as proof that a request completed.wait-job --json returns a structured result with fields such as outcome, phase, milesMessage, question, approvalRequired, directions, siteReady, errorId, recovery, credits, and sessionMemory.
Next: Authentication and account.