Lightning AI Sandbox
Isolated, programmatic Linux sandboxes on the Lightning AI platform with Python and TypeScript SDKs, a CLI, filesystem snapshots and optional Docker-in-sandbox. A capable SDK-driven sandbox for Lightning AI users, held back by undocumented isolation and the absence of a dedicated rate card.
Overview
Lightning AI Sandbox is the sandbox product of Lightning AI's cloud platform (the company behind PyTorch Lightning). The docs describe it as giving "every workload its own isolated Linux environment, spun up in milliseconds and torn down when you're done", aimed at running LLM-generated code, agent output, repository tests and live preview servers. You create sandboxes from the lightning-sdk Python package, the @lightningai/sdk TypeScript package or the lightning sandbox CLI, with runtimes node24 (default), node22, python313 or your own OCI image, always with sudo. A --docker flag provisions a Docker-enabled sandbox and --spot places it on spot capacity.
Sandboxes can be ephemeral or persistent; persistent ones stop and resume with their state auto-saved, and filesystem snapshots can be captured with an expiry and restored into new sandboxes. Five CPU shapes run from 1 vCPU/1 GB to 16 vCPU/64 GB; there are no GPU shapes for Sandbox. The isolation technology is not named in the docs. Lightning publishes no Sandbox-specific rate card — usage draws on the platform's per-second credit billing (Free, Pro $50/month, Teams $140/user/month). The company holds SOC 2 Type II and offers private deployments in the customer's AWS or GCP account.
Notable
- Docs claim sandboxes "start in milliseconds"; the CLI supports
--spotplacement and a--dockermode that starts a Docker daemon at boot. - Platform pricing page: Pro $50/month, Teams $140/user/month; up to 30 free credits to start.
- Lightning states SOC 2 Type II compliance covering AWS and GCP in all regions; HIPAA is tied to Enterprise and private deployments.
Lightning AI Sandbox specifications
| Attribute | Details |
|---|---|
| Isolation | Not named; docs say each sandbox runs in a "strongly isolated environment, keeping its filesystem, network, and processes separate" with "dedicated compute" and its own network stack |
| Deployment | Hosted platform · BYOC available |
| Open source | No |
| SDKs and interfaces | Python, JavaScript/TypeScript, CLI |
| Cold start (vendor claim) | Docs claim "Sandboxes start in milliseconds" |
| Max session length | Configurable per sandbox (--timeout in milliseconds auto-stops it); no default or maximum published |
| Persistence | Persistent sandboxes "auto-save state on stop and resume right where you left off" (stop/start/resume); ephemeral mode available; filesystem snapshots (not running processes) can be created, listed, given a TTL and restored into a new sandbox |
| GPU | No — documented instance types are CPU only (cpu-1 1 vCPU/1 GB to cpu-16 16 vCPU/64 GB); the wider Lightning platform sells GPUs but not for Sandbox |
| Networking | Expose ports with --port and get a live preview URL for dev servers; internet access and allow-listing are not described |
| Pricing | No Sandbox-specific rates published. Platform plans: Free $0 (up to 30 starter credits), Pro $50/month (40 credits/month), Teams $140/user/month (50 credits/month), Enterprise custom; usage is billed by the second in credits |
| Free tier | Free plan with 5 credits on registration and 25 more on adding a card; Sandbox allowance not stated separately |
| Compliance | SOC 2 Type II ("with support for AWS and GCP Clouds in all regions"); HIPAA listed for Enterprise and private deployments |
| Regions | Not documented |
Facts from Lightning AI Sandbox’s public documentation, verified November 9, 2026. Performance numbers are vendor claims.
Strengths and trade-offs
Strengths
- You want Python and TypeScript SDKs plus a CLI with persistent or ephemeral sandboxes on one platform
- You need Docker inside the sandbox or spot pricing for cheap batch runs
- You are already using Lightning Studios or GPU jobs and want sandboxes in the same teamspace
Trade-offs
- Isolation technology is not documented (no VM, microVM or container claim)
- No Sandbox-specific pricing, no GPU instance types, no stated session limits or regions
- Networking controls (egress allow-listing) are not described
Good fit for: Teams already on Lightning AI who want agent sandboxes next to their Studios and GPU jobs.
How Lightning AI Sandbox compares
| Sandbox | Isolation | Open source | Self-host / BYOC | Cold start (vendor) | Max session | Snapshots / pause | GPU | SDKs |
|---|---|---|---|---|---|---|---|---|
| Lightning AI Sandbox | Not named (isolated Linux env) | No | No / Yes | ms (claimed) | Not documented | Yes / Yes | No | Python, JavaScript/TypeScript, CLI |
| Modal Sandboxes | gVisor or VM | No | No / Not documented | <1 s | Up to 24 h | Yes / Yes | Yes | Python, JavaScript/TypeScript, Go |
| E2B | Firecracker microVM | Yes | Yes / Yes | Not documented | 1 h / 24 h (Pro) | Yes / Yes | No | Python, JavaScript/TypeScript |
| Daytona | Containers or VMs | No | Not documented / Yes | <90 ms | Unlimited | Yes / Yes | Yes | Python, TypeScript, Ruby, Go, Java |
| Baseten Sandboxes | Not named (Blaxel-based) | No | No / No | Not documented | 7 days default | No / Yes | Not documented | Python, JavaScript/TypeScript, Go, CLI, REST API, MCP server |
| Prime Sandboxes | microVM, own kernel | No | No / No | Not documented | 60 min default, unlimited | Yes / Yes | No | Python, CLI, REST API |
| Beam Sandboxes | gVisor | Yes | Yes / Yes | ~0.5 s | Configurable | Yes / Yes | Yes | Python, TypeScript |
Frequently asked questions
What is Lightning AI Sandbox?
How does Lightning AI Sandbox isolate code?
Is Lightning AI Sandbox open source?
How much does Lightning AI Sandbox cost?
What are the alternatives to Lightning AI Sandbox?
Sources
- lightning.ai/docs/platform/build/sandbox/
- lightning.ai/docs/cli/stable/command-details/sandbox
- lightning.ai/docs/platform/developers/sdk.md
- lightning.ai/docs/platform/developers/sdk/sandbox.md
- lightning.ai/docs/platform/build/sandbox/examples
- lightning.ai/pricing
- lightning.ai/docs/platform/security/compliance/soc2-type2/
Cite this page
Agent Sandboxes. (2026). Lightning AI Sandbox. agentsandboxes.org. Last reviewed November 9, 2026. https://agentsandboxes.org/sandboxes/lightning-ai-sandboxes/
Found an error or a missing sandbox? Submit a correction — every entry links to the sources it relies on.