Here is the question that decides whether an AI agent is safe to run: when it goes wrong, how fast can you stop it? Not "will it go wrong" — agents do unexpected things by nature. The number that matters is your time-to-revoke.

Why you need a kill switch before you need it

An agent can go off the rails in ways you did not script: a prompt injection from a webpage it read, a loop that burns API budget, a tool call that touches data it should not. When that happens, you do not want to be hunting through provider dashboards rotating keys one by one. You want one action that cuts that agent off — now.

If your honest answer to "how do I stop this agent right now?" is "uh, change my OpenAI key and hope," you do not have a kill switch. You have a fire drill.

The options, worst to best

Worst — rotate the shared key. If all your agents share one key, killing a misbehaving agent means rotating the key and re-deploying every other agent. Slow, disruptive, and you will hesitate to do it — which is the real danger.

Okay — per-service key deletion. If each agent has its own provider key, you can delete that one key in the provider's dashboard. Better, but it is manual, per-provider, and only as fast as you can log into each console.

Best — one-click revocation through a broker. If each agent has its own scoped and revocable broker credential, revoking that credential denies new requests through the broker without revoking other agents' credentials. This applies to access routed through the broker, not separate credentials the agent may hold. Rotate a provider key too if it was exposed.

Set it up before the incident

Revocation is something you architect up front, not bolt on during a crisis:

  1. Give every agent its own credential (never a shared one) — you cannot selectively revoke what you cannot selectively identify.
  2. Make sure those credentials are scoped and revocable — so even before you revoke, the blast radius is small.
  3. Keep an audit trail — so when something looks off, you know which agent to cut.
  4. Test the kill switch once, on purpose, so you trust it works.

With Agent Master Key, each connected agent gets its own scoped and revocable amk_live_… key, while provider credentials stay in an encrypted vault on your Mac. Revoke that agent key to deny new requests through AMK without rotating unexposed provider credentials or revoking other agents' keys. Test this with a low-risk call, revoke access, then confirm that a new call is denied. Revocation does not undo completed work or guarantee cancellation of an in-flight provider request. If a real provider key was exposed, revoke or rotate it with the provider as well. Compare broker revocation with 1Password CLI, NoxKey and Keychain workflows. Disclosure: AMK and The AMA Hub are both published by AM Accelerated LLC.

Bottom line

Don't measure your setup by whether agents might misbehave — assume they will. Measure it by how fast you can revoke. If the answer isn't "seconds, one action, this one agent," fix that before you scale up. Start with the basics in is it safe to give AI agents your API keys and how to store API keys for AI agents safely.