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. Registering an agent needs no approval: the owner's own session or API key does it directly, and the new agent has no access to any connected service until a grant is made, which a person approves. This holds whatever settings it starts with.
{
"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 <access token>" \
-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.
Where a new agent starts. Checkpoints and checkouts are recorded and no call waits for a person. Checkout keeps critical flags. The configured critical escalation action can still block the agent. Start here and tighten to enforced when you want per-call approval.
The strictest mode, and the owner's choice. Agents must submit checkpoints at regular intervals during passport use and perform a checkout when done, and each call needs an approved intent. 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. Lowering an existing agent's mode is a deliberate loosening and needs a person's approval from an API key or chat session.
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.
One per-agent boolean controls what STACK does to the agent's /v1/llm/* gateway calls before forwarding them to the provider. It defaults to true. STACK adds no system prompt to a call; the older llm_inject_system_prompt field is still accepted and has no effect.
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 <access token>"[
{
"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 <access token>"Update an agent's configuration, rename it or change its description. You cannot change its key mode. At least one field must be provided.
{
"name": "support-bot-v2",
"description": "Answers support email",
"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 <access token>" \
-d '{
"accountability_mode": "logged",
"credential_access": "proxy_only"
}'Registers an agent, gives it its first grants on connections the account already holds, and declares the hosts those connections' credentials may be sent to, as one approval. The approval card lists every part and binds the whole request, so what runs is exactly what the person saw. A request that cannot succeed (a name in use, a scope the connection does not hold, a malformed host) is refused before anyone is asked. From an API key or OAuth session the first call answers 403 GOVERNANCE_APPROVAL_REQUIRED with an approval link; the approval is decided in the browser, and the same call is repeated with the X-Governance-Approval header. A person in their own signed-in session needs no approval.
{
"agent": { "name": "grocery-bot", "eval_traffic": true },
"grants": [
{
"service_connection_id": "scon_a1b2c3",
"scopes": ["read", "write"],
"constraints": [{ "path": "url.pathname", "op": "starts_with", "value": "/v1/products" }]
}
],
"allowed_hosts": [
{ "service_connection_id": "scon_a1b2c3", "allowed_hosts": ["api.grocer.example"] }
]
}Returns 201 with the agent, the grants made and the host lists set. If a step fails after the agent was registered, the agent is retired and its grants ended before the error is returned.
Resolves every open warning and info event of one agent in one step. New events of the same signal types for that agent are not recorded for the next 24 hours, so what was cleared does not come back. Critical events are never dismissed or hidden by this call. It is the owner's decision: an agent context is refused, and one audit row records who, how many and which signal types. The Console offers it as "Dismiss all for this agent". The response is agent_id, dismissed, by_signal_type and repeats_hidden_for_seconds.
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 <access token>"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 the returned approval URL, https://getstack.run/app/approve/gvr_..., 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 <access token>"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.