Persistent sandboxes are available in preview in Archil’s AWS regions. During the preview period,
sandboxes may be pre-empted, occasionally causing them to stop.
Attaching an Archil disk
You can attach an Archil disk to a sandbox by using the usual command to mount the disk:Passing environment variables
Environment variables can be set for the whole sandbox, for a single command, or both. Variables passed when the sandbox is created apply to every command that runs inside it:env to processes.start:
Starting and stopping sandboxes
A sandbox runs until you shut it down or its TTL expires. There are two ways to suspend one, and they differ in how much state they keep. Stopping a sandbox sendsSIGTERM to every running process and shuts down the VM, leaving the disk intact:
Forking a sandbox
In some situations, you may want to fork a sandbox into multiple branches from a single point in time. This makes it simple to, for example, start sandboxes from a template without needing to incur startup latency for a slow-running program or run parallel experiments on sandbox state from some point in the past. You can fork a running or paused sandbox by calling:newSandbox will be able to run commands independently of the original sandbox, starting from the exact state
of the original sandbox.
During the preview period, all child sandboxes forked from a parent must be deleted before the parent sandbox is deleted.
Hosting network services
Archil sandboxes support the ability to host network services, including creating per-sandbox preview URLs for CI-like workflows. You can create a network service by callingarchil-sandbox services create from within a sandbox.
python3 -m http.server 8080 and proxy traffic to local port 8080.
Choosing a base image
Archil sandboxes can start with any public Linux OCI image, including Docker Hub shorthand likepython:3.13
or full custom image references like ghcr.io/acme/agent-runtime:v2. Private registry images are not supported yet.
If you need private image support, please contact us.
The first time each user starts a sandbox with an OCI image, Archil performs a transformation process to convert this image
into a high-performance format that can be used to quickly start new sandboxes. This transformation only occurs once for
the lifecycle of your Archil account.
Setting a time to live
During sandbox creation, you can optionally specify a TTL for that sandbox’s run between 60 and 28,800 seconds (8 hours). By default, sandboxes are created with a TTL of 8 hours. After this period of time, the sandbox will automatically shut down. During the preview period, sandbox activity does not extend the initial TTL. Restarting a sandbox after its TTL expires will also restart the TTL.Opening interactive shells
By default, processes run without allocating a pseudo-terminal (pty). This is usually desirable, since it signals to the process that it is not in an interactive terminal. However, some commands, such as those that emit color, full-screen tools likevim and top, or tools that need interactive input should instead be launched in a pseudo-terminal.
Provide terminal dimensions to launch a process in a pseudo-terminal. The process can then interactively receive input
and stream output to the caller: