How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.

    Take the assessment
    AI Agent Security Checklist

    How to Decommission an AI Agent Safely: Step-by-Step Checklist

    Decommissioning an AI agent safely means revoking its highest-risk runtime permissions first, invalidating every credential and token it holds, confirming that revocation actually took effect, and preserving its audit history in a separate, access-controlled archive. Treat it as a governed identity lifecycle event, not a database deletion.

    Four Phases of Safe Agent Decommissioning

    Safe decommissioning follows four sequential phases. Skipping a phase, or reordering them, reintroduces the exact risks the process is meant to close.

    1. 1

      Freeze

      Stop the agent from initiating new tool calls or API actions.

    2. 2

      Revoke

      Remove permissions in order of risk, not order of convenience.

    3. 3

      Verify

      Confirm revocation independently rather than trusting the revoke response.

    4. 4

      Archive

      Preserve audit history separately before deactivating the identity record.

    AI Agent Decommissioning Checklist

    A condensed, at-a-glance version of the operational practices covered below.

    • Verify revocation independently instead of trusting a success response from the revocation API.
    • Decouple identity records from audit history so deactivating an agent never deletes its historical record.
    • Revoke execute and write access before read access; the sequence matters as much as completeness.
    • Document who initiated the decommissioning, when it happened, and why.
    • Apply the organization's existing log-retention policy to the decommissioned agent's records rather than deciding retention ad hoc.

    Why Agent Decommissioning Needs a Formal Process

    Enterprises that deploy autonomous AI agents often have clear onboarding procedures but no equivalent standard for retiring them. When an agent is decommissioned informally, its identity record may be deleted while its credentials, API keys, or tool-call permissions remain active. This creates orphaned access: a token or service account that still works even though no one is monitoring the agent that held it.

    The risk is not theoretical. An agent's runtime permissions typically span several independent layers, including API keys, OAuth scopes, service-account credentials, tool-call authorizations, and orchestration-layer session state. Each layer can have its own expiry behavior and caching, which means revoking one does not guarantee the others are revoked. A decommissioning process that only deletes the agent's identity record, without addressing every permission layer it touched, leaves gaps that can be exploited or that fail an audit.

    The editorial premise here is straightforward: decommissioning an AI agent should be treated with the same rigor as offboarding a human employee, including sign-off, verification, and a documented record of what was revoked and when.

    Where Decommissioning Gaps Typically Occur

    Most incomplete decommissioning failures trace back to architecture, not process discipline. If an agent's identity record and its runtime credential store are the same object, deleting the identity can wipe out audit history that compliance or incident response later needs. Separating the two, so revoking credentials does not delete the historical record, avoids this tradeoff.

    A second common gap appears in orchestration or MCP-style session brokers: terminating a session at the orchestrator does not always propagate to every downstream tool integration the agent was authorized to call. Confirming that termination reaches all downstream integrations, not just the top-level session, is necessary to close this gap.

    A third gap involves cached or long-lived tokens. Agents with delegated or chained permissions, where one agent grants access to another agent or service, can retain functional access through cached tokens even after the primary credential is revoked. Finally, any decommissioning workflow that lacks a verification step is incomplete by design. Verification means checking identity provider logs, token introspection endpoints, or active session lists after revocation, rather than assuming a revoke call succeeded because it returned a success response.

    Operational Practices for Reliable Decommissioning

    • Verify, do not assume: Treat a revocation API's success response as a request, not a confirmation. Validate with an independent check, such as attempting an authenticated call with the old credential and confirming it fails.
    • Decouple identity from audit history: Store decision logs and permission-change records separately from the live agent registry so deactivating an identity never removes the historical record needed for an investigation.
    • Sequence by risk, not by simplicity: Disable execute and write access before read access. The order in which permissions are removed matters as much as whether they are eventually removed.
    • Document the decommissioning event itself: Record who initiated the offboarding, when, and why, mirroring the recordkeeping standard already applied to human identity offboarding.
    • Align retention with existing policy: Retain decommissioned agent logs according to the organization's existing compliance and record-retention policy rather than deciding retention terms ad hoc per agent.

    Key takeaway

    An agent's permissions can live in several independent systems at once. Closing the identity record is the last step, not the only step.

    Frequently Asked Questions

    Should audit logs be deleted when an agent is decommissioned?

    No. Audit logs and decision histories should be preserved in a retained, access-controlled archive that is decoupled from the agent's live identity record, so historical data remains queryable for compliance or incident investigation after the identity itself is deactivated.

    How do you confirm a credential is actually revoked, not just requested?

    Check the result independently of the revocation call itself, using identity provider logs, token introspection, active session lists, or an attempted authenticated call with the old credential. A revoke request returning success is not proof of invalidation.

    What about permissions an agent delegated to other agents or tools?

    Delegated or chained permissions can persist through cached tokens or downstream trust relationships even after the primary credential is revoked. Decommissioning should include an explicit check for agent-to-agent or agent-to-tool grants, not just the primary identity's own access.

    Bring Governance Rigor to Agent Offboarding

    Trussed AI provides runtime governance, agent identity controls, and audit logging that support consistent permission revocation and verification across an agent's lifecycle.

    Explore Runtime Governance