Skip to main content

How It Works

InstaVM is a microVM platform that boots isolated sandboxes in under 200ms. You send code, it runs in a sandbox, you get the result back.

Architecture

Your app → InstaVM API → MicroVM Orchestrator → Sandbox (Firecracker microVM)
  1. Your application sends a code execution request to the InstaVM API.
  2. The orchestrator provisions a microVM (or reuses an existing session).
  3. Code runs inside an isolated sandbox with its own kernel and filesystem.
  4. Results are returned to your application.

MicroVM platform

InstaVM uses Firecracker microVMs. Each sandbox gets:

  • A dedicated Linux kernel
  • Isolated filesystem, memory, and CPU
  • Network stack with configurable egress
  • Boot time under 200ms

This is not container isolation. Each sandbox is a full virtual machine with hardware-level separation.

Session lifecycle

Client created → First execute() call → VM boots → Code runs → Result returned

Subsequent execute() calls reuse same VM

Session ends → VM destroyed

Sessions persist state between execute() calls. Variables, files, and installed packages carry over. When the session ends, everything is destroyed.

Security model

InstaVM is designed to run untrusted code safely:

  • VM-level isolation -- each sandbox is a separate virtual machine, not a container.
  • Egress control -- restrict what network resources code can access via egress policies.
  • No host access -- root inside the sandbox cannot access the host or other sandboxes.
  • Ephemeral by default -- sandboxes are destroyed when sessions end. No data persists unless you create a snapshot.

Cold start performance

OperationTypical latency
Sandbox boot (cold)< 200ms
Session reuse (warm)< 10ms
Snapshot restore< 500ms

For workloads that need pre-installed dependencies, use snapshots to eliminate package installation time.

What you can run

Sandboxes include Python 3.11+, Node.js 18+, and common system tools. You can install additional packages at runtime with pip, apt, or npm.

Common use cases:

  • AI agent code execution -- run LLM-generated code in a sandbox
  • Code interpreters -- build ChatGPT-style code execution UIs
  • Data processing -- run pandas, numpy, matplotlib in isolated environments
  • Browser automation -- control headless browsers for web scraping and testing
  • Web app previews -- deploy and share running applications

Next steps

  • Quickstart -- run your first code in under 5 minutes
  • Sandboxes -- detailed sandbox configuration
  • Sessions -- session lifecycle and management