---
title: "Keep a switch that turns the agent off · Agent Wranglers"
url: https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models/agent-kill-switch
updated: 2026-10-20
licence: "All rights reserved"
---

# Keep a switch that turns the agent off

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [AI agents and models](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models)
- Rule: Be able to switch off an agent, or one of its tools, for every user at once and without a deploy.
- How: Keep an on or off flag for the agent and for each tool. Store it where it changes without a release, such as a feature flag service or a database row. Check it before every tool call. Write down who may flip it, and test it before launch.
- Check: Flip the switch for one tool on staging. The next call to that tool is refused within a minute, and the agent tells the user it is not available.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers security testing playbook: https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models/agent-kill-switch`.

- Previous: [Check every model answer against a schema](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models/validate-model-output)
- Next: [Run code the model writes in a sandbox](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models/sandbox-model-code)
- [AI agents and models](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models)
