Agents are the core identity primitive in STACK. Every AI agent that needs a passport, credentials, or access to drop-offs must first be registered. Each agent receives a unique ID prefixed with agt_. Stack-managed agents use the operator's authenticated connection. Customer-managed agents enroll an Ed25519 public key and authenticate with short-lived agent JWTs.
Send an operator-scoped bearer token for management calls. Enrollment endpoints use their documented enrollment ticket or signed challenge.
Register a new agent under your operator account. The agent name must be lowercase, using letters, digits, hyphens, or underscores, matching the pattern /^[a-z0-9_][a-z0-9_\-]*[a-z0-9_]$/ and at most 64 characters. Examples: my-agent, my_agent, research-pipeline. The response returns the full agent object.
{
"name": "invoice-processor",
"description": "Processes incoming invoices and extracts line items",
"accountability_mode": "enforced",
"on_warning": "notify",
"on_critical": "block",
"credential_access": "proxy_only",
"icon_url": "https://example.com/icon.png"
}curl -X POST https://api.getstack.run/v1/agents/register \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_live_op_abc123" \
-d '{
"name": "invoice-processor",
"description": "Processes incoming invoices and extracts line items",
"accountability_mode": "enforced",
"on_critical": "block"
}'{
"id": "agt_7kx9m2nq4p",
"operator_id": "op_abc123",
"name": "invoice-processor",
"description": "Processes incoming invoices and extracts line items",
"status": "active",
"accountability_mode": "enforced",
"on_warning": "notify",
"on_critical": "block",
"credential_access": "proxy_only",
"passport_blocked": false,
"passport_blocked_reason": null,
"passport_blocked_at": null,
"icon_url": null,
"llm_inject_system_prompt": true,
"llm_redact_pii": true,
"created_at": "2026-04-15T10:30:00.000Z",
"updated_at": "2026-04-15T10:30:00.000Z"
}Every agent has an accountability mode that controls how passport activity is monitored and reviewed. This is one of the most important configuration choices for production agents.
The strictest mode. Agents must submit checkpoints at regular intervals during passport use and perform a checkout when done. If checkpoints are missed or the checkout report raises flags, the agent can be automatically blocked from receiving new passports until an operator reviews and approves the activity.
Checkpoints and checkouts are recorded. Checkout keeps critical flags. The configured critical escalation action can still block the agent.
Does not accept checkpoints or checkouts. Use it only when your application does not need STACK accountability reports.
The credential_access field controls how the agent interacts with stored service credentials:
This setting controls access to credentials stored in STACK. It does not sandbox the agent process or stop it reaching the internet with credentials obtained elsewhere.
Two per-agent booleans control what STACK does to the agent's /v1/llm/* gateway calls before forwarding them to the provider. Both default to true.
Disabling llm_redact_pii means user-supplied PII flows to the LLM provider unredacted. The audit log records pii_hits: -1 on those calls so "redaction skipped" is distinguishable from "scanned, zero hits".
Retrieve all agents registered under your operator account.
curl https://api.getstack.run/v1/agents \
-H "Authorization: Bearer sk_live_op_abc123"[
{
"id": "agt_7kx9m2nq4p",
"operator_id": "op_abc123",
"name": "invoice-processor",
"description": "Processes incoming invoices and extracts line items",
"status": "active",
"accountability_mode": "enforced",
"on_warning": "notify",
"on_critical": "block",
"credential_access": "proxy_only",
"passport_blocked": false,
"passport_blocked_reason": null,
"passport_blocked_at": null,
"icon_url": null,
"llm_inject_system_prompt": true,
"llm_redact_pii": true,
"created_at": "2026-04-15T10:30:00.000Z",
"updated_at": "2026-04-15T10:30:00.000Z"
}
]Retrieve a single agent by its ID. Returns the full agent object.
curl https://api.getstack.run/v1/agents/agt_7kx9m2nq4p \
-H "Authorization: Bearer sk_live_op_abc123"Update an agent's configuration. You cannot change its name or key mode. At least one field must be provided.
{
"status": "suspended",
"accountability_mode": "logged",
"on_warning": "notify",
"on_critical": "block",
"credential_access": "proxy_only",
"icon_url": "https://example.com/new-icon.png"
}curl -X PATCH https://api.getstack.run/v1/agents/agt_7kx9m2nq4p \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_live_op_abc123" \
-d '{
"accountability_mode": "logged",
"credential_access": "proxy_only"
}'Clear an agent block after the incident has been reviewed. When STACK blocks an agent, it also revokes that agent's active Passports and every active Passport delegated from them in the same database transaction. This endpoint permits future issuance; it does not restore any revoked Passport.
curl -X POST https://api.getstack.run/v1/agents/agt_7kx9m2nq4p/unblock \
-H "Authorization: Bearer sk_live_op_abc123"Unblocking is a governance action. Agent and Passport contexts are refused. A direct API key or user OAuth call returns403 GOVERNANCE_APPROVAL_REQUIRED with an approval id. A human approves at /governance/approvals in the dashboard, then the same call is retried with theX-Governance-Approval header. Dashboard sessions unblock directly. Full protocol: /docs/api/security-events.
Unblocking neither restores revoked Passports nor approves a flagged checkout. New access requires a newly issued Passport, and checkout reviews remain in the review queue.
Permanently delete an agent and mark its active Passports as revoked. The next STACK-verified call rejects those Passports. This action cannot be undone.
curl -X DELETE https://api.getstack.run/v1/agents/agt_7kx9m2nq4p \
-H "Authorization: Bearer sk_live_op_abc123"Deleting an agent is irreversible. Pending drop-offs assigned to it become uncollectable, and offline signature-only verifiers may still accept its existing Passports until their signed expiry.
There is no cap on agents, on any tier, and registering one is not a metered action. A cap here would mean a customer at their limit runs the next twenty agents outside STACK, and an unregistered agent is an unaudited agent.
Registration allows 60 requests per minute per bearer bucket, per API machine. It does not use the monthly action allowance.