Amazon Web Services released Strands Box, an open-source sandbox for AI agents that pairs operating-system isolation with rules that can weigh what an agent has already done before letting it act again. The tool is in developer preview and runs on Macs with Apple silicon, with Linux support planned.
For teams running coding assistants, the problem Strands Box targets is familiar. Agents read files, run shell commands, execute code they wrote, and call APIs. Many now run in what the industry calls YOLO mode, approving each action with no human review. An agent in that state can leave its working directory, run a destructive command, or pick up a credential meant for something else.
Containers and microVMs can wall off what an agent reaches, but once a tool is inside that wall, isolation has nothing to say about how the agent uses it. An agent can still run a dangerous command, exfiltrate data through an allowed network path, or chain together individually harmless actions into a harmful outcome.
One exit, and it runs through policy
Strands Box puts the agent in a kernel-enforced sandbox and routes its shell commands, Python code, tool calls, and network traffic through four checkpoints. Those checkpoints include a shell interpreter, a Python interpreter, a broker for MCP servers, and a gateway for network traffic. The design goal is to guarantee that the policy layer is the only way out of the box.
Each checkpoint asks the Dogwood Local Engine whether to allow the action. Dogwood is a policy language that was open sourced this year. Anything the engine checks is denied unless a rule permits it. All four checkpoints write to one shared event history, so a rule can link actions across tools.
That cross-tool history matters because agents often combine tools to accomplish a task. A shell command might list a directory, a Python script might parse a file, and a network call might send data to an external service. Looking at each action in isolation can miss the larger pattern. By sharing event history across checkpoints, the policy engine can enforce rules that depend on sequence and context.
A rule can block outbound HTTP requests after the agent reads a file from a customer-data directory, whether a shell command or a Python script did the reading. Other examples include letting an agent run a git push only after tests pass, or capping a payments API at a certain dollar amount per day. In one walkthrough, an incident-response agent may post to a chat channel three times in ten minutes. The fourth post gets an HTTP 403 that names the rule, so the agent knows to wait.
Secrets handling and network gateway
The network gateway also handles secrets. For configured API keys, the agent holds a placeholder token, and the gateway swaps in the real value on the way out. For calls to cloud services, the gateway signs requests. An agent that dumps its environment variables turns up placeholders for those keys.
Secrets management is a persistent challenge for agentic systems. Agents often need credentials to call APIs, but giving them long-lived keys increases risk. A gateway that injects secrets at the network boundary can centralize control, rotate credentials without changing agent code, and log which actions used which secrets. The sandbox design extends that idea by combining secret injection with policy enforcement, so a request can be blocked before the secret is ever attached.
MCP broker and tool mediation
The MCP broker is a checkpoint for tool calls made through the Model Context Protocol, a standard for connecting AI agents to external tools and data sources. MCP servers can expose file systems, databases, APIs, and other resources. A broker that sits between the agent and those servers can enforce policy, log requests, and prevent an agent from reaching tools that are not explicitly allowed. Because the broker writes to the same event history as the other checkpoints, a rule can consider a tool call alongside earlier shell or Python actions.
Tool mediation is important because agents increasingly rely on external services to complete tasks. Without a broker, an agent might call a tool directly and bypass policy checks. With a broker, every tool call can be inspected, allowed, denied, or rate-limited. That gives operators a single place to manage access even as the number of tools grows.
What the tool does not cover
Files that are granted directly to the agent in the configuration file are fenced by the operating system, and reads and writes to them do not reach the policy engine or its history. If a rule is needed to govern a file, it should be left off the direct grant list and reached through the interpreters instead. That gives the policy engine visibility, but it also means developers must think carefully about which files are directly mounted and which are accessed through tools.
The project designers have acknowledged trade-offs. The sandbox has more code that must be trusted, including complex components such as interpreters and protocol interceptors. That trusted computing base is larger than some alternatives. The code is written in Rust, and the team has invested in testing, fuzzing, and validation to improve security. Even so, more code means more opportunity for bugs, and in this space a bug could mean a bypassed policy.
The rules themselves also take work. Dogwood policies can look hard to read and write for people who are not used to policy languages. Frontier coding agents already write them well, and a policy-authoring skill is available to help. A command-line interface that detects installed harnesses and generates a starter configuration and baseline policy is on the roadmap. Those features aim to lower the barrier to adoption, but they do not remove the need for careful review.
Auditability and incident response
A shared event history also provides an audit trail. Security teams can see which actions were attempted, which were allowed, which were denied, and what sequence led to a decision. That matters for incident response. If an agent behaves unexpectedly, investigators can reconstruct the chain of events across shell, Python, MCP, and network checkpoints. The policy engine can name the rule that blocked an action, which helps agents and operators understand what went wrong. In the incident-response example, the fourth chat post receives an HTTP 403 that names the rule, so the agent knows to wait instead of retrying. That kind of feedback can make agent behavior more predictable and easier to debug.
Broader context for agent security
The release lands amid growing concern about autonomous AI agents. Researchers have demonstrated prompt injection attacks that trick agents into ignoring instructions, leaking data, or taking unauthorized actions. Agents that browse the web, read email, or process untrusted documents are exposed to content that may contain hidden instructions. Agents that write and execute code can introduce vulnerabilities or damage production systems. Agents that call APIs can trigger financial transactions, change cloud infrastructure, or modify customer records.
Traditional security controls were not designed for this model. A user account has permissions, but an agent may act on behalf of a user while pursuing a goal that the user did not explicitly authorize. A container has a boundary, but an agent inside the container can still misuse the tools it has. A network firewall can block traffic, but it cannot easily know whether a request is part of a legitimate task or an exfiltration attempt. Policy engines that consider agent history and context are one way to close that gap.
The sandbox approach also aligns with least privilege. Instead of giving an agent broad access and hoping it behaves, the system starts from deny and adds narrow permissions. That model is familiar from cloud IAM, but applying it to agents requires new abstractions because agents act in sequences, not single API calls. The shared event history is a step toward stateful policy, where a decision depends on what came before.
Deployment and availability
Strands Box is available for free on GitHub. The developer preview runs on Macs with Apple silicon, and Linux support is planned. The project is open source, which allows security teams to inspect the code, test the policy engine, and contribute improvements. Open source can accelerate adoption and scrutiny, but it also means users must track updates and understand the security model.
For teams running coding assistants, the tool offers a way to move beyond YOLO mode without giving up autonomy. It does not eliminate risk, and it requires configuration and policy authoring. But it addresses a gap that containers and microVMs leave open: what happens after the agent has a tool inside the wall. By routing shell, Python, MCP, and network actions through a single policy layer, it makes the policy engine the only way out of the box.
The developer preview is available now for Apple silicon Macs. Linux support is planned, and the roadmap includes a CLI that generates a starter configuration and baseline policy. Those additions may make it easier for teams to adopt the sandbox and write rules that match their risk tolerance.
Source: Help Net Security News