AI agents can retrieve information, use tools, and trigger actions across multiple systems before a security team can assess their decisions. If an agent begins operating outside its authorized purpose, the organization must immediately contain the risk and determine which parts of the business process can safely continue. However, harmful actions unfold faster than human defenders can respond.
Effective containment requires AI-enabled security that detects signs of misuse and automatically triggers controls to restrict an agent’s actions. Enforcement must extend beyond prompts to the agent’s tools, credentials, active context, and stored memory. These controls must also give security teams time to assess an incident and choose an appropriate response. An agent kill switch remains an essential last resort when narrower interventions cannot reliably contain the risk. However, it must be designed to support business continuity, allowing it to stop an affected agent while safe, authorized work continues.
Here are critical steps every organization can take to secure their AI agent deployments:
1. Establish What an Agent Is Allowed to Do
Detecting misuse begins with a clear understanding of an AI agent’s legitimate role. Before deployment, organizations must define the agent’s identity, purpose, accountable owner, and authorized scope. This scope needs to specify which tools it can invoke, what information it can access, and which actions it can delegate.
With those boundaries established, AI-enabled monitoring can assess whether an agent’s activity remains consistent with its assigned task. That assessment must go beyond checking credentials: An agent using valid credentials and permitted tools can still request an inappropriate operation or access information unrelated to its purpose.
When monitoring detects a deviation, the first priority is to limit potential harm Whether the cause is a compromise, faulty instructions, or a routine error, containment must begin before the uncertainty is resolved. Predefined intervention criteria should specify which actions to block, which permissions to restrict, and which cases require human review.
Defining those criteria beforehand requires an understanding of both attack behavior and legitimate operations. Fortinet and FortiGuard Labs bring critical threat research and operational experience to that effort, helping identify suspicious patterns in tool use and data access and linking those signals to proportionate controls.
2. Use Deception to Strengthen Detection
Deception techniques can generate useful detection signals. Deception technologies include deploying decoy assets and credentials to identify credential misuse and lateral movement. Agentic workflows can build on this approach: A canary credential or decoy tool outside an agent’s authorized task, for example, could reveal an attempt to exceed its scope. That signal could trigger a targeted restriction or pause while a person assesses the situation.
For threat researchers, the key question is how reliably these techniques translate into agent behavior. Testing should determine how to interpret the signal in context—including benign discovery and configuration errors—and what response is warranted. Agent-specific applications should also be validated before organizations rely on them for containment.
3. Contain Risk While Preserving Verified Work
Responses must address both potential harm and whatever remains trustworthy. Consider a hypothetical security operations agent investigating suspicious activity. If the agent recommends isolating a production system without verifying its business dependencies, acting on that recommendation could cause as much harm as the threat it is intended to contain.
Unless a preapproved containment policy authorizes an action, an approval gate should pause the isolation request before execution. This gives an analyst time to assess potential operational consequences. Authorized evidence collection can continue as long as the process remains secure and appropriately restricted. If the agent’s identity or working context may be compromised, move supporting work to a trusted process or analyst using trusted tools, and treat suspect evidence as untrusted data.
Graduated containment provides several ways to make that distinction operational:
- Throttle authorized activity. Limit tool-call rates, concurrent tasks, execution time, and the number of retries or delegated steps. This constrains automation loops and creates time to investigate. Unauthorized actions or imminent harm require an immediate block or stronger containment.
- Restrict permissions and connectivity. Remove write access, disable specific tools, or limit network destinations. Use task-scoped credentials with short lifetimes so you can withdraw authority without disrupting unrelated services. Read-only access also warrants scrutiny when sensitive information could be transmitted elsewhere.
- Limit active context. The context window contains the instructions, history, and retrieved content supplied to the model for its next decision. The application can cap how much task data enters that window and restrict retrieval to approved sources. If context may be poisoned, preserve a snapshot and rebuild it from a trusted task definition and validated state. Simply shortening the window is insufficient: It can discard necessary instructions while leaving malicious content in place.
- Restrict persistent memory. Stored conversation history, summaries, and retrieval records can influence later decisions. Limit the records an agent can read or write, separate memory by task or user, apply expiration rules, and quarantine suspect entries. Clearing active context does not remove poisoned persistent memory, and neither operation revokes the agent’s tool permissions.
- Require additional approval. Hold higher-risk actions for review by an authorized person. Bind approval to the specific operation, target, parameters, and scope. A material change should require another decision.
- Pause or isolate the affected work. Suspend the agent or a workflow branch, preserve evidence, and keep suspect outputs from reaching downstream systems. Continue other work only when its dependencies and controls can be independently validated; treat evidence from suspect sources as untrusted data.
These options can be combined according to the incident. They are not a mandatory sequence: Active compromise or imminent harm may warrant an immediate stop.
4. Enforce Limits Where Agents Act
A gateway model offers a practical way to enforce these restrictions. Agent requests to models, tools, APIs, and services must pass through control points that evaluate them before execution. A policy decision point then determines whether a request is allowed, requires approval, or must be denied. An enforcement point at the gateway, tool executor, or receiving service enforces that decision. Both must operate outside the acting agent’s authority.
Agent-aware enforcement should link each request to an identifiable agent, an accountable owner, a delegated task, and an authorized scope. It should evaluate the operation and its parameters, the destination, the resource’s sensitivity, and any delegation involved. In the security operations example above, this means setting separate authorization requirements for evidence collection and production isolation.
AI guardrails can inspect prompts, retrieved content, responses, and proposed tool calls for signs of injection, data leakage, or other policy violations. Tool authorization must still independently verify which actions are permitted. An agent’s claim that an action is safe or that approval has been granted does not constitute authorization. If required approval or policy checks fail, the affected high-risk action should remain blocked.
The architecture must also account for bypass paths. Blocking a single connector is ineffective if an agent can access the same function through another tool or delegate the task to an unrestricted agent. You must cover all relevant execution paths and verify authorization in the systems receiving requests. The agent application and storage controls should also manage context and memory restrictions; a gateway alone cannot enforce every aspect of the workflow.
This separation aligns with OWASP’s AI Agent Security guidance, which recommends enforcing authorization outside the agent’s context, validating approvals for specific tool calls, and isolating and limiting memory.
5. Define Human Decisions Before an Incident
Automated enforcement enables timely intervention, but humans must still define the policies that govern it. Before deployment, teams should agree on which signals trigger restrictions, who can intervene, and when an incident calls for escalation or a complete stop.
Higher-risk actions that require approval should remain blocked until a decision is made. Escalation deadlines and safe fallback procedures should account for situations where no reviewer is available. Organizations should also test whether their staffing and escalation processes can handle the volume of decisions generated by agents.
Reviewers also need evidence to support a decision: what the agent attempted to do, which actions it completed, which restrictions are in effect, and which systems or data may be affected. Without that context, an alert can leave someone responsible for a decision they’re not equipped to make.
6. Design Your Emergency Kill Switch for Business Continuity
An emergency stop should revoke the suspect agent’s authority while preserving the underlying business process wherever it remains safe. This includes halting the affected run through the orchestration layer, revoking its task credentials and sessions, and propagating restrictions to child agents and delegated jobs. You should also block new tool calls at external enforcement points and cancel queued work. In-flight operations require explicit handling: cancel them where supported, determine what has already completed, and reconcile or compensate for completed changes where possible.
Continuity depends on having a tested fallback in place in advance. Keep unfinished work in a protected queue, and hand validated tasks to an analyst, a constrained playbook, or an independently trusted service. For example, a SOC can keep receiving and routing alerts while suspending the suspect agent’s response privileges. The fallback must not automatically inherit the same compromised context, memory, or credentials.
Keep checkpoints and action records outside the agent’s control so a replacement agent or analyst can distinguish completed actions from pending work and reduce the risk of duplicate execution. These records support a controlled handoff, but continuity also requires a tested fallback. A kill switch alone cannot keep the business process running safely. If no safe fallback exists, the affected process may need to be paused.
Before an agent resumes, responders should verify affected systems, address the root cause of the incident, and validate a trusted configuration, context, and memory state. A designated person should authorize restoration, and permissions should be returned incrementally where appropriate. Exercises should test the entire workflow, including revocation, delegated tasks, fallback operations, and safe resumption.
Turn Collaboration into Operational Guidance
Implementing such controls requires cooperation across the agentic ecosystem. Enterprises rely on model developers and tool providers for visibility and enforceable boundaries. Security researchers need operational feedback to evaluate detection methods. Policymakers need to understand where technical controls can support accountability and where gaps remain.
Cyber Frontiers brings together public- and private-sector perspectives on securing agentic AI. Through our participation, we share operational experience while learning from organizations with systems, constraints, and consequences of failure that differ from our own. Comparing approaches helps clarify responsibilities and assess whether proposed safeguards can work when agents interact across organizational boundaries.
The practical value comes from sharing what organizations learn when those safeguards are tested: which observations warranted intervention, how quickly restrictions took effect, whether delegated tasks were halted, and what enabled safe operations to continue. Organizations can apply these lessons to test their own workflows before expanding agent autonomy. Those tests should demonstrate that controls can detect misuse, apply proportionate restrictions, and give an accountable person the evidence and authority to decide what happens next.
By FortiGuard Labs Threat Research
