Register an external agent
An end-to-end walkthrough — take a governed agent running off-platform (an AWS Lambda), enroll it with initializ agent register, wire the returned environment into its runtime, and verify its executions and audit trail in the console.
This guide enrolls an agent that runs outside the platform — the example is an AWS Lambda running a Strands agent — as a fully governed platform agent: platform identity, policy-checked tool calls, a complete audit trail, and a populated execution list, with no platform deploy. The agent keeps running exactly where it runs today; what changes is that the platform now knows it, governs it, and records it.
The pieces this guide assembles are covered in depth on the register reference and external agents.
Before you start
- An API token. An org or workspace admin creates it under Organization → API Tokens — a developer or workspace-admin token scoped to the workspace the agent should live in. See API tokens.
- Your workspace ID (
ws_…), unless the token is workspace-scoped. - The agent, with the governance SDK in its runtime. The agent must be built on a governed framework — Claude Agent SDK, AWS Strands, or Google ADK — and its runtime must carry the matching drop-in governance package. For a container-image Lambda, that is the same governance wrapper build a platform deploy uses; for a zip-bundled Lambda, install the package's wheel into the bundle. Either way the agent's code does not change — the package activates from the environment you wire in below.
- The CLI, wherever the registration will run (a laptop or a CI job) — see the install section.
Step 1 — author the register spec
Add an initializ-register.yaml next to the agent's source. It declares
the agent's identity, its model provider, and — the part that makes its
tools governable — the in-process tools it calls:
apiVersion: initializ.ai/v1
kind: AgentRegister
agent:
name: invoice-processor
type: strands # claude-agent | strands | adk
owner: you@example.com
model:
provider: anthropic
register:
deployment: lambda # informational
pdp: true
tools:
- op: lookup_invoice
side_effect: read
input_schema:
type: object
properties:
invoice_id: {type: string}
- op: issue_refund
side_effect: mutating
input_schema:
type: object
properties:
invoice_id: {type: string}
amount: {type: number}
env:
- name: INITIALIZ_ENFORCEMENT
value: audit_only # observe first — see Step 6Declare every in-process tool the agent calls. Tools you leave out
still run and are still audited, but they surface as
shadow tools
awaiting admission — and once you flip to enforce, an un-admitted tool
fails closed. The full field reference is on
the register page.
Step 2 — register and capture the environment
Run the registration with the token in the environment:
export INITIALIZ_API_URL=https://api.initializ.ai
export INITIALIZ_TOKEN=… # from your secret store
export INITIALIZ_ORG_ID=org_…
export INITIALIZ_WORKSPACE_ID=ws_…
initializ agent register -f initializ-register.yaml > agent.envStdout receives the governed environment as export KEY=VALUE lines
(progress and any warnings go to stderr), so agent.env now holds
everything the Lambda needs: the agent's identity, the platform's policy
and audit endpoints as publicly reachable URLs, the admitted tool ops, and
a per-agent runtime token.
Treat agent.env as a secret — it contains the token. Registration is an
idempotent upsert, so re-running this step (in CI, on every merge) updates
the same agent and is always safe.
Step 3 — wire the environment into the runtime
Apply the returned variables to wherever the agent runs. For the Lambda
example, the -o json output's env object maps directly onto the
function's environment:
initializ agent register -f initializ-register.yaml -o json > register.json
aws lambda update-function-configuration \
--function-name invoice-processor \
--environment "{\"Variables\": $(jq -c .env register.json)}"(Or paste the export lines from Step 2 into your infrastructure-as-code
— the mechanism doesn't matter; the variables do.) On the next cold start
the governance package finds its configuration and activates: model
traffic pins to the managed gateway, every tool call asks for a policy
decision, and audit events ship to the platform over the public ingest
endpoint.
Step 4 — confirm the agent is enrolled
In the console the agent is already on Build → Agents with status ready — an external agent has no build or rollout to wait for — and the Run action disabled, since it runs in your infrastructure, not the platform's. Its Settings notes that it is externally deployed.
Under Enforce → MCP / Tools Registry, the declared ops now exist as custom tools with the agent listed as a dependent, and each lands in the custom-tool review queue on Enforce → Shadow Tools flagged pending. Reviewers acknowledge each op (it stays allowed and audited), block it, or de-register it — close that loop before Step 6.
Step 5 — invoke and verify the trail
Trigger the agent the way it is normally triggered — its own API Gateway route, a test event, its schedule. Then check what the platform recorded:
- Activity / security events — the run appears as its own invocation
timeline: session start, each
llm_callnaming the gateway model and provider with token usage, atool_execpair per tool call with the policy decision attached, and a closing completion event. Failed runs close their timeline too. - The execution list — the run shows up with its transcript, pushed by the SDK's per-invocation snapshot, exactly like a platform-deployed agent's.
- Usage — the run's model calls are attributed to the agent and its provider.
If events are missing, check the Lambda's logs for the SDK's activation
line: an agent that can't reach the platform endpoints, or is missing its
token, logs the failure (and under enforce it fails closed rather than
running ungoverned).
Step 6 — turn on enforcement and operate
Once the timeline looks right and security has reviewed the admitted ops,
flip the enforcement variable on the Lambda from audit_only to
enforce — denied tool calls are now cancelled, not just recorded.
Day-2 operations:
- Rotate or revoke the token. The runtime token is minted per agent
and individually revocable — revoking it cuts off exactly this agent.
Re-run
registerto mint a fresh one, and update the Lambda's env. - Change the tool set. Edit
register.toolsand re-runregister— new ops are admitted (pending review) and the refreshed governed-ops set reaches the agent. - Retire the agent. Delete it from the console or re-register under a new name. Deleting removes the platform record only — there is no workload to tear down; your Lambda keeps running but is no longer governed, so decommission it on your side too.
Deploy a CI-built agent from your pipeline
An end-to-end walkthrough — author the deploy spec, wire a CI job that builds the image and runs the CLI, pass secrets from the pipeline, verify the CI-managed agent in the console, and iterate.
Run an agent on a schedule
Make an agent do recurring work on its own — set the scheduled / autonomous trigger, declare cron schedules, deploy, and verify the runs actually fire.