agent
Scaffold, inspect, and manage agents with the initializ CLI — agent init, list, get, logs, and secrets set.
initializ agent groups the commands that scaffold, inspect, and manage
agents. The deploy subcommand has its own page; this page
covers init, list, get, logs, and secrets set.
All subcommands accept the global flags. The
commands that talk to the platform (list, get, logs, secrets set)
operate in the workspace resolved from --workspace /
INITIALIZ_WORKSPACE_ID / the config file / the token's workspace scope;
init runs entirely locally and needs no
credentials.
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 listID NAME STATUS MANAGED BY IMAGE
agt-42 support-agent running ci registry.initializ.ai/acme/support-agent:sha-1a2b3c4
agt-57 triage-agent running platformMANAGED 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-agentID 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-1a2b3c4MODEL 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
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--runtime | false | The 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 --runtimeLogs 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
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--agent | Agent 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-42updated OPENAI_API_KEY on support-agent; pods are rollingThe confirmation goes to stderr. With -o json, a machine-readable result is
also written to stdout:
{
"agent_id": "agt-42",
"updated": ["OPENAI_API_KEY"]
}initializ agent init
Scaffolds a deployable claude-agent: the deploy spec plus an A2A (Agent2Agent) executor stub. Runs entirely locally — no platform credentials needed.
initializ agent init [--name <agent>] [--provider anthropic|openai] [--dir <path>]Two files are written (existing files are skipped unless --force):
initializ-deploy.yaml— the deploy spec, withagent.type: claude-agentand A2A enabled by default (auth: bearer), plus anINITIALIZ_ENFORCEMENT: audit_onlyenv entry so the agent starts in observe-only mode. See the claude-agent runtime for the full schema.a2a-executor.ts— an@initializ/a2a-kitexecutor stub with one skill; fill in itsrun(). When the project keeps sources undersrc/(asrc/directory exists, ortsconfig.jsondeclares asrcrootDir), the stub is placed atsrc/a2a-executor.tssotscemits it todist/a2a-executor.js.
If a package.json is present, the
"initializ": { "a2a": "./dist/a2a-executor.js" } pointer is wired in
automatically (formatting preserved; if the insertion would produce invalid
JSON, nothing is written and the command prints the snippet to add manually).
Once the executor's skills are implemented, the governed image serves the
Agent Card and JSON-RPC endpoint and routes tasks to them.
The agent name must be a valid DNS-1123 label (lower-case letters, digits,
and hyphens; max 63 characters; no leading or trailing hyphen) — it becomes
the agent's Kubernetes name. An invalid name exits with code 2, as does a
--provider other than anthropic or openai.
agent init flags
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--name | current directory name | Agent name | |
--provider | anthropic | Model provider: anthropic or openai | |
--dir | -d | . | Directory to scaffold into |
--image | registry.initializ.ai/<name>:latest | Image ref written into the deploy spec | |
--force | false | Overwrite existing files |
agent init example
initializ agent init --name code-reviewer --provider anthropicAfter scaffolding:
npm install @initializ/a2a-kit- Implement
run()in the executor stub (point it at your handler). - Build and push the governed image in CI, then deploy:
initializ agent deploy -f initializ-deploy.yaml --image <ref>
agent deploy
Deploy a CI-built agent image to the initializ AI Platform — the deploy spec, forge.yaml and build-output inputs, the claude-agent runtime, metadata tags and raw annotations, network reachability, stateful storage, HTTP invoke, env var interpolation, and --wait semantics.
Developer
Build agents and skills against the Forge runtime, or bring your own Claude Agent SDK service and govern it with the Agent SDK — the developer-facing documentation, in one place with the platform docs.