Sandboxes
Sandbox = The isolated machine or container that your environment or agent resides in
Supported Providers
| Provider | A sandbox is | Egress allowlist | Needs |
|---|---|---|---|
local (default) | containers on your own Docker | no | Docker |
modal | a Modal container for each env service and agent | yes | a Modal token |
modal_vm | a Modal VM with Docker inside, one per env | yes | a Modal token |
e2b | an E2B sandbox with Docker inside | yes | an E2B API key and template |
sail_vm | a Sail Sailbox, a root VM with Docker inside | yes | the sail extra and a Sail API key |
tensorlake | a Tensorlake MicroVM with Docker inside | yes | the tensorlake extra and a Tensorlake API key |
A deploy_sandbox or deploy_agent step with a network_policy gets a sandbox that only reaches
the hosts the policy allows. A provider that can't enforce the policy refuses the step instead of
creating an open sandbox. To run on a platform that isn't listed, write a sandbox provider
plugin.
Picking a Provider
[sandbox]
default = "local" # envs and deploy_sandbox steps
agent_default = "local" # agentsA comma-separated value, such as "sail_vm,e2b", is a fallback chain: when one provider can't
create a sandbox, the next one is tried. For a single run, --sandbox on agent-env run, or
--env-sandbox and --agent-sandbox on agent-env task run, override the config. A provider's
own settings go in [sandbox.providers.<name>.config], with keys given as secret: or env:
references, never as the key itself.
Modal
modal and modal_vm read MODAL_TOKEN_ID and MODAL_TOKEN_SECRET, or else the active profile
in ~/.modal.toml that modal token new writes, so they need no config table.
E2B
e2b needs an E2B template with Docker and Compose v2. Build one with the Docker Compose example
in E2B's Docker guide, then set
base_template to its name. agent-env builds each sandbox size it needs from that template.
[sandbox.providers.e2b.config]
api_key = "env:E2B_API_KEY"
base_template = "docker-compose" # the template the guide buildsSail
pip install 'agentenv-framework[sail]'[sandbox.providers.sail_vm.config]
api_key = "env:SAIL_API_KEY"agent-env run hello --sandbox sail_vm checks the setup with no model. Sail injects an agent's
model key at its egress, so the key never enters the Sailbox. The sail_vm
README
covers sizes, auto-sleep, egress and cost.
Tensorlake
pip install 'agentenv-framework[tensorlake]'[sandbox.providers.tensorlake.config]
api_key = "env:TENSORLAKE_API_KEY"agent-env run hello --sandbox tensorlake checks the setup with no model. Sandboxes boot from
agentenv-dind-host-v1, a public image with Docker and Compose v2; set image to boot your own.
The tensorlake
README
covers sizes, egress and cost.
Last updated on