Security and platform engineers implementing their first enforceable agent policy.
How to control invoke_tool against all production tools for a compromised agent without blocking routine agent work.
The control gap
Incident response needs a fast control that stops new side effects without waiting for every downstream credential to be rotated.
Containment must be faster than downstream credential rotation. A kill-switch rule should match a stable agent identity across tools and reject new production actions at the shared decision point. Keep a separately authenticated incident path for activating the rule, and test it before an incident with harmless calls in a controlled environment.
A global deny is only the first response step. Preserve attempted calls after activation, identify active credentials and outstanding approvals, revoke queued work, and rotate downstream secrets. Re-enablement should require a new reviewed policy version rather than removing evidence of the containment period.
Define containment scope before an emergency: one principal, all versions of an agent, a workload, project, environment, tool family, or the entire organization. A broad switch should be possible, but operators need to see its blast radius and any explicitly documented continuity paths before activation.
Activation should not depend on the compromised agent's normal credentials. Require a strongly authenticated owner or incident role, record the incident identifier and reason, and publish the deny through a short independent path. Policy caches must honor revocation promptly instead of serving a stale allow for their ordinary lifetime.
Run a drill that includes calls already queued, approvals waiting for humans, grants issued but not consumed, active streams, and provider operations already started. Endram can stop new decisions and revoke local authority; it cannot undo an external side effect already accepted, so the response plan must include each provider's containment procedure.
What good looks like
A narrow policy that can be tested in shadow mode, reviewed with owners, and promoted to enforcement with measurable impact.
- Match the concrete action "invoke_tool" rather than every operation exposed by the tool.
- Scope the target to all production tools for a compromised agent and the production environment.
- Require a request-bound approval that expires and cannot be reused.
- Record denied attempts as well as approved executions.
A production workflow
- Copy the template and replace example identities and resource selectors.
- Run it in shadow mode against representative requests.
- Review false positives, missing resource attributes, and approver routing.
- Enable enforcement for one agent and expand only after reviewing the decision log.
A policy you can test
AI agent emergency kill switch policy is a concrete starting point, not a claim that one generic rule fits every environment. Replace example identities and selectors, validate the request shape, and begin in shadow mode.
name: compromised-agent-kill-switch
match:
agent.id: ["agent_compromised_example"]
environment: production
decision: deny
reason: incident_response_containmentEndram keeps the policy version with every decision. A later change creates new evidence instead of rewriting why an earlier request was permitted.
Evidence to require
- Every attempted invoke_tool, including denied requests.
- The exact all production tools for a compromised agent selector evaluated by policy.
- The requesting agent, delegated user, reviewer, and timestamps.
- Policy version, matched rule, decision reason, and execution result.
Buyer checklist
- Does the selector cover only the intended production resources?
- Who owns the approval queue outside business hours?
- What is the acceptable approval expiry?
- Which emergency identity may bypass the rule, and how is that use audited?
Practical answers
Common implementation questions
Can I use this policy as written?
Use it as a reviewed starting point. Replace example identities, actions, and resource selectors, then validate it in shadow mode against your actual tool-call shape.
Why use approval instead of a permanent allow?
Approval preserves a low-friction path for exceptional work without turning a one-time need into standing access.
Does a denied call appear in the audit trail?
Yes. Denied and expired requests remain part of the decision log so control owners can tune policy and investigate attempted actions.