Framework · Workflow Engines

Modal

Serverless compute platform that turns Python functions into autoscaled cloud containers and exposes Sandboxes as ephemeral, secure runtimes for executing AI-generated code on demand.

Description

Modal is an AI infrastructure platform built by Modal Labs. Developers decorate Python functions with `@app.function` (optionally with a GPU, image, schedule, or `modal.Sandbox` reference) and Modal containerises and runs them in the cloud with sub-second cold starts and autoscaling. For agentic workloads the headline primitive is the Sandbox: a constructor (`Sandbox.create`) that programmatically spins up isolated containers to run untrusted or LLM-generated code, with filesystem, directory, and memory snapshots to checkpoint and restore state.

Solution

Modal is not itself an agent runtime; it is the substrate. Agent frameworks call `Sandbox.create()` to obtain an ephemeral container, send code or shell commands into it, observe stdout/stderr/files, optionally snapshot the filesystem or memory, and either reuse, detach, or terminate the Sandbox. Scheduled functions use the `schedule=modal.Period(...)` or `modal.Cron(...)` parameter on `@app.function` so the entry-point runs on a cadence without external orchestration.

Primary use cases

  • secure sandboxed execution of LLM-generated code
  • GPU-backed inference and fine-tuning
  • scheduled / cron-driven serverless jobs
  • containerised batch compute for agents

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.