Skip to main content
Podflare is a cloud sandbox platform built for AI agents. Instead of running code in a shared container or a slow VM, every sandbox gets its own Firecracker microVM — hardware-isolated, with a dedicated Linux kernel. Your agent executes code in 7–11 ms from a warm pool, maintains Python state across calls, and can fork a running sandbox into N isolated copies for parallel exploration.

What Podflare gives you

Fast sandbox creation

create() returns in 7–11 ms from a warm pool. No cold-start penalty between agent turns.

Copy-on-write forking

fork(n=5) snapshots the parent and spawns 5 isolated children in ~101 ms. Each child inherits the parent’s Python REPL state, files, and memory.

Persistent Python REPL

Variables, imports, and open file handles survive across run_code calls. Load a dataset once; query it many times.

Real microVM isolation

Each sandbox runs inside its own Firecracker VM with KVM hardware isolation — not a container, not a subprocess.

The core loop

The fork(n) primitive is what sets Podflare apart. Set up expensive state once — load a large CSV, install packages, import libraries — then fork the sandbox to explore multiple plans in parallel. Each child diverges in full isolation, and you commit the winner back to the parent.
from podflare import Sandbox

with Sandbox() as parent:
    # Expensive setup happens once
    parent.run_code("import pandas as pd; df = pd.read_csv('/data/big.csv')")

    # Fork 5 ways — each child inherits df + pandas already loaded
    children = parent.fork(n=5)
    try:
        plans = ["df.head()", "df.describe()", "df.corr()", "df.dtypes", "df.memory_usage()"]
        results = [c.run_code(p) for c, p in zip(children, plans)]
        winner = pick_best(results)
        parent.merge_into(winner)  # parent's state is now the winner's state
    finally:
        for c in children:
            c.close()
fork(n) uses copy-on-write branching. Each child shares the parent’s pages in memory until it writes — so forking 5 sandboxes costs far less than creating 5 independent ones from scratch.

Git-like state management

Beyond forking, Podflare gives you diff and merge_into so your agent can compare what changed in each branch and promote the best result. The workflow mirrors how you’d use git branches for speculative edits:
  1. Fork — branch from a known-good state
  2. Explore — run different code paths in each child
  3. Diff — compare outputs and filesystem changes
  4. Merge — promote the winning child’s state back to the parent

Integrations

Podflare plugs into every major AI agent framework as a drop-in code execution backend.

OpenAI Agents SDK

podflare_code_interpreter() returns a FunctionTool ready to pass to your agent.

Vercel AI SDK

podflareRunCode() wraps into tool({...}) for use with generateText or streamText.

Anthropic Messages API

handle_code_execution_tool_use processes tool_use blocks from Claude responses.

MCP server

Drop-in MCP server for Claude Desktop, Cursor, Cline, and Zed.

Next steps

Ready to run your first sandbox? The quickstart takes you from installation to running code with persistent state in a few minutes.

Quickstart

Install the SDK and run your first code execution in minutes