Skip to content

Contain an agent

Use this recipe when an agent’s authority must be removed. Identify the exact agent, environment, resources, and credential bindings before taking action. Broad containment may be appropriate during an incident, but its scope should be explicit.

  1. Inspect the current agent and associated credential bindings.
  2. Apply the supported revocation or emergency-disable action to the intended target.
  3. Inspect affected active sessions and revoke relevant access.
  4. Confirm serving replicas have accepted the new configuration.
Lifecycle / state transitionsAM / 08

Revocation changes what can run

A stateful session starts only after identity, policy, and runtime readiness checks. Active session metadata tracks the route and affinity outside the worker process. Drain stops admission of new stateful sessions while existing work has a bounded completion window. Revocation invalidates affected access. Expired, missing, or revoked state cannot authorize a new call.AdmissionIdentity + policy checksActiveExternal session metadataDrainingNo new stateful sessionsRevokedAccess invalidatedClosedBounded completion

Scroll the diagram sideways to see the full flow →

4 / 4
Revocation invalidates affected access. Expired, missing, or revoked state cannot authorize a new call.
Read the full explanation
  1. A stateful session starts only after identity, policy, and runtime readiness checks.
  2. Active session metadata tracks the route and affinity outside the worker process.
  3. Drain stops admission of new stateful sessions while existing work has a bounded completion window.
  4. Revocation invalidates affected access. Expired, missing, or revoked state cannot authorize a new call.

Attempt a new call with the affected identity and a continuation of an affected stateful session. Both must reflect revoked access. Repeat through the deployed route rather than testing only one process directly.

Locate the administrative action and runtime denial in audit. If either runtime path still succeeds, containment remains incomplete even if the console displays a revoked state.

Investigate the cause before granting access again. Use a reviewed policy and credential relationship, then repeat an allowed test and the negative tests that must remain blocked. Do not reactivate old authority merely to clear an error.

Amelfi documentation · Space Grotesk / Geist Mono