Agent-written code needs its own room: limits to set before an agent runs code
Akamai just launched a sandbox for code that agents write. Here is how to decide what an agent may run, reach and spend before it executes anything.
On 27 October 2026 Akamai launched, in beta, Akamai Agent Sandbox, where "the code they write runs in its own isolated environment, sequestered from the agent's runtime." The product matters less than the principle: once an agent can write and run code, the operation needs a room with walls for that code. This article is a vendor-neutral way to design the room.
Why generated code is a different risk
An agent that only drafts text can be wrong. An agent that writes code and runs it can be wrong and act: read a file, call a service, change a record. The code did not exist until the agent wrote it, so nobody reviewed it in advance.
That is why the usual answer, "a person approves every action," stops scaling. The safer answer is to bound what any generated code can do, so a mistake stays small.
What Akamai says it built
According to the announcement, Agent Sandbox is delivered as an open source component of the Spin framework and "uses WebAssembly isolation to set clear limits on compute, memory outbound connections, and system capabilities." Akamai also says it plans to add controls over what agents can reach and what can reach them. The release gives no numeric limits, so treat the design below as ours, not theirs.
- 01Agent decidesits own runtime
- 02Writes codea proposal, not an action
- 03Sandbox runs itwalls: compute, memory, network
- 04Result returnschecked before it counts
Every run leaves a record: input, code, limits, output.
Step 1: separate deciding from doing
Keep the agent's reasoning and the execution of what it writes in different places. If the code misbehaves, it cannot touch the agent's memory, credentials or tools.
Step 2: set four limits per task, not per company
Write them down for each kind of task the agent performs:
- Compute and time: how long a run may last before it is stopped.
- Memory: a ceiling, so one bad run cannot starve others.
- Network: outbound connections denied unless listed. Name the few hosts the task needs.
- System access: which files, secrets and tools exist inside the room. Default to none.
Start tight and loosen with evidence. Loosening is a decision with an owner; tightening after an incident is an emergency.
Step 3: make results earn their way out
Output from the sandbox is data, not truth. Before it updates a record, sends a message or moves money, validate it: right format, plausible range, matches the source. Walls limit damage; validation limits wrong answers. You need both.
Step 4: keep the journal
Log the input, the code the agent wrote, the limits in force and the output. When someone asks why a record changed, the answer should take a minute, not a week.
What to do this week
Pick one agent that already runs code, or is about to. Write its four limits on one page, name who may change them, and run it for a week with the journal on. If you cannot say what it was allowed to reach, the room does not exist yet.