An AI agent kill switch is a way to stop an agent from taking any further action, quickly and everywhere it runs. People use the term for three different things: stopping the agent's process, revoking its credentials, or blocking its calls at a gateway. Only the gateway block reliably stops every action within seconds, because it acts at the one place all of the agent's calls must pass.
What are the three meanings of an AI agent kill switch?
| Stop the process | Revoke the credentials | Block at the gateway | |
|---|---|---|---|
| What you do | Kill the container, pod or script | Disable the API keys or tokens the agent uses | Add a revocation that the gateway checks on every call |
| Speed | Fast for one process you can reach | Depends on each provider and on token lifetimes | As fast as the gateway sees the revocation |
| Coverage | Misses replicas, restarts and copies elsewhere | Only the keys you know about; shared keys hit other systems too | Every call that goes through the gateway |
| Precision | Per process | Per key, often shared | Per session, agent, user, token or everything |
| Evidence | Usually none | Provider audit logs, scattered | One record of the revocation and of each refused call |
Why is blocking at the gateway the reliable kill switch?
Stopping the process is the instinct, and it often fails quietly. An orchestrator may restart the pod. There may be other replicas, a scheduled job or a copy of the agent running somewhere else. A tool call already sent keeps going. And in an incident you may not know where every instance runs.
Revoking credentials is stronger, but slow and blunt. An agent may use several keys across several providers. Some tokens stay valid until they expire. A key shared with other services takes them down too. And you have to repeat the work for every provider.
Blocking at a gateway works because the agent has no other way out. If every tool call, model call and outbound connection must pass the gateway, and the agent holds no credentials of its own, then one revocation at the gateway stops everything that agent can do, wherever it runs. It can be narrow (one session) or wide (everything), and every refused call is recorded. Stopping the process and revoking credentials are still useful follow-ups: they clean up, but the gateway is what stops the harm.
That reliability depends on the architecture. A gateway the agent can route around is not a kill switch. The agent's network must only allow traffic to the gateway, and upstream credentials must live in the gateway, not in the agent.
What does a good AI agent kill switch need?
- Scope: stop one session, one agent, one user's agents, one token, a namespace or everything.
- Speed everywhere: effective on every gateway replica within seconds, not only the one you called.
- Fail closed: if the gateway cannot read its revocation list, it should refuse calls, not ignore the list.
- Re-check after waits: a call that was waiting for approval must be checked again before it runs.
- A path that does not depend on the gateway API: a declarative fallback, for when the admin endpoint is unreachable.
- Escalation: block calls first, then suspend or terminate the agent's sessions.
- A record: who pulled it, why, when, and which calls it refused.
What should you test before you need the kill switch?
A kill switch nobody has tried is a hope, not a control. Run a drill in a test environment:
- Revoke one agent while it is calling tools, and time how long until its next call is refused on every replica.
- Check that other agents keep working, so the scope is what you meant.
- Revoke while a call is waiting for approval, approve it, and confirm it still does not run.
- Make the revocation list unreadable and confirm calls are refused, not allowed.
- Use the fallback path with the gateway API unreachable.
- Check that suspend or terminate actually stops the sessions, and that a revoked session gets no new token.
- Find the revocation and the refused calls in the audit trail, and lift the revocation cleanly afterwards.
How does the kill switch relate to OWASP ASI10 Rogue Agents?
The OWASP Top 10 for Agentic Applications for 2026 lists ASI10 Rogue Agents: agents that drift from their intended behaviour or act harmfully. A kill switch is one of the controls most often discussed for it, alongside monitoring and strict limits on what agents may do. A kill switch answers "stop it now"; it does not by itself detect that an agent has gone rogue. See our OWASP agentic mapping for all ten risks.
How does the MAQPNA kill switch work?
In MAQPNA, each kill-switch entry is a revocation, and the gateway checks it on every MCP tool call, model call, agent-to-agent call and egress connection, right after it verifies the token and again after any approval wait. A match is denied with reason revoked. From the kill switch docs:
- Matchers: sessions, agents and users (globs), token IDs (exact, including tokens exchanged from them), or
all. For agent-to-agent calls, every agent in the delegation chain is checked. - Two paths. Break-glass with
maqpna kill --gateway: effective at once on the receiving replica and on other replicas within 250 ms with the Postgres state backend. Or declarative, as anAgentRevocationobject for GitOps: about 1 to 3 seconds with the chart's default config sync. Break-glass entries are mirrored to anAgentRevocationso they persist. - Actions:
block(the default) refuses calls;suspendalso pauses the sessions;terminatefails them and deletes the sandbox and token. A revoked session is never given a new token. - Fail closed: an unreadable or invalid revocation list denies every tool and model call and takes the replica out of service.
- Fallback: with the gateway unreachable,
maqpna kill --emit-yaml | kubectl apply -f -still works through the operator. - Evidence: the revocation and each refused call go into the tamper-evident audit ledger, with the reason you gave.
The kill switch is enforced by the same gateway that holds every call, so the agent cannot ignore it. What MAQPNA does not do is decide for you when to pull it: behavioural anomaly scoring is not built in. The step-by-step sequence is in the kill switch flow, and the on-call version is the kill switch runbook.
Related: how to stop an AI agent deleting a production database, human-in-the-loop approval, what is an MCP gateway and AI agent governance.