back to microsandbox

compare

microsandboxvsmodal

pick modal for managed compute, gpu workloads, and batch jobs. [1] pick microsandbox for a local-first agent runtime that embeds in your application.

modal is a managed compute platform for functions, jobs, gpu workloads, and sandboxes. its sandbox api runs untrusted code in secure containers by default and exposes python, javascript, and go clients. [1]

the isolation comparison needs both current modal paths. standard modal sandboxes use gvisor. modal also documents beta vm sandboxes that provide each sandbox a full virtual machine and real linux kernel. [2] saying modal only offers gvisor would be incomplete.

microsandbox begins locally and uses a hardware microvm for every sandbox. choose modal when managed scaling or its gpu surface is the job. choose microsandbox when one embeddable runtime must follow the application from laptop to cloud. private beta. access is by request.

microsandbox
local + cloud
modal
managed cloud compute and sandboxes [1]
primary use case
per-session agent computers · untrusted code
managed functions, sandboxes, gpu compute, and batch jobs [1]
hosting model
local runtime · private beta. access is by request.
managed cloud [1]
isolation options
hardware microvm · separate kernel
gvisor by default · beta full-vm sandboxes available [2]
runs offline
yes, fully local
managed service [1]
languages
rust · typescript · python · go · cli
python · javascript · go sandbox clients [1]
programming model
embed an sdk · run the runtime locally or remotely
managed app and sandbox api [1]
credentials
credentials are destination-bound. the sandbox works with a placeholder; the real value is substituted host-side into supported intercepted outbound requests, only for destinations on your allow-list. an approved destination still receives the real credential and could reflect or misuse it, so scope your allow-lists accordingly.
modal secrets are supplied to sandboxes as environment variables [1]
network policy
by default, sandboxes can reach the public internet. private, host-local, link-local, and metadata destinations are blocked. egress can be reduced to an allowlist or disabled entirely. in the cloud, the non-public block cannot be lifted, even by you.
managed sandbox networking and egress configuration [1]
gpu support
cpu today · gpu is not offered
documented gpu acceleration and gpu resource selection [1]
readiness and long jobs
application controls lifecycle through the sdk
readiness probes, idle timeouts, detach, and managed job lifecycle [1]
pricing
free locally · private beta pricing is published
published usage pricing and free credit [3]
license
apache 2.0
managed proprietary service [1]
pick modal

choose modal when

  • you need managed gpu resources or batch compute. [1]
  • you want readiness probes, managed job lifecycle, and cloud capacity in one service. [1]
  • your application fits modal's managed app and sandbox model. [1]
  • you need its beta full-vm sandbox for workloads that require a real linux kernel. [2]
pick microsandbox

choose microsandbox when

  • the actual sandbox runtime must run on a developer laptop.
  • your application needs a daemon-free runtime it can embed.
  • you want every sandbox to use an own-kernel microvm by default.
  • you need destination-bound credentials and a host-enforced network floor.
  • one sdk. one api. local or cloud is a config change, not a rewrite.

01

moving from modal

the command-execution loop maps to microsandbox, but the surrounding application model changes. modal creates sandboxes inside its managed app model. [1] microsandbox creates them from an sdk embedded in your process, including on a local machine.

keep modal where gpu selection, managed scaling, or its readiness and job controls are load-bearing. translate image setup and command execution where the goal is a local-first agent computer instead.

common questions

is microsandbox a modal alternative?

yes for untrusted code sandboxes, especially when local execution and embedding matter. modal covers a wider managed-compute surface that includes functions, batch jobs, and gpus. [1]

does modal sandbox untrusted code?

yes. modal documents sandboxes for untrusted user and agent code. [1] standard sandboxes use gvisor, and beta vm sandboxes provide a full linux virtual machine. [2]

does modal use gvisor or virtual machines?

both paths exist. gvisor is the standard sandbox path, while modal's beta vm option runs a sandbox on a full virtual machine with a real linux kernel. [2]

does modal support gpus?

yes. modal documents gpu acceleration and gpu resource selection. [1] microsandbox does not offer gpu sandboxes today.

can modal run locally?

the modal client can be invoked from local code, but the sandbox runs in modal's managed cloud. [1] microsandbox runs the microvm itself on the developer machine.

run it locally.

put the boundary on your own machine before you choose anything else.

run it locally