initializdocs
Cli

agent register

Enroll an externally-deployed agent with initializ agent register — the AgentRegister spec, custom tool admission via register.tools, the returned governed environment and per-agent token, and the CI-friendly export output.

initializ agent register enrolls an agent that runs outside the platform — on AWS Lambda, your own VM, anywhere — as a first-class governed agent. No image is built and no platform workload is created: the platform assigns the agent its identity, admits its declared tools, and returns the INITIALIZ_* environment you wire into the external runtime. The drop-in governance SDK in that runtime then governs the agent — audit, policy decisions, usage — exactly as if it were deployed on the platform.

initializ agent register -f initializ-register.yaml

What one register call does:

  • Records the agent in the workspace as externally managed, visible on the Agents list with status ready — there is no build or rollout to wait for. Registration is an idempotent upsert: re-running the command (a CI pipeline re-run) updates the same agent rather than failing or duplicating it, and re-registering a previously deleted agent reactivates its record.
  • Assigns platform identity — an agent id and a SPIFFE workload identity, same shape as any deployed agent's.
  • Admits declared tools (register.tools) to the Tool Registry as custom entries — see tool admission.
  • Mints a per-agent, revocable runtime token, issued as you (the caller), and returns it inside the env block. Revoking that one token cuts off that one agent.
  • Returns the governed environment the external runtime needs: identity, the audit/policy/session endpoints (resolved to publicly reachable URLs, since the agent cannot reach cluster-internal addresses), and the token.

The agent's runtime behavior, console surfaces, and lifecycle after registration are described in external agents; the end-to-end walkthrough is Register an external agent.

agent register flags

FlagShorthandDefaultDescription
--file-finitializ-register.yamlPath to the register spec (kind: AgentRegister)

All global flags apply. The target workspace is resolved from --workspace / INITIALIZ_WORKSPACE_ID / the config file / the token's workspace scope, then the spec's agent.workspace; if none resolves, the command fails with exit code 2.

The register spec (initializ-register.yaml)

The spec reuses the deploy spec's schema with kind: AgentRegister — the same loader, ${VAR} env interpolation, and validation. Because no platform workload is created, the workload-shaped blocks (image, resources, ingress, a2a, http, storage, mcp) have no role here; what remains is identity, governance, and the tools to admit:

apiVersion: initializ.ai/v1
kind: AgentRegister

agent:
  name: invoice-processor        # required — the upsert key is (workspace, name)
  type: strands                  # required governed type: claude-agent | strands | adk
  # workspace: ws_a1b2c3de       # optional — falls back to --workspace / env / token
  # owner: you@example.com       # → Owner in the console's identity view
  # tags:
  #   team: billing

model:
  provider: anthropic            # required — the provider the agent's model calls use

register:
  deployment: lambda             # informational: lambda | external
  pdp: true                      # enable policy enforcement for this agent
  tools:                         # custom in-process tools to admit — see below
    - op: lookup_invoice
      side_effect: read
      input_schema:
        type: object
        properties:
          invoice_id: {type: string}

# App env the platform should know about (audit/display); values support
# ${VAR} interpolation from the CI environment, secret: true keeps a value
# out of plain-text records.
env:
  - name: INITIALIZ_ENFORCEMENT
    value: audit_only            # observe first; flip to enforce when ready

# Optional audit payload capture, same semantics as a deploy.
audit:
  capture: true

Validation (violations exit with code 2): agent.name is required; agent.type must be a governed type — claude-agent, strands, or adk; a forge agent cannot be registered (forge agents are built and run by the platform). model.provider is required per the type's rules (anthropic/openai, plus gemini for adk). Every register.tools entry needs an op, and only type: custom tools are admitted via the spec — MCP and API tools are registered through the Tool Registry.

Tool admission on register

An external agent's in-process tools are invisible to the platform until admitted. Each register.tools entry is admitted to the Tool Registry as a custom entry keyed on its bare op, carrying the declared side_effect and typed input_schema so compliance rules can condition on the op's arguments:

register.tools[] fieldDefaultDescription
oprequiredThe registry op policy keys on
nameThe agent's runtime tool name (e.g. server___op), kept for reference
typecustomOnly custom is accepted in the spec
side_effectreadread, mutating, or destructive
input_schemaJSON-Schema object for the tool's arguments

Admission is developer-self-serve and never fails the registration — problems come back as warnings and the agent enrolls regardless. Every admitted op is flagged pending for security review; reviewers acknowledge, block (hard deny), or de-register it. The returned env also names the admitted ops for the agent's governance SDK, so they are policy-checked as managed tools from the first call. Under INITIALIZ_ENFORCEMENT=enforce an un-admitted tool fails closed — declare the tools before flipping to enforce.

The same register.tools block works on a governed kind: AgentDeploy — see custom tool admission.

Register output

Progress goes to stderr; the result goes to stdout. In text mode the env block is printed as export KEY=VALUE lines (sorted), so a CI job can apply it directly — for example into a Lambda's environment:

registering invoice-processor (type strands) in workspace ws_a1b2c3de…
registered: agent invoice-processor  spiffe spiffe://initializ.ai/…
export FORGE_PLATFORM_TOKEN="izp_…"
export INITIALIZ_AGENT_ID="invoice-processor"
export INITIALIZ_ENFORCEMENT="audit_only"
export INITIALIZ_GOVERNED_OPS="lookup_invoice"
export INITIALIZ_PDP_URL="https://…/security/v1/pdp/decide"
…

With -o json, one JSON document is written instead — the full response:

{
  "agentId": "invoice-processor",
  "spiffeId": "spiffe://initializ.ai/…",
  "env": {"INITIALIZ_AGENT_ID": "invoice-processor", "…": "…"},
  "warnings": []
}

The env block contains the agent's runtime token — treat the command's output as a secret. Pipe it into your secret store or the target runtime's configuration, never into build logs.

Warnings (a tool that failed to admit, a token that could not be minted) are printed to stderr prefixed with ⚠ and returned in the JSON warnings array; they do not fail the command.

On this page