MODAL ALTERNATIVE FOR AGENTS & SPOT GPUs
v2.18.0 · ~419ms warm gVisor · 135-Tool MCP

Purpose-built for AI agents, RLVR, and Spot GPU fleets — without Modal lock-in.

Keep Modal-style parallel `.map()` ergonomics across Spot NVIDIA T4, L4, A100, and H100 GPUs with pre-baked `gpu-pytorch` & `gpu-rl` templates (CUDA 12.4 + PyTorch 2.5), while gaining native coding swarms, 135-tool Hosted MCP, and BYOC VPC deployment.

Switch from Modal in 1 line

Use `stateset-modal-compat` for 1-line Modal Sandbox migration or run `stateset batch map` for parallel Spot GPU fan-outs with automatic preemption retry.

Calculate your fleet TCO savings →
npx @stateset/sandbox-cli migrate --from modal --mode compat
TS: @stateset/sandbox-sdk·Py: stateset-modal-compat

Before (Modal Sandbox Python)

import modal

app = modal.App.lookup("agent-runner", create_if_missing=True)
sb = modal.Sandbox.create(app=app)
p = sb.exec("python3", "-c", "print('hello')")
print(p.stdout.read())
sb.terminate()

After (StateSet drop-in + Spot GPU .map())

After (StateSet drop-in + Spot GPU .map())1-line swap
import stateset_modal_compat as modal

app = modal.App.lookup("agent-runner", create_if_missing=True)
sb = modal.Sandbox.create(app=app)
p = sb.exec("python3", "-c", "print('hello')")
print(p.stdout.read())
sb.terminate()

StateSet Sandbox vs Modal: architecture & capability breakdown

CapabilityStateSet Sandbox v2.18Modal
Spot GPU Pricing & PreemptionNative Spot T4 / L4 / A100 / H100 with automatic On-Demand fallback, scale-to-zero (0/0 idle), & budget kill-switchOn-demand GPU billing
RLVR & Pre-Baked GPU TemplatesBuilt-in gpu-pytorch & gpu-rl (CUDA 12.4 + PyTorch 2.5.1), GRPO/DAPO/GSPO workflows, 5 rl_* MCP tools & RL StudioCustom modal.Image builds per project
Model-Weight Cold StartCSI VolumeSnapshot model-weight caches (Hugging Face / OCI / GCS / S3)Network volume mount
Interactive Coding Agent HarnessesNative Claude Code, Codex, Gemini CLI, OpenCode, AGY + Verify->Fix oracleManual container scripting
Multi-Agent CoordinationShared Swarm Blackboard, optimistic file path leases, Repo MemoryNot built in
Ephemeral Sidecars & PR PreviewsDeclarative Postgres, Redis, Playwright sidecars per sandboxSeparate app services
Human-in-the-Loop DebuggingTime-Travel Session Replay + live terminal takeover (tko_)Log streaming only
Compliance & Enterprise DeploymentCloud or BYOC VPC Runner (@stateset/byoc-runner), Policy-as-Code, SLSA v1.0Managed cloud focus
Zero-Install Hosted MCP & SDKs135-tool Hosted mcp.sandbox.stateset.app/mcp (RFC 9728 OAuth) + 10/10 zero-gap SDKsNo hosted MCP server; Python-centric SDK

Frequently asked migration questions

How does StateSet Batch .map() handle Spot GPU preemptions?

Every Batch .map() item tracks automatic retry budgets, falls back to On-Demand capacity when Spot is preempted (configurable via --spot / --no-fallback), and respects hard USD budget kill-switches.

Can StateSet run inside our own GCP/AWS VPC?

Yes. Deploy @stateset/byoc-runner inside your private VPC so source code, credentials, and model weights never leave your cloud perimeter.

Does StateSet support languages beyond Python?

Yes. Unlike Python-centric platforms, StateSet v2.18.0 ships 10/10 zero-gap SDKs (TypeScript, Python, Go, Rust, Ruby, PHP, Java, C#, Swift, and Elixir), a standalone CLI, and a 135-tool Hosted Streamable HTTP MCP server.

Ready to benchmark StateSet against Modal on your real workload?

Sign up for $25 in trial credits, test live on gVisor in seconds, or compare all platforms side by side.

RLVR · GRPO · SPOT GPUs

Explore RLVR & Post-Training Infrastructure

Batch .map() trajectory grading, pre-baked gpu-pytorch & gpu-rl templates, and Model-Weight CSI caches.

135 TOOLS · STREAMABLE HTTP

Connect 135-Tool Hosted MCP in 10 Seconds

Zero local server. RFC 9728 OAuth and 1-Click Add to Cursor, Claude Code, Windsurf, or AGY.