# Introducing Persistent Sandboxes

Source: https://archil.com/post/introducing-persistent-sandboxes

Archil introduces traditional, forkable sandboxes with persistent disk and ability to host network services.

2026-08-28

**Update:** Persistent Sandboxes are now generally available. They are built from parts of Archil that were already in production: the Firecracker runtime that runs Archil's Serverless Execution, and Archil disks, which have served production workloads since October 2024. Each sandbox's root filesystem is an Archil disk, and forks use the same checkpoints and branches.

Today, Archil is releasing [Persistent Sandboxes](https://docs.archil.com/compute/sandboxes/introduction).
Persistent Sandboxes are the easiest way to execute long-running untrusted model-generated code, network services, or interactive development environments that connect to data on your existing Archil disks.

Archil already offers [Serverless Execution](https://docs.archil.com/compute/serverless-execution) for customers who want to give their agents a `run_bash` that works on real Linux machines without needing to manage a sandbox.

However, after working closely with some of the best teams building agentic products, we've identified that some workloads don't actually fit a one-off execution tool. For example, teams need a place to actually run their agent loop, start development servers with preview URLs, or keep expensive-to-start processes alive in memory.

Persistent Sandboxes fill this gap with a familiar API for existing sandbox users, including the ability to specify an OCI base image, vCPU count, and memory.

Each sandbox is its own [Firecracker](https://firecracker-microvm.github.io/) microVM with its own Linux kernel, isolated from the host and from other sandboxes by hardware virtualization rather than shared-kernel containers. See [Isolation](https://docs.archil.com/compute/sandboxes/introduction#isolation) in the docs.

On Developer and above, you write each sandbox's egress policy with the [firewall](https://docs.archil.com/compute/sandboxes/firewall), from `default: "deny"` with no network at all to domain and CIDR allowlists, and use [credential brokering](https://docs.archil.com/compute/sandboxes/firewall#credential-brokering), which adds API keys to outgoing requests so code in the sandbox never sees them. On the Free plan, egress is denied by default: sandboxes can reach only a [managed allowlist](https://docs.archil.com/compute/sandboxes/firewall#free-plan-allowlist) of package registries, Git hosts, OS package mirrors, and model provider APIs.

```typescript
const sandbox = await archil.createSandbox({
  // Sandbox name, for finding later
  name: "agent-workspace",

  // Supports public OCI images
  baseImage: "python:3.13",

  // Select the amount of vCPU and memory
  vcpuCount: 2,
  memSizeMiB: 4096,
});

await sandbox.processes.start("ls -alh").wait()
```

The sandbox remains available across calls, so that long-running processes remain running while the agent is working. If your agent stops or needs to pause, you can stop the sandbox and stop paying for compute without losing its files or installed dependencies.

```typescript
await sandbox.processes.start("echo 'hello world' > ~/test.txt").wait()

// Stop the sandbox, keeping files intact
await sandbox.stop()

// Restart the sandbox and see that the files are still there
await sandbox.start()
await sandbox.processes.start("cat ~/test.txt").wait()
```

When used with an agent loop, Persistent Sandboxes stay alive in between turns, which means that it can follow the entire trajectory of long-running agents, but they can also be [paused with memory snapshotting or forked](https://docs.archil.com/compute/sandboxes/introduction#forking-a-sandbox) so that you can preserve known good states or explore multiple approaches in parallel without rebuilding the environment each time.

A fork checkpoints the sandbox's root disk and branches from that checkpoint. Creating a checkpoint or a branch each takes about 90 ms, regardless of disk size. A sandbox with mounted disks must be stopped before forking.

If your agent produces something interactive, you can also generate preview URLs inside of the sandbox so that you can access network services from the public internet.

```typescript
await sandbox.processes.start("archil-sandbox services create web --tcp-port 8000 -- pnpm run dev").wait()
```

For more complex tasks, Persistent Sandboxes can be combined with Archil disks and Serverless Execution. Teams often store agent context on an Archil disk and need that data to remain strongly consistent across several environments such as:

- Humans accessing a website that uses the Archil [S3 API](https://docs.archil.com/protocols/s3-api)
- The agent's bash tool operates on the context with Archil [Serverless Execution](https://docs.archil.com/compute/serverless-execution)
- The agent loop can now run and mount the same disk inside a [Persistent Sandbox](https://docs.archil.com/compute/sandboxes/introduction)

With Persistent Sandboxes, Archil is a complete sandbox platform, not only the storage underneath someone else's: the agent runs in a Firecracker microVM next to the disk it works on, with no second vendor to set up. If your agents already run on E2B or Daytona, Archil disks still mount there, so you can keep workspace data portable and move compute when you're ready.

Adopting Persistent Sandboxes is reversible. They boot from standard OCI images, and if you keep your agents' workspaces on a disk synced to your own bucket, the files are ordinary S3 objects that any tool can read without Archil. Moving sandboxes to another provider means mounting the same disk there. See [data ownership and portability](https://docs.archil.com/reference/data-ownership).

Persistent Sandboxes are a powerful new way to run agents entirely inside of the Archil cloud, and they're available now in Archil's public AWS regions and in BYOC deployments on any cloud or bare metal (see [region availability](https://docs.archil.com/reference/regions#compute-availability)). Get started now by generating an API key on the [Archil console](https://console.archil.com/?utm_source=archil.com\&utm_medium=website\&utm_content=blog-introducing-persistent-sandboxes), or [contacting our sales team](mailto:sales@archil.com) to get BYOC set up in your cloud in about an hour.
