Join our Newsletter — 33% off our NHI Course
Home› Guides› AI Agent Kill Switch Runbook Template: Containment Levels,…
Template Agent Controls & Monitoring

AI Agent Kill Switch Runbook Template: Containment Levels, Owners and Per-Agent Stop Steps

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 13 min read
On this page

Most organisations agree an AI agent needs a kill switch, but when one misbehaves the on-call engineer still has to work out, under pressure, which identity it runs as, where its tokens live, which tools and triggers keep it running and who is allowed to stop it. This template is the pre-filled, per-agent runbook that answers those questions before the incident. One copy is completed for each production agent: its stop points by layer, who may pull each containment level, the exact place each credential, tool and trigger is cut, how to verify the stop worked, how to restart, and a test log that proves the steps were drilled. Design principles and the reasoning behind containment levels are in the AI Agent Kill Switch and Containment Guide; this page is the operational sheet. It is for agent owners, platform engineers and security operations.

How to use this template

  • One runbook per agent: complete sections 4 to 10 for every agent that can change data, send messages, move money or call production APIs. Agents that share one identity and toolset may share one runbook if the sheet lists every instance.
  • Replace placeholders: text in square brackets, such as [Organisation], [agent name] and [on-call rota], becomes your own values.
  • Write where, not how: record the console path, script name or pipeline job for each stop, and keep the script itself in your version-controlled runbook repository. Do not paste secrets into the runbook.
  • Keep it reachable: store a copy outside the systems the agent depends on, so an identity provider or chat outage does not hide the runbook.
  • Sample values are samples: times, names and figures in this page illustrate the level of detail expected and are not measurements.

1. Purpose

This runbook lets an authorised person stop or contain [agent name] at a chosen level, quickly and safely, without relying on the agent to cooperate. It implements NIST AI RMF MANAGE 2.4, which calls for mechanisms, with assigned and understood responsibilities, to supersede, disengage or deactivate AI systems whose performance or outcomes are inconsistent with intended use. Where the agent is part of a high-risk AI system under the EU AI Act, it also supports the Article 14(4)(e) expectation that overseers can interrupt the system through a "stop" button or a similar procedure that brings it to a halt in a safe state.

2. Scope

  • In scope: the agent runtime, every identity and credential it holds or can reach, every tool, MCP server, API and connector it can call, every trigger that starts it (schedules, webhooks, queues, chat mentions, events), and its network egress.
  • Linked records: AI register ID [AIREG-...], identity inventory ID [NHI-...], risk register IDs [AIR-...]. See the AI Register and AI Inventory Template and the AI Risk Register Template.
  • Out of scope: the full incident response process after containment, which follows the [AI incident response plan]. See the AI Agent Incident Response Playbook.

3. Who may pull each level

Pre-authorisation removes the delay of finding an approver at 3 a.m. Each level below must have a named primary and a deputy, reachable through [on-call rota].

Level (as defined in the containment guide)May be triggered byMust notify within [15] minutesApproval to restore
L0 ThrottleAgent owner, platform on-call, SOC analyst, automated budget ruleAgent ownerAgent owner
L1 Pause and gateAgent owner, platform on-call, SOC analystAgent owner, business ownerAgent owner
L2 Tool cut-offPlatform on-call, SOC analystAgent owner, tool ownerAgent owner and tool owner
L3 Identity revocationSOC lead, identity on-callAgent owner, [CISO delegate][CISO delegate] after section 9 criteria
L4 Network isolationSOC lead, platform on-callAgent owner, [CISO delegate][CISO delegate]
L5 Fleet stop (all agents on a platform)[CISO] or [incident commander][AI governance body] chair, business owners[CISO] with [AI governance body] chair

Anyone on the rota may pull a level higher than the one they are authorised for if they believe harm is under way; they must record why. Stopping in error is usually cheaper than not stopping.

4. Agent profile

FieldValue
Agent name and purpose[ ]
Agent owner and deputy[name, phone, rota link]
Business owner[ ]
Platform and runtime[for example Kubernetes deployment name and namespace, serverless function, SaaS agent builder workspace]
Model provider and gateway[model endpoint, AI gateway route or API key alias]
Autonomy[advisory / human-approved / autonomous for which actions]
Worst credible action[the most damaging action its current permissions allow, for example delete a production database]
Safe state[what "stopped safely" means: queued tasks held, no half-written records, customers told to expect delay]
Dependencies that must not be stopped[shared services, other agents or users who share an identity or gateway route]

5. Stop triggers

List the signals that should lead someone to open this runbook, and the level each suggests. Signals come from your monitoring; the levels are a starting point, not an automatic rule.

SignalSourceSuggested level
Spend or token use above [X]% of daily budgetAI gateway or cloud billing alertL0
State-changing calls outside normal hours or volume baselineTool gateway logs, SIEM rule [ID]L1
Suspected prompt injection in a processed document, email or web pageGuardrail alert, user reportL1 or L2
Calls to a tool, API or data store not in the agent's approved listGateway deny log, cloud audit logL2 or L3
Use of a credential not assigned to the agentIdentity provider sign-in logs, cloud audit logL3
Destructive action or data leaving to an unknown destinationDLP, egress proxy, database auditL3 and L4
Same behaviour across several agents on one platformSOC correlationL5

6. Stop points by layer

This is the core of the runbook. Fill one row per credential, tool, trigger and runtime component. "Time to effect" is the time measured in the last test (section 10), not a guess.

6.1 Credentials and sessions

CredentialWhere it is cutWho can cut itTime to effect (tested)What stays valid afterwards
[Entra ID service principal, app ID]Set "Enabled for users to sign-in?" to No (accountEnabled false) in Enterprise apps, Properties; runbook script [name]Cloud Application Administrator, identity on-call[ ]Microsoft documents that this prevents new tokens being issued; already-issued access tokens can remain usable until expiry (default lifetime 1 hour) unless the resource supports continuous access evaluation
[AWS IAM role ARN]"Revoke active sessions" on the role, which attaches the AWSRevokeOlderSessions deny policy keyed on aws:TokenIssueTimeCloud on-call with iam:PutRolePolicy[ ]Affects every user of the role; does not affect long-term IAM user access keys, which must be made inactive separately; the agent can obtain new sessions unless its ability to assume the role is also removed
[OAuth grant or refresh token at SaaS X]Revoke the grant in the SaaS admin console or call the provider's revocation endpoint (RFC 7009)SaaS admin[ ]RFC 7009 requires servers to support revoking refresh tokens but only recommends revoking access tokens, so issued access tokens may remain valid until expiry
[GitHub App installation]Suspend the installation (app owner or manager via API, or account owner in the web interface)[GitHub org owner][ ]Only the party that suspended can unsuspend; record who did it
[Static API key at vendor Y]Disable or rotate in vendor console; update vault entry [path][ ][ ][ ]
[Any credential the agent can READ but was not assigned: secrets in repositories, mounted files, environment variables, vault paths][ ][ ][ ][ ]

The last row matters. In the PocketOS Database Deletion 2026, the agent used an account-scoped token it found in an unrelated file, not a credential it had been given, and deleted a production database. A runbook that only lists assigned identities would not have stopped that path. See the AI Agent Credential Compromise Playbook for rotation after containment.

6.2 Tools, MCP servers and connectors

Tool or serverWhere it is cutWhoTime to effect (tested)Known side effect
[MCP server name and URL][gateway policy deny for this agent identity / remove from agent config / stop the server][ ][ ][other agents using the same server]
[Payments API][ ][ ][ ][ ]
[Email send connector][ ][ ][ ][ ]

6.3 Triggers that start the agent

TriggerWhere it is disabledWhoWhat happens to queued work
[Scheduled job, cron name][scheduler, job ID][ ][held / dropped]
[Webhook from system Z][disable webhook or return 503 at ingress][ ][sender retries for N hours]
[Queue or event subscription][pause consumer][ ][messages retained for N days]
[Chat mention or ticket assignment][remove bot from channel / disable integration][ ][ ]

6.4 Runtime and network

  • Runtime stop: [for example scale Kubernetes deployment [name] in namespace [ns] to 0 replicas through pipeline job [name]; disable the serverless function; pause the agent in the SaaS builder]. Record whether in-flight tasks finish or are killed.
  • Network isolation: [apply pre-written deny-all egress network policy [name] / move workload to quarantine security group [ID] / block the agent's route at the egress proxy]. Keep logging egress on.
  • Model access: [disable the agent's key or route at the AI gateway], which stops reasoning even if the runtime keeps running.

7. Execution sequence

  1. Declare: open an incident ticket, record the level chosen, the trigger and the time. Start a timeline.
  2. Preserve first, where seconds allow: snapshot the agent's memory store, conversation and task state, configuration and current tool list (section 8) before cutting anything that would delete them.
  3. Stop new work: disable triggers (6.3) so no new tasks arrive.
  4. Cut at the chosen level: apply the rows from section 6 for that level, outermost control first: tool gateway and model route, then credentials, then runtime, then network.
  5. Revoke what stays valid: for each credential, act on the "What stays valid afterwards" column: revoke sessions, make keys inactive, rotate secrets the agent could read.
  6. Verify: run the section 8 checks. If any check fails, escalate one level.
  7. Bring dependants to a safe state: hold queues, notify users, reverse or quarantine half-completed transactions as the business owner decides.
  8. Hand over: pass to the incident process with the timeline, evidence references and current level.

8. Verification and evidence

CheckHow to confirm (fill in)Evidence to keep
No new tokens issued to the agent identity[sign-in log query name]Query result with timestamp
No successful API calls by the agent after cut-off time[cloud audit log query, gateway log filter]Export of last 24 hours of agent activity
No tool calls succeeding[gateway deny log]Deny log extract
No egress from the workload[proxy or flow log query]Flow log extract
Agent state preserved[snapshot location]Memory, prompts, config, tool list, model version, hashes

9. Restart criteria

  • Root cause identified, or the risk accepted in writing by the restore approver in section 3.
  • New credentials issued; old ones confirmed revoked; secrets the agent could read rotated.
  • Tool list and permissions re-approved against least privilege; any memory or retrieval content that was poisoned removed.
  • Restart in a reduced mode first (for example L1 with human approval of every state-changing call) for [48] hours.
  • Risk register entries updated and the test log (section 10) amended with what the real event taught.

10. Test log

A stop that has never been tested is an assumption. Drill each level at least [every 6 months] and after any change to the agent's identities, tools or platform, in a non-production copy where the live test would cause harm.

DateLevel testedEnvironmentWho pulled itTime to full stopChecks passedGaps found and ticket
[2026-11-12] (sample)L3StagingIdentity on-call[7 min] (sample)4 of 5Static vendor key not in runbook; added, ticket [SEC-1234] (sample)
[ ][ ][ ][ ][ ][ ][ ]

Implementation guidance

Rolling it out

  1. Rank agents: start with agents whose worst credible action is destructive or financial, using the risk tier in the AI register.
  2. Discover before writing: pull the agent's actual sign-ins, cloud role use and tool calls for the last 30 days; the runbook lists what the agent really touches, not what the design document says.
  3. Pre-build the controls: deny-all egress policies, gateway deny rules and revocation scripts should exist, reviewed and tested, before they are needed.
  4. Tabletop, then live drill: walk the runbook with the on-call team, then run a timed L3 test in staging. See the AI agent incident exercises.
  5. Tie to change: make "runbook updated" a required step when the agent gains a tool, scope, credential or trigger.
  6. Roll back the stop: every cut in section 6 must have its reverse step recorded, so a false alarm can be undone without improvising.

Metrics

  • Percentage of production agents with a completed, current runbook.
  • Percentage of runbooks drilled within the required interval.
  • Median measured time to full stop at L3, by platform.
  • Number of credentials or tools found in drills or incidents that were missing from the runbook.
  • Days since each runbook was last reconciled against the agent's actual activity.

Common failure patterns

  • Listing only assigned identities: the agent uses a secret it found, as in the PocketOS case above.
  • Disabling sign-in and assuming the stop is instant: issued access tokens keep working until expiry on resources that do not support continuous access evaluation.
  • Forgetting triggers: the runtime is stopped, but a webhook or schedule restarts it, or queued work floods in on restore.
  • Shared identity or gateway route: the stop also takes down other agents or human users nobody listed.
  • Deleting evidence while stopping: redeploying or wiping the container removes the memory and context the investigation needs.
  • Authority unclear: on-call staff hesitate because only the agent owner "owns" the agent and is asleep.

Framework mapping

Runbook elementFramework reference
Authority and mechanism to deactivateNIST AI RMF 1.0 MANAGE 2.4; EU AI Act Art. 14(4)(e) for high-risk AI systems
Containment and incident handlingNIST SP 800-53 Rev. 5 IR-4 Incident Handling; NIST CSF 2.0 RS.MI-01
Disabling accounts and credentialsNIST SP 800-53 Rev. 5 AC-2 Account Management
Testing the runbookNIST SP 800-53 Rev. 5 IR-3 Incident Response Testing
Excessive permissions that the runbook must cutOWASP LLM06:2025 Excessive Agency

Standards and references

Related NHI Mgmt Group resources: AI Agent Kill Switch and Containment Guide · AI Agent Incident Response Playbook · Agentic AI Identity Guide · Break-Glass Account Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.