---
id: TIE-AGT-016
title: "Agent kill switch: stop one agent, or all of them, in minutes"
url: https://exchange.trevonix.com/patterns/tie-agt-016-agent-kill-switch-stop-one-agent-or-all-of-them-in-minutes
version: "1.0"
maturity: reference-build
collection: "Agent identity"
category: "Incident response"
last_reviewed: 2026-11-24
problems: ["Rogue or compromised agents","Prompt injection incidents","Runaway automation","Incident response for AI","Orphaned agents after people leave","Regulatory human oversight requirements"]
standards: ["NIST SP 800-61 Rev. 3 (incident response)","EU AI Act Article 14 (human oversight: ability to interrupt)","OWASP Top 10 for Agentic Applications 2026 (ASI10 Rogue Agents)","OAuth 2.0 Token Revocation (RFC 7009)","OAuth 2.0 Token Introspection (RFC 7662)"]
recipes: {ping: reference-build, okta: documented, entra: reference-build, saviynt: documented, misc: documented}
license: CC BY 4.0
publisher: Trevonix
---

# Agent kill switch: stop one agent, or all of them, in minutes (TIE-AGT-016)

**Intent:** Be able to stop a misbehaving agent, a class of agents or every agent quickly and verifiably, by acting on identity, tokens, enforcement points and runtimes in a planned order, and to restore them safely afterwards.

Disabling an agent's identity rarely stops it: issued tokens, grants, keys and runtimes live on. Plan four levels of stop, act on every layer in order, know how long each takes to bite, and prove the agent has stopped.

## In short

- Plan **four levels**: pause one capability, isolate one agent, stop a class of agents, stop all agents.
- At each level act on **every layer**: policy, identity, tokens and grants, enforcement points, credentials held elsewhere, and the runtime.
- Know the **time to effect** (it is bounded by token lifetime unless enforcement points check status), **who may pull it**, and **how to verify** it worked. Test it before you need it.

## Problem

An agent starts sending emails to every customer, deleting records, or following instructions hidden in a document it read. Someone says "turn it off". In practice that means different things in different places: the agent identity can be disabled, but access tokens already issued remain valid until they expire; consent grants and API keys live in SaaS tenants and model providers; a gateway may cache decisions; and the agent's process keeps running and retrying.

Teams without a plan improvise under pressure: they delete the agent identity (destroying the audit trail), miss the API key in the CI system, or block every agent in the tenant because they cannot target one.

> **Why this matters:** Human oversight rules, such as Article 14 of the EU AI Act for high-risk systems, expect people to be able to interrupt an AI system safely. A kill switch you have never tested is not evidence of that ability.

## Use it when

- Any agent that can change data, move money, communicate externally or affect production.
- Agents that process untrusted content (email, web pages, documents) or other agents' output.
- You need to demonstrate human oversight and incident readiness for AI.

## Avoid it, or add more, when

- Never skip it for consequential agents. For read-only, low-tier agents, the standard identity disable may be enough; document that choice.

## Forces

- **Speed against precision.** A tenant-wide block is fast but stops good agents too; a targeted stop needs preparation.
- **Containment against evidence.** Deleting things stops them but destroys what investigators need.
- **Central control against local knowledge.** The SOC can act fast; the sponsor knows what the agent should be doing.
- **Token lifetime against performance.** Short tokens and status checks make stops bite faster but add load.

## Solution

Define the kill switch as a **layered runbook with four levels**, prepared in advance. Every level acts in the same order: first deny at the policy decision point (fastest, most targeted), then disable the identity so no new tokens are issued, then revoke grants, sessions and keys, then block at enforcement points for tokens already in flight, and finally stop the runtime. Disable rather than delete, so logs keep their links. Restore only after review, in reverse order.

![Diagram. Across the top, four levels: L1 pause a capability (deny one action for one agent), L2 isolate one agent, L3 stop a class (a blueprint, a platform or a tier), L4 stop all agents. Down the side, five layers acted on in order: 1 policy decision point deny rule, effective on the next decision;](https://exchange.trevonix.com/img/TIE-AGT-016/tie-agt-016-solution.png)

*Four levels of stop, each acting on every layer in order, with the time each layer takes to bite.*

*Levels*

| Level | Scope | Typical trigger | Who may pull it |
| --- | --- | --- | --- |
| L1 Pause a capability | One action or tool for one agent | Unexpected behaviour on one tool | Sponsor, owner or security operations |
| L2 Isolate an agent | One agent identity | Compromise suspected, sponsor request, high agent risk | Sponsor, security operations, or automated on high risk |
| L3 Stop a class | A blueprint, platform, tier or tool | Vulnerability in a platform or shared tool | Security operations with risk owner |
| L4 Stop all agents | Every agent identity | Systemic attack or regulator instruction | CISO or delegate, break-glass |

*Layers, in order*

| Layer | Action | Time to effect |
| --- | --- | --- |
| Policy decision point | Deny rule for the agent, class or action | Next decision |
| Identity | Disable the agent identity, blueprint or class | No new tokens from now |
| Grants, sessions and keys | Revoke refresh tokens, consent grants, vaulted check-outs; rotate model-provider and SaaS API keys | Immediate for the revoked item |
| Enforcement points | Deny list at the gateway; introspection or continuous access evaluation at resources | Immediate where supported; otherwise up to the access token lifetime |
| Runtime | Stop or scale to zero; pause schedules and triggers; suspend integrations | Minutes |

How it works

1. **Prepare.** For every tier 3 and 4 agent, record in the inventory its identity, blueprint, grants, keys held elsewhere, enforcement points and runtime, and who may stop it. Pre-build the policies you will need (for example a disabled block-all-agents policy) and the gateway deny list.
2. **Trigger.** A named person, or an automated high-risk signal, starts the runbook at the right level.
3. **Act in order.** Deny at the PDP, disable the identity, revoke grants and keys, block at enforcement points, stop the runtime.
4. **Verify.** No new tokens issued, no tool calls in gateway or resource logs, runtime idle, downstream queues drained or paused.
5. **Preserve evidence.** Keep logs, the identity (disabled, not deleted) and the agent's state for investigation.
6. **Restore deliberately.** Fix the cause, re-tier if needed, re-enable in reverse order with the sponsor's approval, and monitor closely.

> **Token lifetime is your stopping distance:** The time your kill switch takes to bite is set by the longest-lived credential still accepted somewhere. Short-lived tokens (TIE-AGT-014) and gateways that check agent status are what turn "disable" into "stopped".

## Design rules

1. **Plan four levels.** Targeted stops need preparation; blanket stops need authorisation.
2. **Act on every layer.** Identity alone leaves tokens, grants, keys and runtimes alive.
3. **Policy first, runtime last.** The fastest targeted control goes first.
4. **Disable, do not delete.** Keep the audit trail intact.
5. **Pre-authorise who may pull which level,** including out of hours.
6. **Verify, do not assume.** Check logs for new tokens and tool calls.
7. **Restore with review.** Re-enabling is a change, not an undo.
8. **Test regularly.** Quarterly for tier 4 agents, at launch for tier 3.

## Anti-patterns

| Anti-pattern | What goes wrong |
| --- | --- |
| Disable the identity and declare victory | Issued tokens, consent grants and API keys keep working |
| Delete the agent identity | Logs lose their link; investigation and restore get harder |
| Only a tenant-wide block exists | Every agent stops because one misbehaved |
| Nobody knows where the agent's keys are | The model-provider key in CI keeps the agent running |
| Kill switch only in the agent's own code | A compromised agent ignores it |
| Never tested | Steps fail, permissions are missing, or the stop takes hours |

## Benefits

- Misbehaving agents stopped in minutes, not hours.
- Targeted stops that do not take down healthy agents.
- Evidence of human oversight and incident readiness.
- Confidence to give agents more autonomy, because stopping them is reliable.

## Costs and risks

- Preparation per agent: recording grants, keys, enforcement points and runtimes.
- Pre-built policies, deny lists and roles that must be maintained.
- Regular tests, including out-of-hours call trees.

## Recipes

### Ping Identity

*Maturity: Reference build; last verified 2026-11.*

Disable the agent identity, deny at the policy decision point and block in-flight tokens at PingGateway. Trevonix has stopped agents by denying their requests at PingGateway in a lab tenant.

*Components*

| Component | Role in this pattern |
| --- | --- |
| AI agent identity in PingOne or Advanced Identity Cloud | Disable to stop new tokens |
| PingGateway | Deny list or route rule for the agent; introspection so revoked tokens fail |
| PingOne Authorize or PingAuthorize | Deny rule for one action or class (L1, L3) |
| PingOne Privilege | Revoke an agent's keys to the AI gateway instantly |

Configure

1. L1: add a deny rule for the agent and action in your authorisation policy and deploy it.
2. L2: in the PingOne admin console under **AI Agents** (or **AI Agents** in Advanced Identity Cloud), disable the agent; revoke its refresh tokens.
3. Make sure PingGateway routes for consequential APIs validate tokens by introspection, or add the agent to a deny condition, so tokens issued before the disable stop working.
4. Revoke any keys the agent holds in PingOne Privilege, then stop the runtime.

### Okta

*Maturity: Documented; last verified 2026-11.*

Deactivate the AI agent record, its linked app and authorization server to stop new tokens; the expanded kill switch revokes active tokens at Agent Gateway. Written from Okta documentation; not lab-tested by Trevonix for this pattern.

*Components*

| Component | Role in this pattern |
| --- | --- |
| AI agent record (Universal Directory) | Deactivate to stop the agent obtaining new tokens |
| Linked OIDC app and authorization server | Deactivate as well, per Okta's kill switch guidance |
| Agent Gateway | Revokes active tokens at the gateway with the expanded kill switch announced in 2026 |
| Resource connections and vaulted secrets | Remove or rotate what the agent could check out |

Configure

1. In the Admin Console, open **Directory > AI agents**, select the agent and deactivate it.
2. Deactivate the linked application and, if it is dedicated to this agent, the associated authorization server; Okta's guidance is that all three are needed to stop new tokens.
3. Where the agent uses Okta's Agent Gateway, use the gateway's kill switch to revoke active tokens.
4. Rotate any vaulted credentials or service account passwords the agent used, and revoke OAuth grants in third-party apps it connected to.

Gotchas

- Okta's kill switch is a manual action today: policy violations and risk signals do not trigger it automatically. Script your own automation through the APIs if you need L2 to start on a signal.

### Microsoft Entra

*Maturity: Reference build; last verified 2026-11.*

Disable an agent identity or its blueprint to stop token issuance; Conditional Access blocks classes or all agents; ID Protection can disable risky agents. Trevonix has disabled governed agents in Entra Agent ID in a lab tenant.

*Components*

| Component | Role in this pattern |
| --- | --- |
| Disable agent identity | Blocks token issuance for one agent (L2) |
| Disable agent identity blueprint | Stops all agent identities created from it (L3) |
| Conditional Access for agents | Block all agent identities, a class by custom security attribute, or high-risk agents (L3, L4) |
| ID Protection Risky Agents report | Response actions including disabling the agent |
| Enterprise applications | Revoke delegated grants and application permissions held by AI tools |

Configure

1. L2: in the Entra admin center browse to **Entra ID > Agents > Agent identities**, select the agent and choose **Disable**. You can select several agents and disable them together. This needs at least the Agent ID Administrator role, or ownership of the agent.
2. L3: browse to **Agent blueprints**, select the blueprint and choose **Disable** to stop every agent created from it, or enable a pre-built Conditional Access policy that blocks agents with a given custom security attribute.
3. L4: enable a pre-built Conditional Access policy that targets **All agent identities** with **Block** for all resources. Keep it created and switched off, and test it in report-only mode.
4. Revoke delegated permission grants and app role assignments held by third-party AI tools under **Enterprise applications**.
5. Stop the runtime in its own platform (for example the Foundry or Copilot Studio agent, or the hosting service).

Gotchas

- Access tokens already issued remain usable until they expire at resources that do not re-check status; plan for that window.
- Conditional Access policies do not apply in some cases (for example when security defaults are on); check the documented boundaries.

### Saviynt

*Maturity: Documented; last verified 2026-11.*

Blocks tool calls at runtime and suspends the agent's identity and entitlements. Written from Saviynt's published material; not lab-tested by Trevonix.

*Capabilities used*

| Capability | Role in this pattern |
| --- | --- |
| Agent Access Gateway | Blocks the agent's tool calls at runtime |
| Identity lifecycle management | Suspends or decommissions the agent and its entitlements |
| Posture management | Shows what else the agent can reach so nothing is missed |

Configure

1. Add a block policy for the agent (or class) in Agent Access Gateway so its tool calls are refused immediately.
2. Suspend the agent identity and remove its entitlements through Saviynt's connectors.
3. Use the posture view to list remaining grants and credentials and revoke them at source.

### Model providers, source control and cloud

*Maturity: Documented; last verified 2026-11.*

Rotate keys, suspend integrations, disable workload identities and pause triggers outside the identity platform.

Most agent credentials outside the identity platform can be revoked quickly if you know where they are: rotate model-provider API keys in the provider's console, suspend the GitHub App or revoke the personal access token, disable the cloud workload identity, and pause the scheduler or event trigger that starts the agent.

## Verification tests

| Test | Expected result |
| --- | --- |
| L1: deny one tool for a test agent | Next call to that tool denied; other tools still work |
| L2: disable a test agent identity | No new tokens issued; sign-in logs show failures |
| L2: call an API with a token issued before the disable | Rejected where the gateway checks status; otherwise accepted only until expiry (measure it) |
| Revoke a consent grant and an API key held elsewhere | Calls using them fail |
| L3: disable a blueprint or class | Every agent in it stops; agents outside it continue |
| L4 in a test tenant | All agent token requests fail; human sign-ins unaffected |
| Restore | Agent works again only after review; events logged |

## Maturity and verification

**Reference build.** Trevonix has stopped governed agents by disabling their identities in Microsoft Entra Agent ID and by denying their requests at PingGateway, in lab tenants (November 2026). The Okta and Saviynt recipes are written from vendor documentation and have not yet been lab-tested by Trevonix for this pattern.

## Frequently asked questions

**Is disabling the agent identity enough?**

Not by itself. Disabling the identity stops new tokens. Tokens already issued work until they expire unless the API or a gateway checks the agent's status. Grants, keys and runtimes elsewhere also need action.

**Who should be allowed to pull it?**

The sponsor or owner for their own agents, and security operations for any agent. Stopping a whole class or every agent needs a senior risk owner or CISO, with a break-glass path for out of hours.

**Should the kill switch trigger automatically?**

Yes, for clear signals such as a high-risk rating from your identity protection tool or a burst of denied actions, start with L1 or L2 automatically and alert a human. Keep L3 and L4 manual.

## References

- [Microsoft Learn: Disable agent identities in your tenant](https://learn.microsoft.com/entra/agent-id/disable-agent-identities)
- [Microsoft Learn: Conditional Access for agents (block high-risk agents)](https://learn.microsoft.com/en-us/entra/identity/conditional-access/policy-autonomous-agents)
- [Okta Support: Understanding the Okta for AI Agents kill switch](https://support.okta.com/help/s/article/understanding-the-okta-for-ai-agents-kill-switch)
- [PingOne: AI agents](https://docs.pingidentity.com/pingone/ai_agents/p1_ai_agents.html)
- [RFC 7009: OAuth 2.0 Token Revocation](https://www.rfc-editor.org/rfc/rfc7009)
- [EU AI Act, Article 14: Human oversight](https://artificialintelligenceact.eu/article/14/)

---

Source: https://exchange.trevonix.com/patterns/tie-agt-016-agent-kill-switch-stop-one-agent-or-all-of-them-in-minutes. © Trevonix. Licensed CC BY 4.0. Provided as is, without warranty; see https://exchange.trevonix.com/about#disclaimer.
