Agent Infra CLI
infra is a command-line client built on agent-infra-sdk. Infra services use
the Agent Infra Gateway. Workspace data can optionally bind directly to a local
directory, while managed Workspace lifecycle and every other service continue
through Gateway.
Install
The default Gateway is http://127.0.0.1:5200. Persist a remote Gateway once:
Resolution order is --gateway > SKY_GATEWAY_URL > saved config > local
default. Override the config path with --config or AGENT_INFRA_CONFIG.
The default path is:
- macOS:
~/Library/Application Support/agent-infra/config.json - Linux:
${XDG_CONFIG_HOME:-~/.config}/agent-infra/config.json - Windows:
%APPDATA%\agent-infra\config.json
Environment configuration remains supported:
Do not put a long-lived token directly on the command line in shared shell environments; process arguments and shell history may be visible to others. The config file stores only the Gateway URL, never credentials.
Sky credentials
Credential resolution order is --token > SKY_GATEWAY_TOKEN > a directly
readable local ~/.sky/credentials token. Inspect discovery without printing
secrets:
Modern sky login credentials use an ENCv1 encrypted store. Infra detects
that login state but deliberately does not decrypt another CLI's credential
file. In that case, issue a scoped Sky user API token and expose it as
SKY_GATEWAY_TOKEN. infra auth status reports this as
sky_login_encrypted and provides the same guidance.
Examples
# Health and discovery
# Agent Registry
# Durable context; append accepts an array of ConversationRecord objects
# Compatibility workspace file and command APIs
# Direct local Workspace data plane; no file bytes pass through Gateway
# Host command execution is an explicit local opt-in
# Managed workspace lifecycle
# OpenAI-compatible Model Infra JSON APIs; '-' means stdin
|
Complex write requests are supplied as JSON files or standard input so the CLI
stays aligned with the SDK's contract types as those contracts evolve. JSON
field names use the contracts' camelCase wire format.