Skip to main content
Once an administrator has set up Azure sandboxes, you use them by asking a Genesis agent in plain language. The agent starts the sandbox, moves data in, runs the code, brings the results back and stops the sandbox. You do not need to know Azure or write any code yourself.

Prompts to try

Say Azure sandbox in your request so the agent uses Azure rather than another sandbox type. If you have more than one Azure connection, name the one to use.
The agent queries Snowflake with Genesis’s own Snowflake connection, uploads the result into the sandbox as a file, runs the analysis there and downloads the CSV. In testing, a run like this moved about 196,000 transactions into the sandbox, produced a 99-row CSV, and its grand total matched a separate Snowflake query to the cent.
Attach the script and the data to the chat, or point the agent at a file in a Genesis repository. The agent uploads both and runs the script.
The agent installs packages with pip install inside the sandbox. They stay installed until the sandbox stops.
The agent writes the files in the sandbox, then downloads them and saves them where you ask, for example a Genesis repository, or shows their contents in the chat.
Files and packages persist between commands, so you can build on earlier steps. Stop it when you are done, or it stops on its own after its idle timeout.

What to expect

Images

By default a sandbox runs Python 3.11 on a slim Debian Linux image (python:3.11-slim). Genesis pulls it from Microsoft’s mirror at mcr.microsoft.com/mirror/docker/library/python:3.11-slim rather than from Docker Hub, because Docker Hub limits anonymous downloads from the shared addresses Azure Container Instances uses. Asking for python:3.11-slim by name also uses the mirror. To use another image, such as one your team builds with your own tools and packages already installed, ask the agent to start the sandbox with it. Any image other than python:3.11-slim is used exactly as given. It must be a Linux image that includes /bin/sh and these standard tools, which every image based on coreutils or BusyBox has: base64, sha256sum, cat, cut, wc, cp, dd, tr, mkdir and rm. Genesis also uses stty when the image has it.
Prefer images from Microsoft Container Registry (mcr.microsoft.com) or your own Azure Container Registry. Images pulled anonymously from Docker Hub can fail with An error response is received from the docker registry 'index.docker.io'. Please retry later.

Private registries

To pull an image from a private registry, such as your own Azure Container Registry, the agent passes the registry’s address and credentials when it starts the sandbox: Use credentials that can only pull images, and only from the repositories the sandbox needs.
Private registry support is in place but was not tested end to end at launch. Try it in a non-production resource group first.

Size

Each sandbox gets 1 vCPU and 1.5 GB of memory by default. Ask for more when the work needs it, for example “start an Azure sandbox with 2 CPUs and 8 GB of memory”. The agent passes cpu_cores and memory_gb. The largest size you can get depends on what Azure Container Instances offers in your region and on your subscription’s quota; see Azure Container Instances resource availability. Azure bills for the size you ask for while the sandbox runs.

Region

Sandboxes run in the Region set on the Azure connection, or eastus when it is empty. The connection’s approved network access covers that region’s command endpoint only, so Genesis refuses a request to start a sandbox through the connection in a different region. To use a second region, ask an administrator to create a second Azure connection for it.

Run inside your virtual network

By default the sandbox can reach the internet, which is what lets it install packages. To control what it can reach, or to let it reach private resources in your network, attach it to a subnet in your own Azure virtual network with the subnet_id option, set to the subnet’s full resource ID:
Azure requires:
  • The subnet is delegated to Microsoft.ContainerInstance/containerGroups.
  • The subnet is in the same region as the sandbox.
  • The service principal may join that subnet, for example through Network Contributor on the virtual network, or a role that includes Microsoft.Network/virtualNetworks/subnets/join/action on the subnet.
The sandbox’s outbound traffic then follows your virtual network’s routes, network security groups and firewall. A sandbox in a subnet reaches the internet only through an outbound path you provide, such as a NAT gateway on the subnet or a route through your firewall. If the agent should still install packages, give the subnet that path and allow pypi.org and files.pythonhosted.org on port 443, or point pip at your own package mirror. Attaching a subnet changes only the sandbox’s own traffic. Genesis still reaches the sandbox through Azure’s management and command endpoints as described in Allow Genesis to reach Azure.
Virtual network support is in place but was not tested end to end at launch. Try it in a non-production resource group first.

Options reference

Agents start an Azure sandbox with the sandbox_action tool, action="start" and backend="azure_aci". You do not need these names to use the feature, but they help when you write instructions for an agent, a skill or a flow. Other start parameters that matter for Azure: Agents cannot pass Azure credentials (tenant_id, client_id, client_secret) in backend_options. Genesis refuses such a start and asks for a saved connection instead. Before starting, an agent can run action="check_backend_connection" with backend="azure_aci" to confirm the setup, and action="list_backend_connections" to list the Azure connections you can use. The full tool reference is in Sandbox tools.

Lifecycle

See Lifecycle and cost safety for how these work together, and Sandbox Sessions for managing sessions from the Genesis UI.