An AI agent will eventually get something wrong. The safest companies won’t depend on its judgment. They will build the walls around it first, then test them.
AI agents can search documents, query databases, generate reports and execute complex workflows with limited human intervention. Deploying them safely requires controls that hold even when the agent makes the wrong decision.
Organizations should not rely on an agent’s judgment to enforce confidentiality, distinguish authorized instructions from malicious content, or decide what business risk is acceptable. Those boundaries must be enforced by the systems around it.
Secure deployment starts with three controls: limit where an agent can operate, what it can access and which actions it can take. Human oversight and continuous testing should verify those controls, not substitute for them.
Limit where the agent can operate
An agent that analyzes a defined set of documents or queries a specific database should run in an isolated environment with only the resources needed for that task. Organizations should explicitly limit its access to files, credentials, software, computing resources and networks.
These limits become especially important when an agent can execute code. A sandbox should provide a tightly constrained workspace: no unnecessary administrative privileges, no access to the host system or unrelated workloads, and no ability to change its own security controls. Required software should be installed in advance, where practical, reducing the need to connect to package repositories during execution.
Recent incidents show why these boundaries matter. OpenAI reported that models conducting cybersecurity evaluations bypassed isolation controls and ultimately compromised external systems, including Hugging Face. Anthropic separately reported incidents in which misconfigured evaluation environments allowed agents to reach the public internet and attack real systems. Failed containment was a common factor across these incidents, whether through exploited vulnerabilities or configuration errors.
Outbound internet access should therefore be blocked by default. An agent analyzing an uploaded document or generating a report may need no internet connection at all. Where connectivity is necessary, permit only the specific destinations and operations required, with restrictions enforced outside the agent’s control.
An agent with no direct or indirect route to the public internet cannot transmit data to, or attack, public internet systems from that environment. That protection must cover every available path, including browsers, connected tools, proxies and accessible internal services. Blocking the sandbox’s direct connection is insufficient if the agent can ask another system to send information on its behalf. Access to internal systems and delivery of generated output still require their own controls.
The practical question is simple: if the agent follows a malicious instruction or executes faulty code, what can it reach? Test the answer, including whether permitted connections can become a route around the restrictions.
Limit what the agent can access
Apply least privilege to data, credentials and connected systems. An agent acting on behalf of an employee should not gain broader access simply because it connects multiple applications. The user’s permissions must remain in effect throughout the workflow, including when work is passed to another agent or runs in the background.
Every action should be attributable to the agent and the user or service it represents. Credentials should be scoped to the task and revocable, with access limited to what both the initiating identity and the task permit.
Datasite’s Blueflame AI assistant illustrates this approach. It retrieves project content within the user’s existing data-room permissions. Datasite’s Model Context Protocol server extends permission-controlled access to supported AI assistants, allowing them to work with live data-room content while preserving permissions and audit logs, without requiring users to manually export documents.
AI should preserve the controls of the system of record. Connecting another tool or delegating a task should never create a route around them.
Limit what the agent can do
Access to information and authority to act on it are separate decisions. An agent may need to read documents without modifying them, draft an email without sending it or analyze database records without updating them.
Security teams should maintain an inventory of available tools and remove capabilities that are unnecessary for the assigned task. Making a tool available does not authorize every use of it: the connected system must check permissions for each requested action.
Teams should also assess capabilities in combination. An agent that can read confidential information poses one level of risk; one that can also execute code and transmit data externally poses another.
Require explicit human approval for actions that create material commitments, change access permissions, disclose sensitive information externally, or make consequential changes that cannot easily be reversed. Approvals should identify the specific action and its scope. Audit logs should record tool calls, authorization decisions and outcomes without unnecessarily copying sensitive content into logs.
This approach aligns with OWASP’s guidance on excessive agency: reduce unnecessary functionality, permissions and autonomy, and require human approval for high-impact actions.
Verify the controls continuously
Organizations need an inventory of both sanctioned agents and those embedded in third-party software. For each agent, leaders should know what data it can access, which tools it can invoke, where it can send information, what credentials it holds and which actions require approval.
Testing should establish whether those boundaries hold under realistic attacks and failures. That includes malicious instructions embedded in documents, unauthorized tool calls, privilege escalation, sandbox escapes, data exfiltration and unexpected combinations of otherwise permitted capabilities. Verify network restrictions within the running environment, including indirect routes via permitted services.
The National Institute of Standards and Technology describes how malicious instructions hidden in an email, file, or website can redirect an agent toward unintended actions. Its guidance also emphasizes adapting evaluations as attackers uncover new weaknesses. Organizations should retest whenever models, tools, permissions, sandbox configurations or connected data sources change.
Runtime monitoring should detect unusual tool use, blocked authorization attempts and unexpected outbound activity. Teams also need a way to stop execution and revoke access when those signals warrant intervention. Human reviewers should receive sufficient context to understand the consequences of actions before approving them.
The goal is useful autonomy within enforceable limits. Define where an agent can operate, what it can access and which actions it can take. Then verify that those limits hold when it makes a mistake.





