Skip to Content
AgentShield
Fundamentals

Credential Lifecycle

Register, rotate, suspend, resume, and revoke agent credentials, and what the gateway does at each stage.

An agent's credential is its Ed25519 public key. The control plane manages its lifecycle; the gateway enforces it on every request.

States

Agent statusCredentialGateway behavior
activeone active keyRequests authenticate and are evaluated by policy
suspendedkey stays activeRequests authenticate and are denied: agent is suspended
revokedevery key revokedRequests are denied: agent is revoked. Permanent

Suspended and revoked agents are denied with a recorded, audited decision rather than a bare 401. You can see exactly what a disabled agent tried to do.

Operations

All operations are on the control plane and require a bearer session.

OperationRouteRolesEvent
RegisterPOST /api/v1/agentsowner, admin, operatoragent.registered
Rotate keyPOST /api/v1/agents/{agentId}/credentials/rotateowner, admincredential.rotated
SuspendPOST /api/v1/agents/{agentId}/suspendowner, adminagent.suspended
ResumePOST /api/v1/agents/{agentId}/resumeowner, adminagent.resumed
RevokePOST /api/v1/agents/{agentId}/revokeowner, adminagent.revoked

Register

curl -s http://127.0.0.1:8080/api/v1/agents \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"name":"billing-agent","framework":"langgraph","public_key":"<43-char base64url>"}'

The public key must decode to exactly 32 bytes. Names are unique per organization, and a public key can be registered only once across the system (409 conflict otherwise).

Rotate

Rotation needs an active agent with exactly one active credential. It marks that credential rotated and stores the new public key as active, in one transaction:

curl -s -X POST http://127.0.0.1:8080/api/v1/agents/$AGENT_ID/credentials/rotate \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"public_key":"<new 43-char base64url>"}'
{ "id": "…", "agent_id": "…", "algorithm": "ed25519", "fingerprint": "<sha256 hex>", "status": "active" }

Rotation is immediate. Requests signed with the old seed fail authentication as soon as it commits.

Generate a new seed on the agent host and derive its public key.

Call rotate with the new public key.

Restart or reconfigure the agent with the new seed.

Destroy the old seed.

A suspended or revoked agent cannot be rotated.

Suspend and resume

Suspend changes the agent status and leaves the key in place. Use it to stop an agent quickly while you investigate, without forcing a key change. Resume returns a suspended agent to active. A revoked agent cannot be resumed.

Revoke

Revoke sets the agent and every one of its credentials to revoked and records revoked_at. It cannot be undone; the console asks for confirmation. Register a new agent if the workload needs to run again.

Validity windows

Credentials carry not_before and an optional not_after. The gateway treats a credential as active only inside that window. The control plane's registration and rotation routes create credentials that are valid from creation with no expiry.

When to use which

SituationAction
Seed may have leakedRotate immediately, then investigate events signed with the old key
Agent behaving unexpectedlySuspend, review events and incidents, then resume or revoke
Workload retiredRevoke
Scheduled hygieneRotate on your own schedule; AgentShield does not expire keys automatically

Was this page helpful?

On this page