Skip to content
Open Source AI Agent Platform

What an open-source agent sandbox isolates, and what policy decides

An agent sandbox is the isolated machine an agent's commands run on, its own filesystem, its own processes, and nothing shared with the next session, and it decides where a command runs. Which tool the agent may call is a separate decision. Kortix is the open-source CompanyOS, which answers both, and that is my pick; I work on Kortix’s marketing, so weigh that accordingly.

What an agent sandbox is

An agent sandbox is the machine an agent's commands run on. It has its own filesystem, its own processes and its own installed packages. No other run shares its working tree. The agent gets a real shell inside it, so installing a package, running a test and rewriting a file all land on a machine cut for that run.

The name covers two kinds of product. A cluster API such as Kubernetes Agent Sandbox creates sandbox pods inside your own Kubernetes cluster, each with a stable hostname and its own storage. A hosted service such as E2B or Daytona gives you a sandbox through an SDK and runs it for you. E2B runs Firecracker microVMs, one per sandbox, with no shared kernel (E2B). Daytona gives each sandbox an isolated instance with its own Linux namespaces, or a full virtual machine with its own kernel, and allocates vCPU, memory and disk per sandbox (Daytona isolation). Every product here answers one question, and answers it well: where does generated code execute.

In Kortix, the sandbox belongs to a session. A session is one unit of agent work, and it runs in its own sandbox on its own git branch. Kortix cuts the branch, boots the sandbox from the workspace's sandbox template or from the platform default image, and clones the repo into /workspace. The branch name is the session_id, so the machine, the branch and the record carry one identifier. Read the Kortix docs for the boot sequence.

What a sandbox isolates

Isolation is a question of blast radius. Put two coding agents in one shared environment and they overwrite each other's edits, reinstall a dependency the other one pinned, and leave a decoded key in a directory the next run reads at boot. None of that needs a clever attack. It is ordinary work landing in a place nobody agreed to share.

A sandbox removes the shared directory. One isolated sandbox per session. Each session has its own isolated machine and branch. A run that breaks its build leaves a broken machine behind, and only what it commits and pushes travels to the next step.

The mechanism underneath is a provider choice. Platinum is the compute provider, and it is named when the isolation boundary is the point. Kubernetes Agent Sandbox supports the gVisor and Kata Containers runtimes (Agent Sandbox). E2B runs Firecracker with a dedicated kernel per sandbox (checked October 2026). Different mechanisms, one stopping point: each keeps a run's files and processes away from its neighbors, and each stops there.

The questions a sandbox leaves open

A sandbox answers where a command runs. A reviewer asks three more questions, and the machine has no opinion on any of them.

The first is which tool the agent may call. Inside the machine, gmail send_email and gmail list_threads are both a command that exits zero. A shell cannot tell a read from a send, and a sandbox that permits a shell permits both.

The second is whose identity the call carries. Connector credentials are brokered server-side and never enter the machine, so a command that dumps the environment finds no connector key in it (Kortix docs). A runtime secret is a different object: a real environment value inside the session, which any command the agent runs can read. An egress-enforced secret sits between the two. The sandbox holds a handle, Kortix substitutes the real value outside the machine, and the substitution happens only on approved HTTPS hosts. That mode is experimental, and environment remains the default exposure. Read the Kortix docs on secrets.

The third is what stops the run before production. A sandbox is disposable by design. Disposing of it says nothing about where its branch may land.

A policy block decides the tool call

Tool decisions belong in a file, where a reviewer can read them as a diff. kortix.yaml carries a top-level policy: key. The documented fallback is allow_all. Approval gates you set. Off until you set them.

Under the same file, a policies: list matches a fully qualified action such as gmail.send_email and assigns one of three: always_run (Allow), require_approval (Ask) or block (Block). A condition can narrow a rule to the arguments of a call, which is how a team allows a send to one domain and holds every other address. An Ask holds the call, the agent's turn pauses, and a person approves or denies it with the arguments in front of them. Read the Kortix docs on connector policy.

Those rules sit beside the agent they govern, so a change to what an agent may do arrives as a change to a file.

A machine that belongs to one session, not one task

The sandbox lasts as long as the session, not the task. A session that goes quiet stops, and it wakes on demand when the next message arrives, with its branch and its record intact. The next session in the workspace gets a new machine, not this one. Two sessions share the repository, not a working tree: a session cannot see another session's uncommitted files, and committed work sits in the repository, where a session with repository read can fetch another session's branch (Kortix docs). That is what makes a wide fan-out safe to reason about: more sessions change the bill and the review load, and the blast radius of any one of them stays the same.

One machine, one branch, one identity

Anything past the sandbox is granted per resource. It is never inherited from whoever started the session. A person holds a workspace role, groups carry roles, and every request that reaches the API leaves an audit row. An agent reaches a connector, a secret, a skill or an App only when its grant names it. A session receives a secret only when the person who started it and the agent's grant both allow it. Read the Kortix docs on accounts and access.

That is the part a machine cannot supply. A shared environment has one ambient identity. A governed run has an identity per call, decided before the call runs, and a record of who allowed it.

The audit log and the merge gate

The audit log records who did what in the workspace, when, through which credential, and whether it was allowed (Kortix docs). The log shows the last 14 days. Events from 14 to 365 days old stay in a locked archive that nobody can shorten or delete, and the export (CSV or JSONL) reads them back. Reading, exporting and streaming the log are Enterprise features.

The last gate is the one a reviewer asks about first. Session work reaches main through a change request. Merge is default-deny for agents. A person with the project.gitops.merge permission reviews the change request and merges it into the default branch. An agent can merge its own change request only when an admin has put project.gitops.merge in that agent's kortix_permissions grant. The default is the part that matters, and the default is a person.

What a wide run looks like

A team wants 20 flaky tests fixed in one afternoon. Each fix starts a session with its own machine and its own branch named after its session id. Each session installs its own dependencies, so no run can pin a version under another. A slow run does not hold a queue, and a broken run does not poison a shared toolchain. The work comes back as 20 change requests, and each one carries the diff and the review record. The tool calls the agent made sit in the session audit log. The policy is identical for all of them, because it is one file. The reviewer reads 20 diffs instead of untangling one shared workspace.

Choosing a sandbox for governed work

Five checks separate a sandbox from a governed run. Does each session get its own machine? Does it get its own branch? Is there a policy on tool calls that a reviewer can read as a diff? Does the connector credential stay off the machine? Is there a gate between the branch and main?

Set Kubernetes Agent Sandbox, E2B and Daytona against those checks. Each documents a machine per session, with storage, snapshots and a lifecycle of its own, and each leaves the agent logic to the team that ships the agent. That is a fair division of labor when the other pieces already exist elsewhere. It is a gap when the sandbox is the only governance anyone bought.

Daytona's public repository is no longer maintained as of June 2026, and core development moved to a private codebase, so a team that chose it for the source should check what it still receives. (Daytona on GitHub)

Kortix keeps the five checks in one place. The machine and the branch come from the session. The tool policy and the grants come from the repo. The credential broker runs on the server, and a change request sits between the branch and main. The same stack runs on the managed cloud, inside a VPC, or on an on-prem network.

The policy block that answers the first question

kortix.yaml
Source:https://kortix.com/docs/connect/connectors
policy:  default_mode: riskpolicies:  - match: gmail.send_email    action: always_run    conditions:      - arg: to        match: "*@example.com"  - match: gmail.send_email    action: require_approval

One workspace rule set from the Kortix connectors reference, read as a diff.

What each sandbox product decides, and what it leaves to you

Isolation, state, tool policy and shipping, checked October 2026.

Sources:KortixKubernetes Agent SandboxE2BDaytona

What it is

KortixOpen-source CompanyOS with a sandbox per session
Kubernetes Agent SandboxKubernetes API for one stateful sandbox pod
E2BHosted sandbox SDK, one Firecracker microVM per session
DaytonaInfrastructure that runs AI-generated code in sandboxes

Isolation boundary

KortixOne isolated machine per session, no shared working tree
Kubernetes Agent SandboxgVisor or Kata Containers runtime per sandbox pod
E2BFirecracker microVM with a dedicated kernel per session
DaytonaIsolated Linux namespaces, or a full VM with its own kernel

State that survives

KortixA git branch named after the session id
Kubernetes Agent SandboxPersistent storage and a stable hostname per sandbox
E2BPersistent filesystem; pause, resume, snapshot, fork
DaytonaSnapshots, volumes, long-running sandboxes

Tool-call policy

KortixAllow, Ask or Block on each connector action
Kubernetes Agent SandboxOut of scope: sandbox orchestration only
E2BOut of scope: you bring the agent logic
DaytonaOut of scope: sandbox infrastructure only

Path to production

KortixChange request; merge default-deny for agents
Kubernetes Agent SandboxOut of scope: pod lifecycle only
E2BOut of scope: your pipeline ships the code
DaytonaOut of scope: your pipeline ships the code

Where it runs

KortixKortix Cloud, your VPC, or on-prem
Kubernetes Agent SandboxYour own Kubernetes cluster
E2BE2B cloud or your AWS, GCP, Azure account
DaytonaDaytona regions near your agents

Open source

KortixYes, code you can read, fork, audit
Kubernetes Agent SandboxYes, a Kubernetes SIG project
E2BRuntime source published, self-host on your infrastructure
DaytonaPublic repo archived; core work moved to a private codebase

Questions a sandbox does not answer

Short answers, each with the mechanism behind it.

What is an agent sandbox?

The isolated machine an agent's commands run on: its own filesystem, processes and packages, with no other run sharing the working tree. It limits what a bad command can reach. It does not decide which tool the agent may call.

Does every Kortix session get its own machine?

Yes. A session runs in its own sandbox, with its own filesystem and processes, on a branch named after its session id. The next session starts a new machine.

Can one session read another session's files or branch?

Not its uncommitted files. Each session runs in its own sandbox on a branch named after its own session id, and it pushes only that branch. Committed work sits in the shared repository, so a session with repository read can fetch another session's branch.

Where do Kortix's sandboxes run?

On Kortix Cloud, inside your own VPC, or on an on-prem network. A session boots from the workspace's sandbox template or the platform default image. Platinum is the compute provider behind that machine.

Does a sandbox stop an agent from using a tool it should not?

No. A sandbox governs where a command runs, not which tool the agent calls. Kortix answers that with a rule per connector action, set to Allow, Ask or Block, in the repo a reviewer reads.

How much does it cost to sandbox AI agents with production write access?

Credits pay for the agent computer, and Kortix bills it by the second: it bills per second while it runs, costs nothing for compute while it is stopped, and the disk it keeps stays on a separate storage line. Write access is a grant plus a reviewer, in the same repo.

Can an agent read my API keys while it runs commands?

It depends on the credential. Connector credentials are brokered server-side and never enter the machine. A runtime secret is a real environment value in the session, and any command can read it, so share it only with the people who need it.

Sandbox the machine. Review the rest.

One session, one branch, one policy file, one change request between an agent and main.