initializdocs
Cli

agent

Inspect deployed agents and rotate their secrets with the initializ CLI — agent list, get, logs, and secrets set.

initializ agent groups the commands that inspect and manage deployed agents. The deploy subcommand has its own page; this page covers list, get, logs, and secrets set.

All subcommands accept the global flags and operate in the workspace resolved from --workspace / INITIALIZ_WORKSPACE_ID / the config file / the token's workspace scope.

Resolving agents by name or id

Commands that take <name-or-id> accept either form: values starting with agt- are treated as agent ids and fetched directly; anything else is matched by exact name against the workspace's agent list. An unmatched name exits with code 4 (not found).

initializ agent list

Lists the workspace's agents.

initializ agent list
ID       NAME           STATUS   MANAGED BY  IMAGE
agt-42   support-agent  running  ci          registry.initializ.ai/acme/support-agent:sha-1a2b3c4
agt-57   triage-agent   running  platform

MANAGED BY is ci for agents deployed via initializ agent deploy and platform for agents built in the console. IMAGE is the last deployed image tag (empty when the agent has no build record). agent list has no flags of its own; use -o json for the full records.

initializ agent get

Shows one agent.

initializ agent get <name-or-id>
initializ agent get support-agent
ID           agt-42
NAME         support-agent
STATUS       running
MANAGED BY   ci
MODEL        openai/gpt-4o
LAST DEPLOY  success
IMAGE        registry.initializ.ai/acme/support-agent:sha-1a2b3c4

MODEL is provider/model from the agent's forge configuration. When the last deploy failed, an ERROR row shows the server-side error. agent get has no flags of its own.

initializ agent logs

Prints the deploy progress log — the platform's streamed create/deploy log for the agent — or, with --runtime, the agent pod's own logs.

initializ agent logs <name-or-id> [--runtime]

agent logs flags

FlagShorthandDefaultDescription
--runtimefalseThe agent pod's own logs instead of the deploy log

agent logs examples

# Why did the last deploy fail?
initializ agent logs support-agent

# What is the running agent printing?
initializ agent logs support-agent --runtime

Logs are written verbatim to stdout.

initializ agent secrets set

Rotates secret values on a deployed agent. The given keys are updated in the agent's Kubernetes Secret and the pods are rolled — no redeploy needed. Values are never persisted by the platform.

initializ agent secrets set KEY=VALUE [KEY2=VALUE2 …] --agent <name-or-id>

A bare KEY (no =VALUE) reads the value from the CLI's own environment, keeping secrets out of argv and shell history. A bare key that is not set in the environment fails with exit code 2.

Secrets stay editable for CI-managed agents — this is the sanctioned way to rotate credentials without a redeploy, even though skills, provider, channels, policies, and guardrails are locked to the repo.

agent secrets set flags

FlagShorthandDefaultDescription
--agentAgent name or id (required)

agent secrets set examples

# Value taken from the CI/shell environment (recommended):
export OPENAI_API_KEY=sk-…
initializ agent secrets set OPENAI_API_KEY --agent support-agent

# Multiple keys, explicit values:
initializ agent secrets set SLACK_BOT_TOKEN=xoxb-… WEBHOOK_SECRET=whsec-… --agent agt-42
updated OPENAI_API_KEY on support-agent; pods are rolling

The confirmation goes to stderr. With -o json, a machine-readable result is also written to stdout:

{
  "agent_id": "agt-42",
  "updated": ["OPENAI_API_KEY"]
}

On this page