The agent sandbox
The agent sandbox is the set of walls an agent runs inside. An agent can read, write drafts and ask for tools. It cannot run code, make a web request, see a machine, hold a key or reach anything by itself.
It is built from how the platform is put together, not from a separate product: there is nothing to escape from, because the things an attacker would want were never put inside.
Reading the diagram
- Inside the dashed line is all an agent has: its instructions, its tools by name, and one folder.
- Two ways across the line, both the platform's: every call is put to the policy engine, and what passes leaves through the AI gateway with an OBO token.
- Four things are not inside at all: a shell, the web, a filesystem and a credential.
Why it exists
An agent reads emails, attachments and records from other systems, and any of them can try to steer it. Assume one succeeds. What can the agent then do? The sandbox is the answer to that question: only what its tools allow, each call decided by policy, with no key in reach and no other way out.
The walls
| Wall | What it means |
|---|---|
| No code execution | An agent has no shell and runs no code. It has file tools and the tools of the connectors it was granted. Nothing an agent writes is ever executed |
| No web requests of its own | An agent has no tool that calls an API or opens an address. Model calls and connector tools go through the AI gateway. The one other thing it can ask for is a document at a link, which the org's fetcher brings in within the limits on links |
| A folder, not a filesystem | An agent's file tools see one project's or one work's folder. That folder is a prefix of the org's file store, not a disk. There is no host path to climb to |
| No credential | Nothing the agent can read holds a key. What it holds instead is an OBO token. See Identity and delegation |
| One way out | The runtime may connect to the org's AI gateway, its policy engine, its Tenant API and its own state. The network lets nothing else through |
| A locked pod | The runtime runs as a non-root user, on a read-only root filesystem, with every capability dropped, a seccomp profile, and no token for the cluster's API |
| Policy before every call | No decision means no call. See One call, start to finish |
An example
What an agent sees when it lists its files:
project.md
references/
application.pdf
rent-roll.pdf
downloads/
10-k-2025.pdf
working/
credit-memo.md
That is all there is. There is no /etc, no home directory, no other project. What the platform keeps beside a file for its own use is hidden from the agent's tools: they never list it, read it or write it.
What the runtime's pod may connect to:
podSelector: {app: runner}
policyTypes: [Ingress, Egress]
egress:
- to: agentgateway # model calls and tool calls
- to: policy # every decision
- to: tenant-api
- to: document reader # bytes in, numbered lines out
- to: fetcher # a document from a link, within the limits on links
- to: its own state
# default-deny covers the rest: no internet, no other org, no cluster API
How it works
Tools, not code
Agents in many systems are given a code interpreter and asked to be careful with it. Here an agent is given named tools with typed arguments. A calculation is a call to a calculator. Reading a PDF is a call that returns numbered lines. That is less general, and it is the point: every action has a name a policy can decide on.
Reading documents happens elsewhere
Parsing a PDF or a spreadsheet is the riskiest thing a document pipeline does. It is done by a document reader, not by the agent: bytes go in and numbered lines come out. The agent gets the text, by line.
A file is never put in the model whole
Whatever brings a document in, the same thing happens to it: the bytes are kept as a file in the folder, read once into numbered lines, and the agent is given its path, its outline and its length. It then reads the parts it needs.
| Arrives as | What happens |
|---|---|
| An upload | Kept in the folder, read into lines |
| A file a connector returns, such as an email attachment | Kept in the folder, read into lines. The agent gets the path, never raw bytes |
| A document from a link | Downloaded by the org's fetcher, kept in the folder's downloads, read into lines |
| A very large tool result | Kept as a file and read in parts |
Downloads go through the fetcher
The agent's process does not open the address. It asks, the link is held to the limits on links, a link the agent wrote itself waits for a person, and the org's fetcher downloads it.
Reaching a system means a connector
There is no general way to "call an API". If an agent needs something from a system, an administrator adds a connector for it, reviews its tools and gives it. That is slower than letting an agent fetch what it likes, and it is why every outside call has a name, a class and a policy.
The same walls for every agent
An org's own agents, a project's agent, Ask and a monitor all run in the same sandbox. A monitor, which reads untrusted mail, is given the least: it sorts and writes to no one.
What it is not
- It is not a virtual machine per agent. Threads of one org share that org's runtime. Separation between orgs is the data plane's: a namespace, an AI gateway and keys of its own. See One org apart from another.
- It does not make a model right. It limits what a wrong or steered model can do.
What always holds
- Nothing an agent writes is executed.
- An agent makes no web request of its own.
- An agent's files are one folder.
- An agent never holds a credential.
- Every call leaves through the AI gateway, after policy.