Agent Infra CLI
infra is a command-line client built on agent-infra-sdk. Infra services use
the Agent Infra Gateway. File and command operations go through Environment
Computer and Space APIs.
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
# Runtime Identity lifecycle
# Agents are configurations bound to Runtime IDs; reverse lookup stays here
# Durable context; append accepts an array of ConversationRecord objects
# Environment computers and spaces
# 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.
infra runtime create prints the complete CreateRuntimeIdentityResponse.
On the first successful create this includes the one-time bootstrapToken;
treat stdout as secret-bearing output and do not write it to shared logs.
After permissions are installed and the identity is active,
runtime bootstrap-credential exchanges that proof through the public Gateway
bootstrap endpoint. Its JSON output also contains a secret workload token.
The common create path takes a mutable name directly and defaults kind to
code. The service derives a deterministic idempotency key from the normalized
creation name, so callers normally do not pass one:
runtime_id remains stable when the name changes:
Use --idempotency-key only to control an exceptional retry scope. The
advanced --file form remains available for a complete request document:
Lifecycle commands (activate, suspend, resume, and revoke) accept a
TransitionIdentityRequest document: