Skip to main content
Setting up sandboxes takes four parts: a provider connection, a template, a blueprint, and the agent’s sandbox setting. Read the Sandboxes overview first.

Before you start

  • A provider connection. Add an E2B or Modal connection from the Tilde catalog, or from the New blueprint menu. See Connect a managed tool.
  • A reachable gateway. The VM dials out to the gateway’s runtime URL, ENGINE_RUNTIME_PUBLIC_URL, from the provider’s cloud. If you self-host, expose the runtime route to it. See Network exposure.
  • A direct or Lambda agent. Sidecar agents cannot use sandbox tools.

Build a template

Your sandboxes start from an image with anything your agent’s work needs, such as Git and language toolchains. The image must be Linux, with the tilde CLI on the PATH. You do not set a start command.

Tilde sandbox images

Tilde publishes three public Debian images for linux/amd64 and linux/arm64. Each has the tilde CLI of the same release, and common agent tools: Git, Git LFS, the GitHub CLI gh, jq, ripgrep, fd, curl, and build tools. Each image is tagged with its Tilde release, such as 5.2.0, its minor version, such as 5.2, and latest. Pin the release your gateway runs. The images run as root, which GitHub egress needs. On Modal, enter the image reference, such as ghcr.io/trytilde/sandbox-debian-node:5.2.0, as the blueprint’s Container image. On E2B, build an E2B template from it.
In sandbox-debian-full, the first docker command starts the Docker daemon. Docker needs a VM that can run containers, with nested virtualization, such as an E2B sandbox. It does not run on Modal, whose gVisor runtime does not support it.

Build your own image

Install the tilde CLI in any Linux image:
Dockerfile
  • E2B: build the Dockerfile into an E2B template, and note its ID. The sandbox process logs to ~/.tilde/sandbox.log, the first place to look when a sandbox fails to register.
  • Modal: push the image to a registry, or use an image already in Modal, such as im-…. Modal must be able to pull it without credentials, so a registry image must be public.

Create a blueprint

1

Choose a connection

Open Sandboxes, and select New blueprint. Select Use existing connection to choose a ready E2B or Modal connection, or Add new connection to set one up first.
2

Name it, and enter the template

Enter a name. For E2B, enter the E2B template ID. For Modal, enter the Container image.
3

Choose a reuse mode

Under Reuse, the default, Per session, gives every conversation its own sandbox. Read Reuse modes before you choose another. Every other mode lets data cross conversations.
4

Configure the rest

Keep the default timings, or change them. Then add environment variables, blueprint tools, and, in Cloud and Enterprise, egress.
Creating a blueprint launches nothing. Tilde launches sandboxes when agents that use it are invoked.

Timings

Set these when you create the blueprint, or later on its Settings tab. Changes apply to existing sandboxes within a minute.

Environment variables

Add variables on the blueprint’s Environment tab. Tilde exports them in every shell in the VM.
  • Names that start with TILDE_ are reserved.
  • Values are write-only. Tilde encrypts them at rest, and never shows them again. To change one, set it again.
  • A running sandbox picks up changes the next time its process connects, for example after it wakes. New shells then see them.
Every process in the sandbox can read its environment, and so can the agent, through sandbox.exec. Use environment variables for configuration, not secrets. For credentials, use GitHub egress or credential vending.

Blueprint tools

A blueprint’s Tools tab works like an agent’s. Add managed providers, MCP servers, and Tilde tool servers, and switch on the tools processes in the VM may call. See Choose an agent’s tools. Processes call each tool by the source’s slug and the tool name, such as creds.git_credentials, through the local API or the CLI. The agent does not receive blueprint tools.

Egress CLOUDENTERPRISE

A blueprint’s Egress tab lists the connections its sandboxes reach through the gateway, such as GitHub. See GitHub egress.

Give an agent a sandbox

1

Choose the blueprint

Open the agent in the Agent Registry, and select Capabilities. In the Sandbox row, choose the blueprint. An agent has at most one. The change saves at once.
2

Allow the sandbox tools

Make sure the agent’s tools.invoke capability allows the sandbox tools it should use, such as sandbox.exec. The Tools tab now lists them under Sandbox · <blueprint name>.
From the next invocation, Tilde launches or wakes a sandbox before the agent runs. To take the sandbox away, clear the Sandbox row, and confirm Remove sandbox. Removing or changing an agent’s sandbox terminates its sandboxes. Shared sandboxes are terminated once no agent uses the blueprint.

Manage sandboxes

The blueprint’s Sandboxes tab lists every sandbox launched from it, with its status (Starting, Running, Sleeping, or Failed), when it was last used, and its last error. Tilde cleans up failed sandboxes after one hour. Select Terminate to destroy a sandbox. Its files are lost. The next invocation that needs it launches a new one. Edit a blueprint on its Settings tab:
  • A new template applies only to sandboxes launched afterwards.
  • A new connection or reuse mode terminates the blueprint’s sandboxes, and their files are lost.
  • You cannot delete a blueprint while an agent uses it. Deleting it terminates its sandboxes.

Who can manage sandboxes CLOUDENTERPRISE

Sandbox blueprints follow resource access, like connections and tool servers. A blueprint belongs to a team and its creator. Its sandboxes, environment variables, tools, and egress grants follow it.
  • Seeing a blueprint needs view. Changing it, or terminating its sandboxes, needs edit.
  • Creating a blueprint, or adding an egress grant, also needs view on the connection.
  • Giving an agent a sandbox needs edit_sandbox on the agent, and view on the blueprint.
edit_sandbox is separate from edit_tools. A sandbox runs any command the agent chooses, in a VM that holds the blueprint’s environment variables. See Operator access for detail.