Security & Sandboxing Architecture Guide September 2026 ยท 15 min read

AI Agent Sandboxing & Secure Code Execution in 2026: E2B, Modal, Docker, and Firecracker Compared

In 2026, autonomous AI coding agents have graduated from passive autocomplete into production-grade autonomy. But granting LLMs shell execution poses massive security risks. This comprehensive engineering guide examines Firecracker MicroVMs, E2B, Modal Labs, Docker gVisor, and client-side WebContainers to help you build bulletproof agent sandboxes.

In 2026, autonomous AI agents are no longer passive conversational chat bots. Whether it is an autonomous software engineer like Claude Code, OpenHands, or SWE-agent, a data analyst agent writing Pandas scripts, or an automated sysadmin executing bash commands, modern AI agents fundamentally require the capability to write and execute arbitrary code.

However, giving a non-deterministic Large Language Model access to a shell execution environment introduces severe security and operational vulnerabilities:

  • What happens when an autonomous agent enters a recursive loop executing rm -rf / or filling disk storage?
  • What happens when an agent executes malicious third-party code pulled from an unverified PyPI/NPM package?
  • What happens when an agent initiates a Server-Side Request Forgery (SSRF) attack to query the internal AWS instance metadata endpoint (http://169.254.169.254/latest/meta-data/) and exfiltrate production database credentials?
Standard application containers (like bare Docker on a shared host) were designed for predictable application microservicesโ€”not for running untrusted, arbitrary, LLM-generated code.

To solve this, the agent infrastructure stack in 2026 has standardized around ephemeral MicroVM sandboxes and specialized code execution platforms.

This architectural guide compares the primary sandboxing technologies used by production AI agents in 2026: E2B (Firecracker MicroVMs), Modal Labs, Hardened Containers (Docker MCP & gVisor), and Client-side WebContainers. We examine isolation boundaries, startup latency, interactive state management, real-world economics, and concrete implementation code for production agent systems.

Quick Summary & Architectural Boundaries

๐Ÿ’ก Architectural Note:
  • Choose E2B (Firecracker MicroVMs) when your autonomous agents need dedicated interactive environments, bidirectional file syncing, sub-second boot times (~150ms), and long-running interactive REPL/Jupyter sessions with rich artifact streaming.
  • Choose Modal Labs when your agent workloads require burstable serverless compute, heavy Python scientific packages, distributed batch data processing, or on-demand GPU acceleration (e.g., local embedding generation or fine-tuning inside the sandbox).
  • Choose Docker with gVisor (runsc) or Kata Containers when you must keep all agent execution strictly on-premise within your own existing Kubernetes infrastructure and cannot send code to third-party cloud providers.
  • Choose WebContainers / WebAssembly (Wasm) when you want 100% client-side agent execution running entirely inside the user's browser, eliminating server infrastructure costs and server-side security liability entirely.
โšก IMPORTANT:
  • Virtualization Level: Bare containers share the host Linux kernel (vulnerable to kernel exploits). MicroVMs (Firecracker) spin up an independent, minimal Linux kernel backed by hardware virtualization (KVM) for every agent task, ensuring true hypervisor-level isolation.
  • Lifecycle Model: Interactive Agent Sandboxes must support stateful multi-turn commands (creating files in step 1, inspecting them in step 4) with strict wall-clock timeout enforcement.
---

The 3 Structural Failure Modes of Traditional Containers for AI Agents

Why can't engineering teams simply spin up a Docker container on their backend and execute agent commands via docker exec? In production, three critical failure modes emerge:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 1. The Kernel Privilege Escalation & Container Escape Vulnerability                    โ”‚
โ”‚    Failure: Standard Docker containers share the host kernel. If an LLM-generated      โ”‚
โ”‚    script triggers an unpatched Linux kernel vulnerability (e.g., dirty COW variants,  โ”‚
โ”‚    cgroup v1 escapes, or ptrace bypasses), the agent gains root on the underlying      โ”‚
โ”‚    bare-metal host. Mounting `/var/run/docker.sock` inside the agent container gives   โ”‚
โ”‚    the LLM trivial, unfettered root access to the entire cluster.                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. The Cold Start vs. State Drift Dilemma                                              โ”‚
โ”‚    Failure: Standard Docker containers take 2 to 5 seconds to boot and pull layers.   โ”‚
โ”‚    If you spin up a fresh container per command, multi-turn agent workflows become     โ”‚
โ”‚    unbearably sluggish. If you keep a long-lived shared container, zombie processes,  โ”‚
โ”‚    corrupted disk states, and cross-session variable leaks cause silent agent failures.โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. The Unrestricted Network Poisoning & SSRF Threat                                    โ”‚
โ”‚    Failure: Agents frequently need outbound internet access to install libraries or    โ”‚
โ”‚    fetch documentation. But without strict kernel-level eBPF egress filtering, the     โ”‚
โ”‚    agent can port-scan internal VPC subnets, access Kubernetes service account tokens,  โ”‚
โ”‚    or reach cloud metadata endpoints to steal IAM credentials.                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core Technology 1: Firecracker MicroVMs & E2B

The Firecracker Revolution

Originally developed by AWS to power AWS Lambda and Fargate, Firecracker is an open-source virtualization technology written in Rust. It utilizes Linux Kernel-based Virtual Machines (KVM) to spawn lightweight virtual machines called MicroVMs.

Unlike traditional hypervisors (QEMU) that emulate legacy PC hardware (PCI buses, IDE controllers), Firecracker strips away all non-essential virtual devices. A Firecracker MicroVM contains only a minimal kernel, virtio network and block drivers, and a serial console:

  • Startup Latency: Boots in less than 150 milliseconds.
  • Memory Footprint: Approximately 5 MB of RAM overhead per MicroVM.
  • Density: Thousands of isolated MicroVMs can run concurrently on a single physical host.

How E2B Productionizes MicroVMs for Agents

E2B is purpose-built developer infrastructure that packages Firecracker MicroVMs specifically for autonomous AI agents.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        AI Agent Orchestrator                          โ”‚
โ”‚            (LangChain / LangGraph / AutoGen / Custom Loop)             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚ E2B Python / TypeScript SDK
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ E2B Sandbox Cloud (Firecracker MicroVM Cluster)                        โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Ephemeral Sandbox (Hardware KVM Isolation)                         โ”‚ โ”‚
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ Python / REPL Kernel โ”‚ โ”‚ Bash Shell Stream โ”‚ โ”‚ File System    โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ (Rich Output/Plots)  โ”‚ โ”‚ (Stdout/Stderr)   โ”‚ โ”‚ (Bidirectional)โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Architectural Capabilities of E2B:

1. Interactive REPL & Code Interpreter: Supports continuous interactive code execution. Variables, functions, and memory created in turn 1 persist across subsequent turns in the same sandbox session. 2. Rich Media Streaming: Captures stdout, stderr, matplotlib plots, charts, and table artifacts directly over WebSocket/gRPC streams. 3. Custom Sandbox Templates: Developers can pre-bake custom Dockerfile-based templates (with pre-installed compilers, Node.js, Python packages, and CLI utilities) that compile down into instantaneous Firecracker snapshots. 4. Hard Security Boundaries: Complete network namespace isolation, configurable egress firewalls, and hard CPU/memory cgroup limits.

Core Technology 2: Modal Labs (Serverless Python & GPU Acceleration)

While E2B is optimized for interactive conversational REPL sandboxes, Modal represents the gold standard for high-throughput, compute-intensive, serverless agent execution.

Modal uses specialized Linux container virtualization with custom user-space file drivers that allow remote container sandboxes to boot in under 1 second, mounting terabytes of cloud storage as local directories.

import modal

app = modal.App("agent-code-executor")

# Define a sandboxed container image with all needed libraries
agent_image = (
    modal.Image.debian_slim()
    .pip_install("pandas", "numpy", "scikit-learn", "sympy")
)

@app.function(
    image=agent_image,
    timeout=60,                # Strict 60-second execution cap
    cpu=2.0,                   # Dedicated compute allocation
    memory=2048,               # 2GB RAM ceiling
    network_file_systems={"/workspace": modal.NetworkFileSystem.from_name("agent-storage")}
)
def execute_agent_code(python_code: str) -> dict:
    import sys
    from io import StringIO
    
    old_stdout = sys.stdout
    redirected_output = sys.stdout = StringIO()
    
    try:
        exec(python_code, {})
        return {"success": True, "output": redirected_output.getvalue(), "error": None}
    except Exception as e:
        return {"success": False, "output": redirected_output.getvalue(), "error": str(e)}
    finally:
        sys.stdout = old_stdout

When to Choose Modal over E2B:

  • GPU Acceleration: Modal allows an agent to request a dedicated NVIDIA L4, A10G, or H100 GPU inside the sandbox with a single code annotation (gpu="L4"), allowing the agent to run local AI model inference, embeddings, or CUDA code.
  • Massive Parallelism: An agent can fan out 1,000 parallel sandboxes simultaneously (e.g., testing 1,000 generated unit tests across a legacy repository) with automatic scale-to-zero economics.
---

Core Technology 3: Hardened Self-Hosted Containers (Docker MCP, gVisor, WebContainers)

1. Google gVisor (runsc)

For enterprise organizations prohibited by compliance regulations from sending customer code to third-party sandbox clouds, gVisor is the leading self-hosted solution.

gVisor acts as a user-space kernel written in Go. Instead of application containers making direct system calls to the host Linux kernel, gVisor intercepts and reimplements all system calls in a secure sandbox layer:

  • If an agent script attempts to exploit a kernel zero-day, it hits the gVisor sandbox memory rather than the host Linux kernel.
  • Easily integrated into standard Docker (docker run --runtime=runsc) and Kubernetes (runtimeClassName: gvisor).

2. Docker with Model Context Protocol (MCP)

In 2026, Docker has integrated directly with Anthropic's Model Context Protocol (MCP). Docker MCP servers allow agents to access isolated container capabilities as explicit tools rather than raw root shells. The agent requests specific operations (e.g., run_python_script, read_workspace_file) mediated by an MCP gateway that enforces strict path whitelists and read-only volume mounts.

3. Client-Side WebContainers (Browser-Native Sandbox)

Pioneered by StackBlitz, WebContainers execute a full Node.js and WebAssembly runtime directly inside the user's browser tab.
  • Zero Infrastructure Cost: The agent executes scripts on the client's CPU.
  • Zero Server Security Risk: Malicious scripts cannot escape to your server because they run within the browser's native JavaScript sandbox.
  • Limitation: Constrained to WebAssembly and JavaScript/Node.js runtimes; limited support for raw native C extensions or high-memory Python packages.
---

Production Implementation: Building a Secure Agent Sandbox in Python

The following production-ready Python class demonstrates how an autonomous agent orchestrator executes untrusted Python and Bash commands inside an E2B Firecracker sandbox with strict timeouts, environment isolation, and error trapping:

"""
Production AI Agent Sandbox Executor using E2B Firecracker MicroVMs
Ecosystem: Python 3.11+, E2B Code Interpreter SDK v1.0+
"""

import os
from typing import Dict, Any, Optional, List
from e2b_code_interpreter import Sandbox

class AgentSandboxExecutor:
    """
    Manages secure, ephemeral execution environments for autonomous coding agents.
    Provides hardware-isolated MicroVM sandboxes with bidirectional file transfer,
    strict execution timeouts, and automatic resource cleanup.
    """
    def __init__(self, template: str = "python-3", timeout_seconds: int = 120):
        self.template = template
        self.default_timeout = timeout_seconds

    def execute_agent_code(
        self, 
        code: str, 
        input_files: Optional[Dict[str, str]] = None,
        timeout: Optional[int] = None
    ) -> Dict[str, Any]:
        """
        Executes arbitrary agent code inside a dedicated Firecracker MicroVM.
        
        Args:
            code: The Python script generated by the LLM.
            input_files: Dict of {filename: content} to inject prior to execution.
            timeout: Maximum execution duration in seconds.
            
        Returns:
            Dict containing execution status, stdout, stderr, and generated artifacts.
        """
        exec_timeout = timeout or self.default_timeout
        artifacts: List[Dict[str, str]] = []
        
        # Spawn an ephemeral, hardware-isolated Firecracker MicroVM (~150ms)
        with Sandbox.create(template=self.template, timeout=exec_timeout) as sandbox:
            try:
                # Step 1: Pre-populate workspace files
                if input_files:
                    for path, content in input_files.items():
                        sandbox.files.write(path, content)

                # Step 2: Execute code with interactive output streaming
                execution = sandbox.run_code(
                    code,
                    timeout=exec_timeout,
                    on_stdout=lambda text: None, # Optional real-time streaming hook
                    on_stderr=lambda text: None
                )

                # Step 3: Extract generated visual artifacts (Matplotlib plots, PNGs, SVGs)
                if execution.results:
                    for idx, result in enumerate(execution.results):
                        if result.png:
                            artifacts.append({
                                "type": "png",
                                "name": f"artifact_{idx}.png",
                                "data": result.png
                            })
                        elif result.chart:
                            artifacts.append({
                                "type": "json_chart",
                                "name": f"chart_{idx}.json",
                                "data": str(result.chart)
                            })

                # Step 4: Verify execution success
                is_success = execution.error is None
                error_payload = None
                if not is_success:
                    error_payload = {
                        "name": execution.error.name,
                        "value": execution.error.value,
                        "traceback": execution.error.traceback
                    }

                return {
                    "success": is_success,
                    "stdout": "\n".join([str(log) for log in execution.logs.stdout]),
                    "stderr": "\n".join([str(log) for log in execution.logs.stderr]),
                    "error": error_payload,
                    "artifacts": artifacts
                }

            except TimeoutError:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": "Execution exceeded hard wall-clock timeout limit.",
                    "error": {"name": "TimeoutError", "value": f"Execution exceeded {exec_timeout}s limit"},
                    "artifacts": []
                }
            except Exception as e:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": str(e),
                    "error": {"name": type(e).__name__, "value": str(e)},
                    "artifacts": []
                }

Architectural Comparison Matrix

The following matrix compares the 4 leading agent execution architectures in 2026 across critical engineering dimensions:

DimensionE2B (Firecracker MicroVM)Modal Labs (Serverless Containers)Docker + gVisor (runsc)WebContainers (In-Browser Wasm)
Isolation MechanismHardware KVM Hypervisor (AWS Firecracker)User-space container virtualizationUser-space Go kernel syscall interceptionBrowser JavaScript / WebAssembly sandbox
Cold Start Latency120 โ€“ 180 ms600 โ€“ 1,200 ms1,500 โ€“ 3,500 ms50 โ€“ 100 ms (Client-side)
State PersistenceStateful interactive REPL sessionsEphemeral functions + Network File SystemStateful container lifecycleBrowser tab memory
GPU AccelerationRoadmap / Enterprise private cloudsFirst-class (NVIDIA L4 to H100)Self-hosted GPU passthrough (nvidia-container-runtime)None (WebGPU compute experimental)
Interactive REPL / StdinNative (Cell-by-cell Jupyter model)Non-interactive batch / streamingConfigurable via pseudo-TTY (pty)Native Node.js terminal emulator
Network Egress SecurityFull namespace isolation + Egress firewallsConfigurable VPC peering + AllowlistHost-level iptables / Cilium eBPFLimited by Browser CORS / Fetch policies
Deployment ModelManaged Cloud or Enterprise DedicatedManaged Cloud100% Self-Hosted on Bare Metal / K8s100% Client-Side Browser
Pricing ModelPer-sandbox second (~$0.000028/sec)Per-second CPU/Memory/GPU billingFixed host infrastructure costs$0.00 Infrastructure Cost
Best Production FitInteractive coding agents, data science botsHeavy batch tasks, distributed agent tasks, GPU codeEnterprise air-gapped & compliance stacksPure client-side playgrounds, educational tools
---

Production Security Best Practices & Cost Economics

Running millions of agent code executions each month requires strict operational boundaries to prevent runaway cloud bills and security breaches.

1. The Hardening Checklist for Agent Sandboxes

  • Enforce Strict Wall-Clock Timeouts: Never rely on in-code timeouts (e.g., Python signal.alarm). Always configure hypervisor-level hard kills (e.g., timeout = 60s). If an agent generates an infinite while True loop, the host drops the MicroVM automatically.
  • Block Cloud Metadata Endpoints: Implement explicit egress firewall rules blocking 169.254.169.254 and local private CIDR ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) to eliminate SSRF attacks.
  • Read-Only Root Filesystem with Ephemeral Mounts: Make the sandbox base system image immutable. Mount an ephemeral /workspace tmpfs folder with hard disk quotas (e.g., 512MB) to prevent disk exhaustion attacks.
  • Sanitize Output Buffers: Limit stdout and stderr captures to 100KB to prevent memory exhaustion on your orchestrator server if the agent attempts to print an infinite stream of random characters.
Cost Model Breakdown (10,000 Agent Sandbox Executions / Month):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Platform               โ”‚ Estimated Cost    โ”‚ Operational Overhead                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ E2B Managed Cloud      โ”‚ ~$35 - $60 / mo   โ”‚ Zero server management. Instant API.     โ”‚
โ”‚ Modal Labs (CPU only)  โ”‚ ~$40 - $70 / mo   โ”‚ Zero server management. Decorator syntax.โ”‚
โ”‚ Self-Hosted Kubernetes โ”‚ ~$350 - $600 / mo โ”‚ High (Cluster maintenance, KVM nodes).  โ”‚
โ”‚ WebContainers (Client) โ”‚ $0.00 / mo        โ”‚ Zero backend cost (Browser execution).   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ Data Security & Privacy in Code Sandboxing:

When agents execute code containing proprietary source code, enterprise API tokens, or customer PII, ensure that sandbox snapshots are wiped from host memory immediately upon session termination. Verify that your cloud sandbox provider signs Business Associate Agreements (BAA) and provides SOC2 Type II compliance reports with zero data persistence guarantees.

---

Summary & Architectural Recommendation

In 2026, secure sandboxing is not an optional featureโ€”it is the foundational prerequisite for autonomous AI agents:

  • If you are building interactive coding assistants, autonomous software engineers, or data analyst agents, adopt E2B for its sub-second Firecracker MicroVMs and rich REPL streaming capabilities.
  • If your agents perform massive parallel data processing, automated model training, or GPU-dependent tasks, deploy Modal.
  • If your enterprise requires strict on-premise data residency, deploy Docker with Google gVisor (runsc) or Kata Containers on your internal Kubernetes cluster.
  • If your application runs entirely in the user's browser, build on WebContainers.

Explore Related Sandbox & Agent Infrastructure Tools on AgDex.ai:

  • E2B โ€” Secure Firecracker MicroVM sandboxes for autonomous AI agents.
  • Modal โ€” High-performance serverless cloud containers and GPU execution.
  • OpenHands โ€” Open-source platform for autonomous software development agents.
  • SWE-agent โ€” Benchmark and agent execution system for GitHub issue resolution.
--- Published by AgDex.ai โ€” The Premier Resource & Benchmark Directory for AI Agents.

Seguridad y Sandboxing Guรญa de Arquitectura Septiembre 2026 ยท 15 min de lectura

Sandboxing y Ejecuciรณn Segura de Cรณdigo para Agentes IA en 2026: E2B, Modal, Docker y Firecracker frente a frente

En 2026, los agentes de cรณdigo autรณnomos han pasado de ser simples asistentes pasivos a ingenieros con ejecuciรณn autรณnoma. Sin embargo, otorgar a un LLM acceso al shell introduce graves vulnerabilidades operativas y de seguridad. Esta guรญa de ingenierรญa compara Firecracker MicroVMs, E2B, Modal Labs, Docker gVisor y WebContainers para diseรฑar entornos seguros de ejecuciรณn.

En 2026, los agentes de IA autรณnomos ya no son bots de chat conversacionales pasivos. Ya sea un ingeniero de software autรณnomo como Claude Code, OpenHands o SWE-agent, un agente analista de datos que escribe scripts de Pandas o un administrador de sistemas automatizado que ejecuta comandos bash, los agentes de IA modernos requieren fundamentalmente la capacidad de escribir y ejecutar cรณdigo arbitrario.

Sin embargo, otorgar a un modelo de lenguaje grande (Large Language Model) no determinista acceso a un entorno de ejecuciรณn de shell introduce graves vulnerabilidades operativas y de seguridad:

  • ยฟQuรฉ sucede cuando un agente autรณnomo entra en un bucle recursivo ejecutando rm -rf / o llenando el almacenamiento en disco?
  • ยฟQuรฉ sucede cuando un agente ejecuta cรณdigo malicioso de terceros obtenido de un paquete no verificado de PyPI/NPM?
  • ยฟQuรฉ sucede cuando un agente inicia un ataque de Server-Side Request Forgery (SSRF) para consultar el endpoint interno de metadatos de instancias de AWS (http://169.254.169.254/latest/meta-data/) y exfiltrar credenciales de bases de datos de producciรณn?
Los contenedores de aplicaciones estรกndar (como Docker bรกsico en un host compartido) fueron diseรฑados para microservicios de aplicaciones predeciblesโ€”no para ejecutar cรณdigo arbitrario, no confiable y generado por LLM.

Para resolver esto, la infraestructura para agentes en 2026 se ha estandarizado en torno a sandboxes efรญmeros de MicroVM y plataformas especializadas de ejecuciรณn de cรณdigo.

Esta guรญa de arquitectura compara las principales tecnologรญas de sandboxing utilizadas por los agentes de IA en producciรณn en 2026: E2B (Firecracker MicroVMs), Modal Labs, Hardened Containers (Docker MCP y gVisor) y WebContainers del lado del cliente. Examinamos los lรญmites de aislamiento, la latencia de inicio, la gestiรณn de estado interactivo, la economรญa del mundo real y cรณdigo de implementaciรณn concreto para sistemas de agentes en producciรณn.

Resumen rรกpido y lรญmites arquitectรณnicos

๐Ÿ’ก Nota arquitectรณnica:
  • Elija E2B (Firecracker MicroVMs) cuando sus agentes autรณnomos necesiten entornos interactivos dedicados, sincronizaciรณn bidireccional de archivos, tiempos de arranque inferiores a un segundo (~150ms) y sesiones interactivas de REPL/Jupyter de larga duraciรณn con transmisiรณn de artefactos enriquecidos.
  • Elija Modal Labs cuando las cargas de trabajo de sus agentes requieran computaciรณn serverless con capacidad de rรกfaga, paquetes cientรญficos pesados de Python, procesamiento de datos por lotes distribuidos o aceleraciรณn por GPU bajo demanda (por ejemplo, generaciรณn local de embeddings o fine-tuning dentro del sandbox).
  • Elija Docker con gVisor (runsc) o Kata Containers cuando deba mantener toda la ejecuciรณn de agentes estrictamente on-premise dentro de su propia infraestructura existente de Kubernetes y no pueda enviar cรณdigo a proveedores en la nube de terceros.
  • Elija WebContainers / WebAssembly (Wasm) cuando desee una ejecuciรณn de agentes 100% del lado del cliente que se ejecute completamente dentro del navegador del usuario, eliminando por completo los costos de infraestructura de servidor y la responsabilidad de seguridad del lado del servidor.
โšก IMPORTANTE:
  • Nivel de virtualizaciรณn: Los contenedores estรกndar comparten el kernel de Linux del host (vulnerables a exploits del kernel). Las MicroVMs (Firecracker) inician un kernel de Linux independiente y mรญnimo respaldado por virtualizaciรณn de hardware (KVM) para cada tarea del agente, garantizando un verdadero aislamiento a nivel de hipervisor.
  • Modelo de ciclo de vida: Los sandboxes interactivos para agentes deben admitir comandos con estado en mรบltiples turnos (crear archivos en el paso 1, inspeccionarlos en el paso 4) con la aplicaciรณn estricta de lรญmites de tiempo real (wall-clock timeout).
---

Los 3 modos estructurales de falla de los contenedores tradicionales para agentes de IA

ยฟPor quรฉ los equipos de ingenierรญa no pueden simplemente iniciar un contenedor Docker en su backend y ejecutar comandos de agente mediante docker exec? En producciรณn, surgen tres modos crรญticos de falla:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 1. The Kernel Privilege Escalation & Container Escape Vulnerability                    โ”‚
โ”‚    Failure: Standard Docker containers share the host kernel. If an LLM-generated      โ”‚
โ”‚    script triggers an unpatched Linux kernel vulnerability (e.g., dirty COW variants,  โ”‚
โ”‚    cgroup v1 escapes, or ptrace bypasses), the agent gains root on the underlying      โ”‚
โ”‚    bare-metal host. Mounting `/var/run/docker.sock` inside the agent container gives   โ”‚
โ”‚    the LLM trivial, unfettered root access to the entire cluster.                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. The Cold Start vs. State Drift Dilemma                                              โ”‚
โ”‚    Failure: Standard Docker containers take 2 to 5 seconds to boot and pull layers.   โ”‚
โ”‚    If you spin up a fresh container per command, multi-turn agent workflows become     โ”‚
โ”‚    unbearably sluggish. If you keep a long-lived shared container, zombie processes,  โ”‚
โ”‚    corrupted disk states, and cross-session variable leaks cause silent agent failures.โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. The Unrestricted Network Poisoning & SSRF Threat                                    โ”‚
โ”‚    Failure: Agents frequently need outbound internet access to install libraries or    โ”‚
โ”‚    fetch documentation. But without strict kernel-level eBPF egress filtering, the     โ”‚
โ”‚    agent can port-scan internal VPC subnets, access Kubernetes service account tokens,  โ”‚
โ”‚    or reach cloud metadata endpoints to steal IAM credentials.                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tecnologรญa clave 1: Firecracker MicroVMs y E2B

La revoluciรณn de Firecracker

Desarrollado originalmente por AWS para impulsar AWS Lambda y Fargate, Firecracker es una tecnologรญa de virtualizaciรณn de cรณdigo abierto escrita en Rust. Utiliza Kernel-based Virtual Machines (KVM) de Linux para generar mรกquinas virtuales ligeras llamadas MicroVMs.

A diferencia de los hipervisores tradicionales (QEMU) que emulan hardware de PC heredado (buses PCI, controladores IDE), Firecracker elimina todos los dispositivos virtuales no esenciales. Una MicroVM de Firecracker contiene รบnicamente un kernel mรญnimo, controladores virtio de red y de bloques, y una consola serie:

  • Latencia de inicio: Arranca en menos de 150 milisegundos.
  • Huella de memoria: Aproximadamente 5 MB de sobrecarga de RAM por MicroVM.
  • Densidad: Miles de MicroVMs aisladas pueden ejecutarse simultรกneamente en un solo host fรญsico.

Cรณmo E2B lleva las MicroVMs a producciรณn para agentes

E2B es una infraestructura para desarrolladores diseรฑada especรญficamente para empaquetar MicroVMs de Firecracker para agentes de IA autรณnomos.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        AI Agent Orchestrator                          โ”‚
โ”‚            (LangChain / LangGraph / AutoGen / Custom Loop)             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚ E2B Python / TypeScript SDK
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ E2B Sandbox Cloud (Firecracker MicroVM Cluster)                        โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Ephemeral Sandbox (Hardware KVM Isolation)                         โ”‚ โ”‚
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ Python / REPL Kernel โ”‚ โ”‚ Bash Shell Stream โ”‚ โ”‚ File System    โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ (Rich Output/Plots)  โ”‚ โ”‚ (Stdout/Stderr)   โ”‚ โ”‚ (Bidirectional)โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Capacidades arquitectรณnicas clave de E2B:

1. REPL interactivo e intรฉrprete de cรณdigo: Admite la ejecuciรณn continua e interactiva de cรณdigo. Las variables, funciones y memoria creadas en el turno 1 persisten a lo largo de los turnos posteriores en la misma sesiรณn de sandbox. 2. Transmisiรณn de contenido multimedia enriquecido: Captura stdout, stderr, grรกficos de matplotlib, diagramas y artefactos de tablas directamente a travรฉs de flujos WebSocket/gRPC. 3. Plantillas de sandbox personalizadas: Los desarrolladores pueden preconfigurar plantillas personalizadas basadas en Dockerfile (con compiladores preinstalados, paquetes de Node.js y Python, y utilidades de CLI) que se compilan en instantรกneas inmediatas de Firecracker. 4. Lรญmites estrictos de seguridad: Aislamiento completo de namespaces de red, firewalls de salida configurables y lรญmites estrictos de CPU/memoria mediante cgroups.

Tecnologรญa clave 2: Modal Labs (Python serverless y aceleraciรณn por GPU)

Mientras que E2B estรก optimizado para sandboxes interactivos conversacionales con REPL, Modal representa el estรกndar de referencia para la ejecuciรณn de agentes serverless de alto rendimiento y uso intensivo de cรณmputo.

Modal utiliza una virtualizaciรณn especializada de contenedores Linux con controladores de archivos personalizados en espacio de usuario que permiten que los sandboxes de contenedores remotos arranquen en menos de 1 segundo, montando terabytes de almacenamiento en la nube como directorios locales.

import modal

app = modal.App("agent-code-executor")

# Define a sandboxed container image with all needed libraries
agent_image = (
    modal.Image.debian_slim()
    .pip_install("pandas", "numpy", "scikit-learn", "sympy")
)

@app.function(
    image=agent_image,
    timeout=60,                # Strict 60-second execution cap
    cpu=2.0,                   # Dedicated compute allocation
    memory=2048,               # 2GB RAM ceiling
    network_file_systems={"/workspace": modal.NetworkFileSystem.from_name("agent-storage")}
)
def execute_agent_code(python_code: str) -> dict:
    import sys
    from io import StringIO
    
    old_stdout = sys.stdout
    redirected_output = sys.stdout = StringIO()
    
    try:
        exec(python_code, {})
        return {"success": True, "output": redirected_output.getvalue(), "error": None}
    except Exception as e:
        return {"success": False, "output": redirected_output.getvalue(), "error": str(e)}
    finally:
        sys.stdout = old_stdout

Cuรกndo elegir Modal frente a E2B:

  • Aceleraciรณn por GPU: Modal permite que un agente solicite una GPU dedicada NVIDIA L4, A10G o H100 dentro del sandbox con una sola anotaciรณn en el cรณdigo (gpu="L4"), lo que permite al agente ejecutar inferencia local de modelos de IA, embeddings o cรณdigo CUDA.
  • Paralelismo masivo: Un agente puede desplegar 1.000 sandboxes paralelos simultรกneamente (por ejemplo, ejecutando 1.000 pruebas unitarias generadas en un repositorio heredado) con un modelo econรณmico de escalado a cero automรกtico.
---

Tecnologรญa clave 3: Contenedores reforzados autohospedados (Docker MCP, gVisor, WebContainers)

1. Google gVisor (runsc)

Para organizaciones empresariales a las que las normativas de cumplimiento les prohรญben enviar cรณdigo de clientes a nubes de sandbox de terceros, gVisor es la soluciรณn lรญder autohospedada.

gVisor actรบa como un kernel en espacio de usuario escrito en Go. En lugar de que los contenedores de aplicaciones realicen llamadas al sistema directamente al kernel de Linux del host, gVisor intercepta y reimplementa todas las llamadas al sistema en una capa segura de sandbox:

  • Si el script de un agente intenta explotar una vulnerabilidad de dรญa cero en el kernel, afecta a la memoria del sandbox de gVisor en lugar del kernel de Linux del host.
  • Se integra fรกcilmente en Docker estรกndar (docker run --runtime=runsc) y Kubernetes (runtimeClassName: gvisor).

2. Docker con Model Context Protocol (MCP)

En 2026, Docker se ha integrado directamente con el Model Context Protocol (MCP) de Anthropic. Los servidores Docker MCP permiten que los agentes accedan a las capacidades aisladas del contenedor como herramientas explรญcitas en lugar de shells de root directos. El agente solicita operaciones especรญficas (por ejemplo, run_python_script, read_workspace_file) mediadas por una pasarela MCP que aplica listas blancas de rutas estrictas y montajes de volรบmenes de solo lectura.

3. WebContainers del lado del cliente (sandbox nativo en navegador)

Pioneros de la mano de StackBlitz, los WebContainers ejecutan un entorno de ejecuciรณn completo de Node.js y WebAssembly directamente dentro de la pestaรฑa del navegador del usuario.
  • Cero costos de infraestructura: El agente ejecuta scripts en la CPU del cliente.
  • Cero riesgo de seguridad en el servidor: Los scripts maliciosos no pueden escapar hacia su servidor porque se ejecutan dentro del sandbox nativo de JavaScript del navegador.
  • Limitaciรณn: Restringido a los entornos de ejecuciรณn de WebAssembly y JavaScript/Node.js; soporte limitado para extensiones nativas en C o paquetes de Python de alto consumo de memoria.
---

Implementaciรณn en Producciรณn: Construcciรณn de un Sandbox Seguro para Agentes en Python

La siguiente clase de Python lista para producciรณn demuestra cรณmo un orquestador de agentes autรณnomos ejecuta comandos de Python y Bash no confiables dentro de un sandbox Firecracker de E2B con tiempos de espera estrictos, aislamiento de entorno y captura de errores:

"""
Production AI Agent Sandbox Executor using E2B Firecracker MicroVMs
Ecosystem: Python 3.11+, E2B Code Interpreter SDK v1.0+
"""

import os
from typing import Dict, Any, Optional, List
from e2b_code_interpreter import Sandbox

class AgentSandboxExecutor:
    """
    Manages secure, ephemeral execution environments for autonomous coding agents.
    Provides hardware-isolated MicroVM sandboxes with bidirectional file transfer,
    strict execution timeouts, and automatic resource cleanup.
    """
    def __init__(self, template: str = "python-3", timeout_seconds: int = 120):
        self.template = template
        self.default_timeout = timeout_seconds

    def execute_agent_code(
        self, 
        code: str, 
        input_files: Optional[Dict[str, str]] = None,
        timeout: Optional[int] = None
    ) -> Dict[str, Any]:
        """
        Executes arbitrary agent code inside a dedicated Firecracker MicroVM.
        
        Args:
            code: The Python script generated by the LLM.
            input_files: Dict of {filename: content} to inject prior to execution.
            timeout: Maximum execution duration in seconds.
            
        Returns:
            Dict containing execution status, stdout, stderr, and generated artifacts.
        """
        exec_timeout = timeout or self.default_timeout
        artifacts: List[Dict[str, str]] = []
        
        # Spawn an ephemeral, hardware-isolated Firecracker MicroVM (~150ms)
        with Sandbox.create(template=self.template, timeout=exec_timeout) as sandbox:
            try:
                # Step 1: Pre-populate workspace files
                if input_files:
                    for path, content in input_files.items():
                        sandbox.files.write(path, content)

                # Step 2: Execute code with interactive output streaming
                execution = sandbox.run_code(
                    code,
                    timeout=exec_timeout,
                    on_stdout=lambda text: None, # Optional real-time streaming hook
                    on_stderr=lambda text: None
                )

                # Step 3: Extract generated visual artifacts (Matplotlib plots, PNGs, SVGs)
                if execution.results:
                    for idx, result in enumerate(execution.results):
                        if result.png:
                            artifacts.append({
                                "type": "png",
                                "name": f"artifact_{idx}.png",
                                "data": result.png
                            })
                        elif result.chart:
                            artifacts.append({
                                "type": "json_chart",
                                "name": f"chart_{idx}.json",
                                "data": str(result.chart)
                            })

                # Step 4: Verify execution success
                is_success = execution.error is None
                error_payload = None
                if not is_success:
                    error_payload = {
                        "name": execution.error.name,
                        "value": execution.error.value,
                        "traceback": execution.error.traceback
                    }

                return {
                    "success": is_success,
                    "stdout": "\n".join([str(log) for log in execution.logs.stdout]),
                    "stderr": "\n".join([str(log) for log in execution.logs.stderr]),
                    "error": error_payload,
                    "artifacts": artifacts
                }

            except TimeoutError:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": "Execution exceeded hard wall-clock timeout limit.",
                    "error": {"name": "TimeoutError", "value": f"Execution exceeded {exec_timeout}s limit"},
                    "artifacts": []
                }
            except Exception as e:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": str(e),
                    "error": {"name": type(e).__name__, "value": str(e)},
                    "artifacts": []
                }

Matriz de Comparaciรณn Arquitectรณnica

La siguiente matriz compara las 4 arquitecturas lรญderes de ejecuciรณn de agentes en 2026 a travรฉs de dimensiones crรญticas de ingenierรญa:

DimensiรณnE2B (Firecracker MicroVM)Modal Labs (Contenedores Serverless)Docker + gVisor (runsc)WebContainers (Wasm en el Navegador)
Mecanismo de AislamientoHipervisor KVM por hardware (AWS Firecracker)Virtualizaciรณn de contenedores en espacio de usuarioIntercepciรณn de syscalls del kernel de Go en espacio de usuarioSandbox de JavaScript / WebAssembly en navegador
Latencia de Inicio en Frรญo120 โ€“ 180 ms600 โ€“ 1.200 ms1.500 โ€“ 3.500 ms50 โ€“ 100 ms (Lado del cliente)
Persistencia del EstadoSesiones REPL interactivas con estado (stateful)Funciones efรญmeras + Network File SystemCiclo de vida del contenedor con estadoMemoria de la pestaรฑa del navegador
Aceleraciรณn por GPURoadmap / Nubes privadas empresarialesDe primer nivel (NVIDIA L4 a H100)Passthrough de GPU autoalojado (nvidia-container-runtime)Ninguna (cรณmputo WebGPU experimental)
REPL Interactivo / StdinNativo (Modelo de Jupyter celda por celda)Batch / streaming no interactivoConfigurable mediante pseudo-TTY (pty)Emulador de terminal nativo de Node.js
Seguridad de Salida de Red (Egress)Aislamiento total de namespaces + Cortafuegos de salidaPeering de VPC configurable + Lista de permitidosiptables a nivel de host / Cilium eBPFLimitado por polรญticas CORS / Fetch del navegador
Modelo de DespliegueNube gestionada o dedicada empresarialNube gestionada100% autoalojado en Bare Metal / K8s100% en navegador del lado del cliente
Modelo de PreciosPor segundo de sandbox (~$0.000028/seg)Facturaciรณn por segundo de CPU/Memoria/GPUCostes fijos de infraestructura del host$0.00 Coste de Infraestructura
Mejor Caso de Uso en ProducciรณnAgentes de programaciรณn interactivos, bots de ciencia de datosTareas por lotes pesadas, tareas de agentes distribuidos, cรณdigo de GPUStacks empresariales aislados (air-gapped) y de cumplimiento normativoPlaygrounds puros del lado del cliente, herramientas educativas
---

Buenas Prรกcticas de Seguridad en Producciรณn y Aspectos Econรณmicos de Costes

Ejecutar millones de ejecuciones de cรณdigo de agentes cada mes requiere lรญmites operativos estrictos para evitar facturas en la nube descontroladas y brechas de seguridad.

1. Lista de Verificaciรณn de Fortalecimiento (Hardening) para Sandboxes de Agentes

  • Aplicar Tiempos de Espera Estrictos de Reloj Real (Wall-Clock): Nunca dependa de tiempos de espera dentro del cรณdigo (por ejemplo, Python signal.alarm). Configure siempre terminaciones forzadas (hard kills) a nivel de hipervisor (por ejemplo, timeout = 60s). Si un agente genera un bucle infinito while True, el host destruye la MicroVM automรกticamente.
  • Bloquear Endpoints de Metadatos en la Nube: Implemente reglas explรญcitas de cortafuegos de salida que bloqueen 169.254.169.254 y rangos CIDR privados locales (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) para eliminar ataques SSRF.
  • Sistema de Archivos Raรญz de Solo Lectura con Montajes Efรญmeros: Haga que la imagen base del sistema del sandbox sea inmutable. Monte una carpeta tmpfs efรญmera /workspace con cuotas estrictas de disco (por ejemplo, 512MB) para prevenir ataques de agotamiento de disco.
  • Sanear Bรบferes de Salida: Limite las capturas de stdout y stderr a 100KB para evitar el agotamiento de memoria en su servidor orquestador si el agente intenta imprimir un flujo infinito de caracteres aleatorios.
Cost Model Breakdown (10,000 Agent Sandbox Executions / Month):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Platform               โ”‚ Estimated Cost    โ”‚ Operational Overhead                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ E2B Managed Cloud      โ”‚ ~$35 - $60 / mo   โ”‚ Zero server management. Instant API.     โ”‚
โ”‚ Modal Labs (CPU only)  โ”‚ ~$40 - $70 / mo   โ”‚ Zero server management. Decorator syntax.โ”‚
โ”‚ Self-Hosted Kubernetes โ”‚ ~$350 - $600 / mo โ”‚ High (Cluster maintenance, KVM nodes).  โ”‚
โ”‚ WebContainers (Client) โ”‚ $0.00 / mo        โ”‚ Zero backend cost (Browser execution).   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ Seguridad y Privacidad de los Datos en Sandboxing de Cรณdigo:

Cuando los agentes ejecutan cรณdigo que contiene cรณdigo fuente propietario, tokens de API empresariales o PII de clientes, asegรบrese de que las instantรกneas (snapshots) del sandbox se borren de la memoria del host inmediatamente al finalizar la sesiรณn. Verifique que su proveedor de sandbox en la nube firme Acuerdos de Asociaciรณn Comercial (BAA) y proporcione informes de cumplimiento SOC2 Type II con garantรญas de persistencia de datos cero.

---

Resumen y Recomendaciรณn Arquitectรณnica

En 2026, el sandboxing seguro no es una caracterรญstica opcional: es el prerrequisito fundamental para los agentes de IA autรณnomos:

  • Si estรก creando asistentes de cรณdigo interactivos, ingenieros de software autรณnomos o agentes analistas de datos, adopte E2B por sus Firecracker MicroVMs de menos de un segundo y sus completas capacidades de streaming REPL.
  • Si sus agentes realizan procesamiento masivo de datos en paralelo, entrenamiento automatizado de modelos o tareas dependientes de GPU, despliegue Modal.
  • Si su empresa requiere residencia estricta de datos on-premise, despliegue Docker con Google gVisor (runsc) o Kata Containers en su clรบster interno de Kubernetes.
  • Si su aplicaciรณn se ejecuta completamente en el navegador del usuario, construya sobre WebContainers.

Explore Herramientas Relacionadas de Sandbox e Infraestructura de Agentes en AgDex.ai:

  • E2B โ€” Sandboxes seguros Firecracker MicroVM para agentes de IA autรณnomos.
  • Modal โ€” Contenedores en la nube serverless de alto rendimiento y ejecuciรณn en GPU.
  • OpenHands โ€” Plataforma de cรณdigo abierto para agentes autรณnomos de desarrollo de software.
  • SWE-agent โ€” Sistema de benchmark y ejecuciรณn de agentes para la resoluciรณn de issues de GitHub.
--- Publicado por AgDex.ai โ€” El directorio lรญder de recursos y benchmarks para agentes de IA.

Sicherheit & Sandboxing Architektur-Leitfaden September 2026 ยท 15 Min. Lesezeit

AI Agent Sandboxing & Sichere Code-Ausfรผhrung 2026: E2B, Modal, Docker und Firecracker im Vergleich

Im Jahr 2026 haben sich autonome KI-Coding-Agenten von passiven Chatbots zu echten Produktivsystemen entwickelt. Doch der direkte Zugriff von LLMs auf Shell-Umgebungen birgt gravierende Sicherheitsrisiken. Dieser praxisnahe Architektur-Leitfaden vergleicht Firecracker MicroVMs, E2B, Modal Labs, Docker gVisor und WebContainers fรผr zuverlรคssige und isolierte Agenten-Ausfรผhrungen.

Im Jahr 2026 sind autonome KI-Agenten keine passiven Konversations-Chatbots mehr. Ganz gleich, ob es sich um einen autonomen Software-Ingenieur wie Claude Code, OpenHands oder SWE-agent, einen Datenanalysten-Agenten, der Pandas-Skripte schreibt, oder einen automatisierten Systemadministrator handelt, der Bash-Befehle ausfรผhrt: Moderne KI-Agenten benรถtigen grundlegend die Fรคhigkeit, beliebigen Code zu schreiben und auszufรผhren.

Einem nicht-deterministischen Large Language Model Zugriff auf eine Shell-Ausfรผhrungsumgebung zu gewรคhren, birgt jedoch erhebliche Sicherheits- und Betriebsrisiken:

  • Was passiert, wenn ein autonomer Agent in eine rekursive Schleife gerรคt, die rm -rf / ausfรผhrt oder den Speicherplatz fรผllt?
  • Was passiert, wenn ein Agent bรถsartigen Drittanbieter-Code ausfรผhrt, der aus einem nicht verifizierten PyPI/NPM-Paket bezogen wurde?
  • Was passiert, wenn ein Agent einen Server-Side Request Forgery (SSRF)-Angriff initiiert, um den internen AWS-Instanz-Metadaten-Endpunkt (http://169.254.169.254/latest/meta-data/) abzufragen und Zugangsdaten von Produktionsdatenbanken zu exfiltrieren?
Standard-Anwendungscontainer (wie natives Docker auf einem Shared Host) wurden fรผr vorhersehbare Anwendungs-Microservices entwickelt โ€“ nicht fรผr die Ausfรผhrung von nicht vertrauenswรผrdigem, beliebigem, von LLMs generiertem Code.

Um dieses Problem zu lรถsen, hat sich der Infrastruktur-Stack fรผr Agenten im Jahr 2026 auf ephemere MicroVM-Sandboxes und spezialisierte Plattformen zur Code-Ausfรผhrung standardisiert.

Dieser Architektur-Leitfaden vergleicht die wichtigsten Sandboxing-Technologien, die 2026 von produktiven KI-Agenten eingesetzt werden: E2B (Firecracker MicroVMs), Modal Labs, gehรคrtete Container (Docker MCP & gVisor) und clientseitige WebContainers. Wir untersuchen Isolationsgrenzen, Startlatenz, interaktives State-Management, reale Wirtschaftlichkeit und konkreten Implementierungscode fรผr produktive Agentensysteme.

Kurzรผbersicht & Architekturgrenzen

๐Ÿ’ก Architektur-Hinweis:
  • Wรคhlen Sie E2B (Firecracker MicroVMs), wenn Ihre autonomen Agenten dedizierte interaktive Umgebungen, bidirektionale Dateisynchronisierung, Bootzeiten von unter einer Sekunde (~150 ms) und langlebige interaktive REPL/Jupyter-Sitzungen mit Streaming von Rich Artifacts benรถtigen.
  • Wรคhlen Sie Modal Labs, wenn Ihre Agenten-Workloads burstfรคhige Serverless-Compute-Ressourcen, anspruchsvolle Python-Scientific-Pakete, verteilte Batch-Datenverarbeitung oder bedarfsgerechte GPU-Beschleunigung erfordern (z. B. lokale Embedding-Generierung oder Fine-Tuning innerhalb der Sandbox).
  • Wรคhlen Sie Docker mit gVisor (runsc) oder Kata Containers, wenn Sie die gesamte Agentenausfรผhrung strikt On-Premises in Ihrer eigenen bestehenden Kubernetes-Infrastruktur behalten mรผssen und keinen Code an externe Cloud-Anbieter รผbermitteln kรถnnen.
  • Wรคhlen Sie WebContainers / WebAssembly (Wasm), wenn Sie eine 100 % clientseitige Agentenausfรผhrung wรผnschen, die vollstรคndig im Browser des Nutzers lรคuft und Server-Infrastrukturkosten sowie serverseitige Sicherheitsrisiken vollstรคndig eliminiert.
โšก WICHTIG:
  • Virtualisierungsstufe: Einfache Container teilen sich den Host-Linux-Kernel (anfรคllig fรผr Kernel-Exploits). MicroVMs (Firecracker) starten fรผr jede Agentenaufgabe einen unabhรคngigen, minimalen Linux-Kernel, der durch Hardware-Virtualisierung (KVM) abgesichert ist, und gewรคhrleisten so eine echte Isolation auf Hypervisor-Ebene.
  • Lebenszyklusmodell: Interaktive Agenten-Sandboxes mรผssen zustandsbehaftete Multi-Turn-Befehle unterstรผtzen (Dateien in Schritt 1 erstellen, in Schritt 4 untersuchen) โ€“ mit strikter Durchsetzung von Wall-Clock-Timeouts.
---

Die 3 strukturellen Fehlermodi traditioneller Container fรผr KI-Agenten

Warum kรถnnen Engineering-Teams nicht einfach einen Docker-Container auf ihrem Backend starten und Agentenbefehle รผber docker exec ausfรผhren? In der Produktion treten drei kritische Fehlermodi auf:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 1. The Kernel Privilege Escalation & Container Escape Vulnerability                    โ”‚
โ”‚    Failure: Standard Docker containers share the host kernel. If an LLM-generated      โ”‚
โ”‚    script triggers an unpatched Linux kernel vulnerability (e.g., dirty COW variants,  โ”‚
โ”‚    cgroup v1 escapes, or ptrace bypasses), the agent gains root on the underlying      โ”‚
โ”‚    bare-metal host. Mounting `/var/run/docker.sock` inside the agent container gives   โ”‚
โ”‚    the LLM trivial, unfettered root access to the entire cluster.                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. The Cold Start vs. State Drift Dilemma                                              โ”‚
โ”‚    Failure: Standard Docker containers take 2 to 5 seconds to boot and pull layers.   โ”‚
โ”‚    If you spin up a fresh container per command, multi-turn agent workflows become     โ”‚
โ”‚    unbearably sluggish. If you keep a long-lived shared container, zombie processes,  โ”‚
โ”‚    corrupted disk states, and cross-session variable leaks cause silent agent failures.โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. The Unrestricted Network Poisoning & SSRF Threat                                    โ”‚
โ”‚    Failure: Agents frequently need outbound internet access to install libraries or    โ”‚
โ”‚    fetch documentation. But without strict kernel-level eBPF egress filtering, the     โ”‚
โ”‚    agent can port-scan internal VPC subnets, access Kubernetes service account tokens,  โ”‚
โ”‚    or reach cloud metadata endpoints to steal IAM credentials.                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Kerntechnologie 1: Firecracker MicroVMs & E2B

Die Firecracker-Revolution

Ursprรผnglich von AWS fรผr den Betrieb von AWS Lambda und Fargate entwickelt, ist Firecracker eine in Rust geschriebene Open-Source-Virtualisierungstechnologie. Sie nutzt Linux Kernel-based Virtual Machines (KVM), um leichtgewichtige virtuelle Maschinen namens MicroVMs zu instanziieren.

Im Gegensatz zu herkรถmmlichen Hypervisoren (QEMU), die veraltete PC-Hardware (PCI-Busse, IDE-Controller) emulieren, verzichtet Firecracker auf alle nicht zwingend erforderlichen virtuellen Gerรคte. Eine Firecracker MicroVM enthรคlt lediglich einen minimalen Kernel, virtio-Netzwerk- und -Block-Treiber sowie eine serielle Konsole:

  • Startlatenz: Startet in weniger als 150 Millisekunden.
  • Speicherbedarf: Rund 5 MB RAM-Overhead pro MicroVM.
  • Dichte: Tausende isolierte MicroVMs kรถnnen gleichzeitig auf einem einzelnen physischen Host ausgefรผhrt werden.

Wie E2B MicroVMs fรผr Agenten praxistauglich macht

E2B ist eine zweckgebundene Entwicklerinfrastruktur, die Firecracker MicroVMs speziell fรผr autonome KI-Agenten bereitstellt.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        AI Agent Orchestrator                          โ”‚
โ”‚            (LangChain / LangGraph / AutoGen / Custom Loop)             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚ E2B Python / TypeScript SDK
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ E2B Sandbox Cloud (Firecracker MicroVM Cluster)                        โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Ephemeral Sandbox (Hardware KVM Isolation)                         โ”‚ โ”‚
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ Python / REPL Kernel โ”‚ โ”‚ Bash Shell Stream โ”‚ โ”‚ File System    โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ (Rich Output/Plots)  โ”‚ โ”‚ (Stdout/Stderr)   โ”‚ โ”‚ (Bidirectional)โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Wichtige Architektur-Fรคhigkeiten von E2B:

1. Interaktiver REPL & Code-Interpreter: Unterstรผtzt kontinuierliche interaktive Code-Ausfรผhrung. In Turn 1 erstellte Variablen, Funktionen und Speicherzustรคnde bleiben รผber nachfolgende Turns in derselben Sandbox-Sitzung hinweg erhalten. 2. Rich-Media-Streaming: Erfasst stdout, stderr, Matplotlib-Plots, Diagramme und Tabellen-Artefakte direkt รผber WebSocket/gRPC-Streams. 3. Benutzerdefinierte Sandbox-Templates: Entwickler kรถnnen benutzerdefinierte Dockerfile-basierte Vorlagen (mit vorinstallierten Compilern, Node.js, Python-Paketen und CLI-Tools) vorab erstellen, die zu sofort startbaren Firecracker-Snapshots kompiliert werden. 4. Strikte Sicherheitsgrenzen: Vollstรคndige Netzwerk-Namespace-Isolation, konfigurierbare Egress-Firewalls und strikte CPU/Speicher-cgroup-Limits.

Kerntechnologie 2: Modal Labs (Serverless Python & GPU-Beschleunigung)

Wรคhrend E2B fรผr interaktive dialogbasierte REPL-Sandboxes optimiert ist, stellt Modal den Goldstandard fรผr eine rechenintensive Serverless-Agentenausfรผhrung mit hohem Durchsatz dar.

Modal nutzt eine spezialisierte Linux-Container-Virtualisierung mit benutzerdefinierten Userspace-Dateitreibern, wodurch Remote-Container-Sandboxes in unter 1 Sekunde booten und Terabytes an Cloud-Speicher als lokale Verzeichnisse einbinden kรถnnen.

import modal

app = modal.App("agent-code-executor")

# Define a sandboxed container image with all needed libraries
agent_image = (
    modal.Image.debian_slim()
    .pip_install("pandas", "numpy", "scikit-learn", "sympy")
)

@app.function(
    image=agent_image,
    timeout=60,                # Strict 60-second execution cap
    cpu=2.0,                   # Dedicated compute allocation
    memory=2048,               # 2GB RAM ceiling
    network_file_systems={"/workspace": modal.NetworkFileSystem.from_name("agent-storage")}
)
def execute_agent_code(python_code: str) -> dict:
    import sys
    from io import StringIO
    
    old_stdout = sys.stdout
    redirected_output = sys.stdout = StringIO()
    
    try:
        exec(python_code, {})
        return {"success": True, "output": redirected_output.getvalue(), "error": None}
    except Exception as e:
        return {"success": False, "output": redirected_output.getvalue(), "error": str(e)}
    finally:
        sys.stdout = old_stdout

Wann Modal gegenรผber E2B zu wรคhlen ist:

  • GPU-Beschleunigung: Modal ermรถglicht es einem Agenten, eine dedizierte NVIDIA L4-, A10G- oder H100-GPU innerhalb der Sandbox mit einer einzigen Code-Annotation anzufordern (gpu="L4"), sodass der Agent lokale KI-Modell-Inferenz, Embeddings oder CUDA-Code ausfรผhren kann.
  • Massive Parallelitรคt: Ein Agent kann 1.000 parallele Sandboxes gleichzeitig auffรคchern (z. B. zum Testen von 1.000 generierten Unit-Tests รผber ein bestehendes Repository hinweg) โ€“ mit automatischer Scale-to-Zero-Wirtschaftlichkeit.
---

Kerntechnologie 3: Gehรคrtete Self-Hosted-Container (Docker MCP, gVisor, WebContainers)

1. Google gVisor (runsc)

Fรผr Enterprise-Organisationen, denen es durch Compliance-Vorschriften untersagt ist, Kundencode an Sandbox-Clouds von Drittanbietern zu senden, ist gVisor die fรผhrende Self-Hosted-Lรถsung.

gVisor agiert als ein in Go geschriebener Userspace-Kernel. Anstatt dass Anwendungscontainer direkte Systemaufrufe an den Host-Linux-Kernel durchfรผhren, fรคngt gVisor alle Systemaufrufe ab und reimplementiert sie in einer sicheren Sandbox-Schicht:

  • Wenn ein Agenten-Skript versucht, einen Zero-Day-Kernel-Exploit auszunutzen, trifft es auf den gVisor-Sandbox-Speicher statt auf den Host-Linux-Kernel.
  • Lรคsst sich nahtlos in Standard-Docker (docker run --runtime=runsc) und Kubernetes (runtimeClassName: gvisor) integrieren.

2. Docker mit Model Context Protocol (MCP)

Im Jahr 2026 hat sich Docker direkt in Anthropics Model Context Protocol (MCP) integriert. Docker-MCP-Server ermรถglichen es Agenten, auf isolierte Container-Funktionen als explizite Tools zuzugreifen, anstatt rohe Root-Shells zu verwenden. Der Agent fordert spezifische Operationen an (z. B. run_python_script, read_workspace_file), vermittelt รผber ein MCP-Gateway, das strenge Pfad-Whitelists und Read-Only-Volume-Mounts durchsetzt.

3. Clientseitige WebContainers (Browser-native Sandbox)

Von StackBlitz pionierhaft entwickelt, fรผhren WebContainers eine vollstรคndige Node.js- und WebAssembly-Laufzeitumgebung direkt im Browser-Tab des Nutzers aus.
  • Keine Infrastrukturkosten: Der Agent fรผhrt Skripte auf der CPU des Clients aus.
  • Kein serverseitiges Sicherheitsrisiko: Bรถsartige Skripte kรถnnen nicht auf Ihren Server ausbrechen, da sie innerhalb der nativen JavaScript-Sandbox des Browsers ausgefรผhrt werden.
  • Einschrรคnkung: Auf WebAssembly- und JavaScript/Node.js-Laufzeitumgebungen beschrรคnkt; eingeschrรคnkte Unterstรผtzung fรผr native C-Erweiterungen oder speicherintensive Python-Pakete.
---

Produktionsreife Implementierung: Aufbau einer sicheren Agenten-Sandbox in Python

Die folgende produktionsreife Python-Klasse zeigt, wie ein Orchestrator fรผr autonome Agenten nicht vertrauenswรผrdige Python- und Bash-Befehle innerhalb einer E2B-Firecracker-Sandbox mit strikten Timeouts, Umgebungsisolation und Fehlerabfangung ausfรผhrt:

"""
Production AI Agent Sandbox Executor using E2B Firecracker MicroVMs
Ecosystem: Python 3.11+, E2B Code Interpreter SDK v1.0+
"""

import os
from typing import Dict, Any, Optional, List
from e2b_code_interpreter import Sandbox

class AgentSandboxExecutor:
    """
    Manages secure, ephemeral execution environments for autonomous coding agents.
    Provides hardware-isolated MicroVM sandboxes with bidirectional file transfer,
    strict execution timeouts, and automatic resource cleanup.
    """
    def __init__(self, template: str = "python-3", timeout_seconds: int = 120):
        self.template = template
        self.default_timeout = timeout_seconds

    def execute_agent_code(
        self, 
        code: str, 
        input_files: Optional[Dict[str, str]] = None,
        timeout: Optional[int] = None
    ) -> Dict[str, Any]:
        """
        Executes arbitrary agent code inside a dedicated Firecracker MicroVM.
        
        Args:
            code: The Python script generated by the LLM.
            input_files: Dict of {filename: content} to inject prior to execution.
            timeout: Maximum execution duration in seconds.
            
        Returns:
            Dict containing execution status, stdout, stderr, and generated artifacts.
        """
        exec_timeout = timeout or self.default_timeout
        artifacts: List[Dict[str, str]] = []
        
        # Spawn an ephemeral, hardware-isolated Firecracker MicroVM (~150ms)
        with Sandbox.create(template=self.template, timeout=exec_timeout) as sandbox:
            try:
                # Step 1: Pre-populate workspace files
                if input_files:
                    for path, content in input_files.items():
                        sandbox.files.write(path, content)

                # Step 2: Execute code with interactive output streaming
                execution = sandbox.run_code(
                    code,
                    timeout=exec_timeout,
                    on_stdout=lambda text: None, # Optional real-time streaming hook
                    on_stderr=lambda text: None
                )

                # Step 3: Extract generated visual artifacts (Matplotlib plots, PNGs, SVGs)
                if execution.results:
                    for idx, result in enumerate(execution.results):
                        if result.png:
                            artifacts.append({
                                "type": "png",
                                "name": f"artifact_{idx}.png",
                                "data": result.png
                            })
                        elif result.chart:
                            artifacts.append({
                                "type": "json_chart",
                                "name": f"chart_{idx}.json",
                                "data": str(result.chart)
                            })

                # Step 4: Verify execution success
                is_success = execution.error is None
                error_payload = None
                if not is_success:
                    error_payload = {
                        "name": execution.error.name,
                        "value": execution.error.value,
                        "traceback": execution.error.traceback
                    }

                return {
                    "success": is_success,
                    "stdout": "\n".join([str(log) for log in execution.logs.stdout]),
                    "stderr": "\n".join([str(log) for log in execution.logs.stderr]),
                    "error": error_payload,
                    "artifacts": artifacts
                }

            except TimeoutError:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": "Execution exceeded hard wall-clock timeout limit.",
                    "error": {"name": "TimeoutError", "value": f"Execution exceeded {exec_timeout}s limit"},
                    "artifacts": []
                }
            except Exception as e:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": str(e),
                    "error": {"name": type(e).__name__, "value": str(e)},
                    "artifacts": []
                }

Architektur-Vergleichsmatrix

Die folgende Matrix vergleicht die 4 fรผhrenden Architekturen zur Agentenausfรผhrung im Jahr 2026 anhand entscheidender technischer Dimensionen:

DimensionE2B (Firecracker MicroVM)Modal Labs (Serverless-Container)Docker + gVisor (runsc)WebContainers (In-Browser-Wasm)
IsolationsmechanismusHardware-KVM-Hypervisor (AWS Firecracker)Userspace-Container-VirtualisierungSyscall-Interzeption durch Go-Kernel im UserspaceBrowser-JavaScript- / WebAssembly-Sandbox
Kaltstart-Latenz120 โ€“ 180 ms600 โ€“ 1.200 ms1.500 โ€“ 3.500 ms50 โ€“ 100 ms (Client-seitig)
ZustandspersistenzZustandsbehaftete interaktive REPL-SitzungenEphemere Funktionen + Network File SystemZustandsbehafteter Container-LebenszyklusBrowser-Tab-Speicher
GPU-BeschleunigungRoadmap / Private Enterprise-CloudsErstklassig (NVIDIA L4 bis H100)Self-Hosted GPU-Passthrough (nvidia-container-runtime)Keine (WebGPU Compute experimentell)
Interaktive REPL / StdinNativ (Zellenbasiertes Jupyter-Modell)Nicht-interaktives Batch / StreamingKonfigurierbar รผber Pseudo-TTY (pty)Nativer Node.js-Terminalemulator
Netzwerk-Egress-SicherheitVollstรคndige Namespace-Isolation + Egress-FirewallsKonfigurierbares VPC-Peering + AllowlistHost-Level iptables / Cilium eBPFEingeschrรคnkt durch Browser-CORS- / Fetch-Richtlinien
BereitstellungsmodellManaged Cloud oder Enterprise DedicatedManaged Cloud100 % Self-Hosted auf Bare Metal / K8s100 % clientseitig im Browser
PreismodellPro Sandbox-Sekunde (~0,000028 $/Sek.)Sekundengenaue Abrechnung von CPU/Arbeitsspeicher/GPUFeste Host-Infrastrukturkosten0,00 $ Infrastrukturkosten
Optimaler PraxiseinsatzInteraktive Coding-Agenten, Data-Science-BotsRechenintensive Batch-Aufgaben, verteilte Agenten-Workloads, GPU-CodeAir-Gapped- und Compliance-Stacks in UnternehmenReine clientseitige Playgrounds, Bildungstools
---

Best Practices fรผr Produktionssicherheit & Kostenรถkonomie

Die monatliche Durchfรผhrung von Millionen von Code-Ausfรผhrungen durch Agenten erfordert strikte operative Rahmenbedingungen, um explodierende Cloud-Kosten und Sicherheitsverletzungen zu verhindern.

1. Die Hรคrtungs-Checkliste fรผr Agenten-Sandboxes

  • Strikte Wall-Clock-Timeouts erzwingen: Verlassen Sie sich niemals auf Timeouts im Code (z. B. Python signal.alarm). Konfigurieren Sie immer harte Kills auf Hypervisor-Ebene (z. B. timeout = 60s). Wenn ein Agent eine unendliche while True-Schleife generiert, beendet der Host die MicroVM automatisch.
  • Cloud-Metadaten-Endpunkte blockieren: Implementieren Sie explizite Egress-Firewall-Regeln, die 169.254.169.254 und lokale private CIDR-Bereiche (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) blockieren, um SSRF-Angriffe auszuschlieรŸen.
  • Schreibgeschรผtztes Root-Dateisystem mit ephemeren Mounts: Machen Sie das Basis-Systemabbild der Sandbox unverรคnderlich (immutable). Binden Sie einen ephemeren /workspace-tmpfs-Ordner mit festen Festplatten-Quotas (z. B. 512 MB) ein, um Angriffe durch Festplattenerschรถpfung zu verhindern.
  • Ausgabepuffer bereinigen und begrenzen: Begrenzen Sie die Erfassung von stdout und stderr auf 100 KB, um eine Speichererschรถpfung auf Ihrem Orchestrator-Server zu verhindern, falls der Agent versucht, einen endlosen Strom zufรคlliger Zeichen auszugeben.
Cost Model Breakdown (10,000 Agent Sandbox Executions / Month):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Platform               โ”‚ Estimated Cost    โ”‚ Operational Overhead                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ E2B Managed Cloud      โ”‚ ~$35 - $60 / mo   โ”‚ Zero server management. Instant API.     โ”‚
โ”‚ Modal Labs (CPU only)  โ”‚ ~$40 - $70 / mo   โ”‚ Zero server management. Decorator syntax.โ”‚
โ”‚ Self-Hosted Kubernetes โ”‚ ~$350 - $600 / mo โ”‚ High (Cluster maintenance, KVM nodes).  โ”‚
โ”‚ WebContainers (Client) โ”‚ $0.00 / mo        โ”‚ Zero backend cost (Browser execution).   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ Datensicherheit & Datenschutz beim Code-Sandboxing:

Wenn Agenten Code ausfรผhren, der proprietรคren Quellcode, geschรคftliche API-Tokens oder personenbezogene Kundendaten (PII) enthรคlt, stellen Sie sicher, dass Sandbox-Snapshots nach Beendigung der Sitzung unverzรผglich aus dem Host-Speicher gelรถscht werden. Vergewissern Sie sich, dass Ihr Cloud-Sandbox-Anbieter Business Associate Agreements (BAA) unterzeichnet und SOC2-Type-II-Compliance-Berichte mit Garantien fรผr eine Null-Datenpersistenz vorlegt.

---

Zusammenfassung & Architekturempfehlung

Im Jahr 2026 ist sicheres Sandboxing keine optionale Funktion โ€“ es ist die grundlegende Voraussetzung fรผr autonome KI-Agenten:

  • Wenn Sie interaktive Coding-Assistenten, autonome Software-Ingenieure oder Datenanalysten-Agenten entwickeln, setzen Sie auf E2B aufgrund seiner Firecracker-MicroVMs mit Startzeiten im Subsekundenbereich und umfangreichen REPL-Streaming-Funktionen.
  • Wenn Ihre Agenten massive parallele Datenverarbeitung, automatisiertes Modelltraining oder GPU-abhรคngige Aufgaben durchfรผhren, setzen Sie Modal ein.
  • Wenn Ihr Unternehmen strikte On-Premise-Datenresidenz erfordert, implementieren Sie Docker mit Google gVisor (runsc) oder Kata Containers auf Ihrem internen Kubernetes-Cluster.
  • Wenn Ihre Anwendung vollstรคndig im Browser des Benutzers lรคuft, bauen Sie auf WebContainers auf.

Entdecken Sie verwandte Sandbox- & Agenten-Infrastruktur-Tools auf AgDex.ai:

  • E2B โ€” Sichere Firecracker-MicroVM-Sandboxes fรผr autonome KI-Agenten.
  • Modal โ€” Hochperformante Serverless-Cloud-Container und GPU-Ausfรผhrung.
  • OpenHands โ€” Open-Source-Plattform fรผr autonome Softwareentwicklungs-Agenten.
  • SWE-agent โ€” Benchmark- und Agenten-Ausfรผhrungssystem zur Lรถsung von GitHub-Issues.
--- Verรถffentlicht von AgDex.ai โ€” Das fรผhrende Ressourcen- & Benchmark-Verzeichnis fรผr KI-Agenten.

ใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃ๏ผ†ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚น ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃ่จญ่จˆใ‚ฌใ‚คใƒ‰ 2026ๅนด9ๆœˆ ยท ่ชญไบ†็›ฎๅฎ‰15ๅˆ†

ใ€2026ๅนด็‰ˆใ€‘่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎๅฎ‰ๅ…จใชใ‚ณใƒผใƒ‰ๅฎŸ่กŒ็’ฐๅขƒใƒปใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นๅพนๅบ•ๆฏ”่ผƒ๏ผšE2B vs Modal vs Docker

2026ๅนดใ€่‡ชๅพ‹ๅž‹AIใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏๅ˜ใชใ‚‹ใƒใƒฃใƒƒใƒˆใƒœใƒƒใƒˆใ‚’่ถ…ใˆใ€ๆœฌ็•ช็’ฐๅขƒใฎใ‚ฝใƒ•ใƒˆใ‚ฆใ‚งใ‚ข้–‹็™บใ‚’่‡ชๅพ‹้‚่กŒใ™ใ‚‹ๅญ˜ๅœจใจใชใ‚Šใพใ—ใŸใ€‚ใ—ใ‹ใ—ใ€LLMใซใ‚ทใ‚งใƒซๅฎŸ่กŒ็’ฐๅขƒใ‚’ไป˜ไธŽใ™ใ‚‹ใ“ใจใฏ้‡ๅคงใชใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃใƒชใ‚นใ‚ฏใ‚’ไผดใ„ใพใ™ใ€‚ๆœฌ็จฟใงใฏFirecracker MicroVMใ€E2Bใ€Modal Labsใ€Docker gVisorใ€WebContainersใฎๅˆ†้›ขๅขƒ็•Œใ€่ตทๅ‹•ใƒฌใ‚คใƒ†ใƒณใ‚ทใ€้‹็”จใ‚ณใ‚นใƒˆใ‚’ๅพนๅบ•ๆฏ”่ผƒใ—ใพใ™ใ€‚

2026ๅนดใ€่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏใ‚‚ใฏใ‚„ๅ—ๅ‹•็š„ใชๅฏพ่ฉฑๅž‹ใƒใƒฃใƒƒใƒˆใƒœใƒƒใƒˆใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚Claude Codeใ€OpenHandsใ€SWE-agentใฎใ‚ˆใ†ใช่‡ชๅพ‹ๅž‹ใ‚ฝใƒ•ใƒˆใ‚ฆใ‚งใ‚ขใ‚จใƒณใ‚ธใƒ‹ใ‚ขใงใ‚ใ‚Œใ€Pandasใ‚นใ‚ฏใƒชใƒ—ใƒˆใ‚’ไฝœๆˆใ™ใ‚‹ใƒ‡ใƒผใ‚ฟใ‚ขใƒŠใƒชใ‚นใƒˆใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใงใ‚ใ‚Œใ€bashใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹่‡ชๅ‹•ๅŒ–ใ•ใ‚ŒใŸใ‚ทใ‚นใƒ†ใƒ ็ฎก็†่€…ใงใ‚ใ‚Œใ€็พไปฃใฎAIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซใฏไปปๆ„ใฎใ‚ณใƒผใƒ‰ใ‚’่จ˜่ฟฐใƒปๅฎŸ่กŒใ™ใ‚‹่ƒฝๅŠ›ใŒๆ นๆœฌ็š„ใซๆฑ‚ใ‚ใ‚‰ใ‚Œใฆใ„ใพใ™ใ€‚

ใ—ใ‹ใ—ใ€้žๆฑบๅฎš็š„ใชๅคง่ฆๆจก่จ€่ชžใƒขใƒ‡ใƒซ๏ผˆLLM๏ผ‰ใซใ‚ทใ‚งใƒซๅฎŸ่กŒ็’ฐๅขƒใธใฎใ‚ขใ‚ฏใ‚ปใ‚นๆจฉใ‚’ไธŽใˆใ‚‹ใ“ใจใฏใ€ๆทฑๅˆปใชใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃไธŠใŠใ‚ˆใณ้‹็”จไธŠใฎ่„†ๅผฑๆ€งใ‚’ใ‚‚ใŸใ‚‰ใ—ใพใ™๏ผš

  • ่‡ชๅพ‹ๅž‹ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒๅ†ๅธฐใƒซใƒผใƒ—ใซ้™ฅใ‚Šใ€rm -rf / ใ‚’ๅฎŸ่กŒใ—ใŸใ‚Šใƒ‡ใ‚ฃใ‚นใ‚ฏใ‚นใƒˆใƒฌใƒผใ‚ธใ‚’ๆžฏๆธ‡ใ•ใ›ใŸใ‚Šใ—ใŸๅ ดๅˆใฏใฉใ†ใชใ‚‹ใงใ—ใ‚‡ใ†ใ‹๏ผŸ
  • ๆคœ่จผใ•ใ‚Œใฆใ„ใชใ„PyPI/NPMใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ‹ใ‚‰ๅ–ๅพ—ใ—ใŸๆ‚ชๆ„ใฎใ‚ใ‚‹ใ‚ตใƒผใƒ‰ใƒ‘ใƒผใƒ†ใ‚ฃใ‚ณใƒผใƒ‰ใ‚’ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒๅฎŸ่กŒใ—ใŸๅ ดๅˆใฏใฉใ†ใชใ‚‹ใงใ—ใ‚‡ใ†ใ‹๏ผŸ
  • ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒServer-Side Request Forgery๏ผˆSSRF๏ผ‰ๆ”ปๆ’ƒใ‚’ไป•ๆŽ›ใ‘ใ€ๅ†…้ƒจใฎAWSใ‚คใƒณใ‚นใ‚ฟใƒณใ‚นใƒกใ‚ฟใƒ‡ใƒผใ‚ฟใ‚จใƒณใƒ‰ใƒใ‚คใƒณใƒˆ๏ผˆhttp://169.254.169.254/latest/meta-data/๏ผ‰ใซใ‚ฏใ‚จใƒชใ‚’้€ไฟกใ—ใฆๆœฌ็•ชใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใฎ่ช่จผๆƒ…ๅ ฑใ‚’็ชƒๅ–ใ—ใŸๅ ดๅˆใฏใฉใ†ใชใ‚‹ใงใ—ใ‚‡ใ†ใ‹๏ผŸ
ๆจ™ๆบ–็š„ใชใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใ‚ณใƒณใƒ†ใƒŠ๏ผˆๅ…ฑๆœ‰ใƒ›ใ‚นใƒˆไธŠใฎใƒ™ใ‚ขDockerใชใฉ๏ผ‰ใฏใ€ไบˆๆธฌๅฏ่ƒฝใชใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใƒžใ‚คใ‚ฏใƒญใ‚ตใƒผใƒ“ใ‚นๅ‘ใ‘ใซ่จญ่จˆใ•ใ‚ŒใŸใ‚‚ใฎใงใ‚ใ‚Šใ€ไฟก้ ผใงใใชใ„ใ€LLMใŒ็”Ÿๆˆใ—ใŸไปปๆ„ใฎใ‚ณใƒผใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹ใŸใ‚ใฎใ‚‚ใฎใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚

ใ“ใ‚Œใ‚’่งฃๆฑบใ™ใ‚‹ใŸใ‚ใ€2026ๅนดใฎใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚คใƒณใƒ•ใƒฉใ‚นใƒˆใƒฉใ‚ฏใƒใƒฃใ‚นใ‚ฟใƒƒใ‚ฏใฏใ€ใ‚จใƒ•ใ‚งใƒกใƒฉใƒซใชMicroVMใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใจ็‰นๅŒ–ๅž‹ใ‚ณใƒผใƒ‰ๅฎŸ่กŒใƒ—ใƒฉใƒƒใƒˆใƒ•ใ‚ฉใƒผใƒ ใ‚’ไธญๅฟƒใซๆจ™ๆบ–ๅŒ–ใŒ้€ฒใ‚“ใงใ„ใพใ™ใ€‚

ๆœฌใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใ‚ฌใ‚คใƒ‰ใงใฏใ€2026ๅนดใฎๆœฌ็•ช็’ฐๅขƒAIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใงๅˆฉ็”จใ•ใ‚Œใฆใ„ใ‚‹ไธป่ฆใชใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นๆŠ€่ก“ใ‚’ๆฏ”่ผƒใ—ใพใ™๏ผšE2B๏ผˆFirecracker MicroVMs๏ผ‰ใ€Modal Labsใ€ๅ …็‰ขๅŒ–ใ•ใ‚ŒใŸใ‚ณใƒณใƒ†ใƒŠ๏ผˆDocker MCP & gVisor๏ผ‰ใ€ใใ—ใฆใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใ‚ตใ‚คใƒ‰WebContainersใ€‚้š”้›ขๅขƒ็•Œใ€่ตทๅ‹•ใƒฌใ‚คใƒ†ใƒณใ‚ทใ€ใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใช็Šถๆ…‹็ฎก็†ใ€ๅฎŸ็’ฐๅขƒใงใฎใ‚ณใ‚นใƒˆๅŠน็އใ€ใใ—ใฆๆœฌ็•ชใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ทใ‚นใƒ†ใƒ ๅ‘ใ‘ใฎๅ…ทไฝ“็š„ใชๅฎŸ่ฃ…ใ‚ณใƒผใƒ‰ใซใคใ„ใฆๆคœ่จผใ—ใพใ™ใ€‚

ใ‚ฏใ‚คใƒƒใ‚ฏใ‚ตใƒžใƒชใƒผใจใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใฎๅขƒ็•Œ

๐Ÿ’ก ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃไธŠใฎๆณจๆ„๏ผš
  • E2B๏ผˆFirecracker MicroVMs๏ผ‰ใ‚’้ธๆŠžใ™ในใๅ ดๅˆ: ่‡ชๅพ‹ๅž‹ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซๅฐ‚็”จใฎใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–็’ฐๅขƒใ€ๅŒๆ–นๅ‘ใฎใƒ•ใ‚กใ‚คใƒซๅŒๆœŸใ€1็ง’ๆœชๆบ€ใฎ้ซ˜้€Ÿ่ตทๅ‹•๏ผˆ็ด„150ms๏ผ‰ใ€ใใ—ใฆใƒชใƒƒใƒใชๆˆๆžœ็‰ฉใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐใ‚’ไผดใ†้•ทๆ™‚้–“็จผๅƒใฎใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใชREPL/Jupyterใ‚ปใƒƒใ‚ทใƒงใƒณใŒๅฟ…่ฆใชๅ ดๅˆใ€‚
  • Modal Labsใ‚’้ธๆŠžใ™ในใๅ ดๅˆ: ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใƒฏใƒผใ‚ฏใƒญใƒผใƒ‰ใซใ€ใƒใƒผใ‚นใƒˆๅฏ่ƒฝใชใ‚ตใƒผใƒใƒผใƒฌใ‚นใ‚ณใƒณใƒ”ใƒฅใƒผใƒˆใ€ๅคง่ฆๆจกใชPython็ง‘ๅญฆ่จˆ็ฎ—ใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ€ๅˆ†ๆ•ฃใƒใƒƒใƒใƒ‡ใƒผใ‚ฟๅ‡ฆ็†ใ€ใพใŸใฏใ‚ชใƒณใƒ‡ใƒžใƒณใƒ‰ใฎGPUใ‚ขใ‚ฏใ‚ปใƒฉใƒฌใƒผใ‚ทใƒงใƒณ๏ผˆไพ‹๏ผšใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นๅ†…ใงใฎใƒญใƒผใ‚ซใƒซใชๅŸ‹ใ‚่พผใฟ็”Ÿๆˆใ‚„ใƒ•ใ‚กใ‚คใƒณใƒใƒฅใƒผใƒ‹ใƒณใ‚ฐ๏ผ‰ใŒๅฟ…่ฆใชๅ ดๅˆใ€‚
  • gVisor๏ผˆrunsc๏ผ‰ใพใŸใฏKata Containersใ‚’ไฝฟ็”จใ—ใŸDockerใ‚’้ธๆŠžใ™ในใๅ ดๅˆ: ใ™ในใฆใฎใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅฎŸ่กŒใ‚’ๆ—ขๅญ˜ใฎKubernetesใ‚คใƒณใƒ•ใƒฉใ‚นใƒˆใƒฉใ‚ฏใƒใƒฃๅ†…ใฎๅŽณๆ ผใชใ‚ชใƒณใƒ—ใƒฌใƒŸใ‚นใซ็•™ใ‚ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใ€ใ‚ตใƒผใƒ‰ใƒ‘ใƒผใƒ†ใ‚ฃใฎใ‚ฏใƒฉใ‚ฆใƒ‰ใƒ—ใƒญใƒใ‚คใƒ€ใƒผใซใ‚ณใƒผใƒ‰ใ‚’้€ไฟกใงใใชใ„ๅ ดๅˆใ€‚
  • WebContainers / WebAssembly๏ผˆWasm๏ผ‰ใ‚’้ธๆŠžใ™ในใๅ ดๅˆ: ใƒฆใƒผใ‚ถใƒผใฎใƒ–ใƒฉใ‚ฆใ‚ถๅ†…ใงๅฎŒๅ…จใซๅ‹•ไฝœใ™ใ‚‹100%ใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใ‚ตใ‚คใƒ‰ใฎใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅฎŸ่กŒใ‚’ๅธŒๆœ›ใ—ใ€ใ‚ตใƒผใƒใƒผใฎใ‚คใƒณใƒ•ใƒฉใ‚ณใ‚นใƒˆใŠใ‚ˆใณใ‚ตใƒผใƒใƒผๅดใฎใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃใƒชใ‚นใ‚ฏใ‚’ๅฎŒๅ…จใซๆŽ’้™คใ—ใŸใ„ๅ ดๅˆใ€‚
โšก ้‡่ฆไบ‹้ …๏ผš
  • ไปฎๆƒณๅŒ–ใƒฌใƒ™ใƒซ: ใƒ™ใ‚ขใ‚ณใƒณใƒ†ใƒŠใฏใƒ›ใ‚นใƒˆใฎLinuxใ‚ซใƒผใƒใƒซใ‚’ๅ…ฑๆœ‰ใ—ใพใ™๏ผˆใ‚ซใƒผใƒใƒซใ‚จใ‚ฏใ‚นใƒ—ใƒญใ‚คใƒˆใซๅฏพใ—ใฆ่„†ๅผฑ๏ผ‰ใ€‚ไธ€ๆ–นใ€MicroVM๏ผˆFirecracker๏ผ‰ใฏใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ขไปฎๆƒณๅŒ–๏ผˆKVM๏ผ‰ใซๆ”ฏใˆใ‚‰ใ‚ŒใŸ็‹ฌ็ซ‹ใ—ใŸๆœ€ๅฐ้™ใฎLinuxใ‚ซใƒผใƒใƒซใ‚’ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใ‚ฟใ‚นใ‚ฏใ”ใจใซ่ตทๅ‹•ใ—ใ€็œŸใฎใƒใ‚คใƒ‘ใƒผใƒใ‚คใ‚ถใƒผใƒฌใƒ™ใƒซใฎๅˆ†้›ขใ‚’ไฟ่จผใ—ใพใ™ใ€‚
  • ใƒฉใ‚คใƒ•ใ‚ตใ‚คใ‚ฏใƒซใƒขใƒ‡ใƒซ: ใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใชใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใฏใ€ๅŽณๆ ผใชๅฎŸ็ตŒ้Žๆ™‚้–“๏ผˆwall-clock๏ผ‰ใ‚ฟใ‚คใƒ ใ‚ขใ‚ฆใƒˆใ‚’ๅผทๅˆถใ—ใชใŒใ‚‰ใ€ใ‚นใƒ†ใƒผใƒˆใƒ•ใƒซใชใƒžใƒซใƒใ‚ฟใƒผใƒณใ‚ณใƒžใƒณใƒ‰๏ผˆใ‚นใƒ†ใƒƒใƒ—1ใงใƒ•ใ‚กใ‚คใƒซใ‚’ไฝœๆˆใ—ใ€ใ‚นใƒ†ใƒƒใƒ—4ใงใใ‚Œใ‚’ๆคœๆŸปใ™ใ‚‹ใชใฉ๏ผ‰ใ‚’ใ‚ตใƒใƒผใƒˆใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™ใ€‚
---

AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซใŠใ‘ใ‚‹ๅพ“ๆฅใฎใ‚ณใƒณใƒ†ใƒŠใฎ3ๅคงๆง‹้€ ็š„้šœๅฎณใƒขใƒผใƒ‰

ใชใœใ‚จใƒณใ‚ธใƒ‹ใ‚ขใƒชใƒณใ‚ฐใƒใƒผใƒ ใฏใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ใงๅ˜็ด”ใซDockerใ‚ณใƒณใƒ†ใƒŠใ‚’่ตทๅ‹•ใ—ใ€docker exec ็ตŒ็”ฑใงใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใ‚ณใƒžใƒณใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹ใ ใ‘ใงใฏใ„ใ‘ใชใ„ใฎใงใ—ใ‚‡ใ†ใ‹๏ผŸ ๆœฌ็•ช็’ฐๅขƒใงใฏใ€3ใคใฎ่‡ดๅ‘ฝ็š„ใช้šœๅฎณใƒขใƒผใƒ‰ใŒ็”Ÿใ˜ใพใ™๏ผš

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 1. The Kernel Privilege Escalation & Container Escape Vulnerability                    โ”‚
โ”‚    Failure: Standard Docker containers share the host kernel. If an LLM-generated      โ”‚
โ”‚    script triggers an unpatched Linux kernel vulnerability (e.g., dirty COW variants,  โ”‚
โ”‚    cgroup v1 escapes, or ptrace bypasses), the agent gains root on the underlying      โ”‚
โ”‚    bare-metal host. Mounting `/var/run/docker.sock` inside the agent container gives   โ”‚
โ”‚    the LLM trivial, unfettered root access to the entire cluster.                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. The Cold Start vs. State Drift Dilemma                                              โ”‚
โ”‚    Failure: Standard Docker containers take 2 to 5 seconds to boot and pull layers.   โ”‚
โ”‚    If you spin up a fresh container per command, multi-turn agent workflows become     โ”‚
โ”‚    unbearably sluggish. If you keep a long-lived shared container, zombie processes,  โ”‚
โ”‚    corrupted disk states, and cross-session variable leaks cause silent agent failures.โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. The Unrestricted Network Poisoning & SSRF Threat                                    โ”‚
โ”‚    Failure: Agents frequently need outbound internet access to install libraries or    โ”‚
โ”‚    fetch documentation. But without strict kernel-level eBPF egress filtering, the     โ”‚
โ”‚    agent can port-scan internal VPC subnets, access Kubernetes service account tokens,  โ”‚
โ”‚    or reach cloud metadata endpoints to steal IAM credentials.                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ใ‚ณใ‚ขใƒ†ใ‚ฏใƒŽใƒญใ‚ธใƒผ1๏ผšFirecracker MicroVMs & E2B

Firecracker้ฉๅ‘ฝ

ใ‚‚ใจใ‚‚ใจAWS Lambdaใ‚„Fargateใ‚’ๆ”ฏใˆใ‚‹ใŸใ‚ใซAWSใซใ‚ˆใฃใฆ้–‹็™บใ•ใ‚ŒใŸFirecrackerใฏใ€Rustใงๆ›ธใ‹ใ‚ŒใŸใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎไปฎๆƒณๅŒ–ๆŠ€่ก“ใงใ™ใ€‚LinuxใฎKernel-based Virtual Machine๏ผˆKVM๏ผ‰ใ‚’ๅˆฉ็”จใ—ใฆใ€MicroVMใจๅ‘ผใฐใ‚Œใ‚‹่ปฝ้‡ใชไปฎๆƒณใƒžใ‚ทใƒณใ‚’่ตทๅ‹•ใ—ใพใ™ใ€‚

ใƒฌใ‚ฌใ‚ทใƒผใชPCใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ข๏ผˆPCIใƒใ‚นใ‚„IDEใ‚ณใƒณใƒˆใƒญใƒผใƒฉใƒผใชใฉ๏ผ‰ใ‚’ใ‚จใƒŸใƒฅใƒฌใƒผใƒˆใ™ใ‚‹ๅพ“ๆฅใฎใƒใ‚คใƒ‘ใƒผใƒใ‚คใ‚ถใƒผ๏ผˆQEMU๏ผ‰ใจใฏ็•ฐใชใ‚Šใ€Firecrackerใฏไธ่ฆใชไปฎๆƒณใƒ‡ใƒใ‚คใ‚นใ‚’ใ™ในใฆๅ‰ŠใŽ่ฝใจใ—ใฆใ„ใพใ™ใ€‚Firecracker MicroVMใซๅซใพใ‚Œใ‚‹ใฎใฏใ€ๆœ€ๅฐ้™ใฎใ‚ซใƒผใƒใƒซใ€virtioใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใŠใ‚ˆใณใƒ–ใƒญใƒƒใ‚ฏใƒ‰ใƒฉใ‚คใƒใ€ใใ—ใฆใ‚ทใƒชใ‚ขใƒซใ‚ณใƒณใ‚ฝใƒผใƒซใฎใฟใงใ™๏ผš

  • ่ตทๅ‹•ใƒฌใ‚คใƒ†ใƒณใ‚ท: 150ใƒŸใƒช็ง’ๆœชๆบ€ใง่ตทๅ‹•ใ€‚
  • ใƒกใƒขใƒชใƒ•ใƒƒใƒˆใƒ—ใƒชใƒณใƒˆ: MicroVMใ‚ใŸใ‚ŠใฎRAMใ‚ชใƒผใƒใƒผใƒ˜ใƒƒใƒ‰ใฏใ‚ใšใ‹็ด„5MBใ€‚
  • ้›†็ด„ๅฏ†ๅบฆ: ๅ˜ไธ€ใฎ็‰ฉ็†ใƒ›ใ‚นใƒˆไธŠใงๆ•ฐๅƒใฎ้š”้›ขใ•ใ‚ŒใŸMicroVMใ‚’ๅŒๆ™‚ใซๅฎŸ่กŒๅฏ่ƒฝใ€‚

E2BใŒใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅ‘ใ‘ใซMicroVMใ‚’ๆœฌ็•ช้‹็”จๅŒ–ใ™ใ‚‹ไป•็ต„ใฟ

E2Bใฏใ€่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅฐ‚็”จใซFirecracker MicroVMใ‚’ใƒ‘ใƒƒใ‚ฑใƒผใ‚ธๅŒ–ใ—ใŸใ€ๅฐ‚็”จ่จญ่จˆใฎ้–‹็™บ่€…ๅ‘ใ‘ใ‚คใƒณใƒ•ใƒฉใ‚นใƒˆใƒฉใ‚ฏใƒใƒฃใงใ™ใ€‚

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        AI Agent Orchestrator                          โ”‚
โ”‚            (LangChain / LangGraph / AutoGen / Custom Loop)             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚ E2B Python / TypeScript SDK
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ E2B Sandbox Cloud (Firecracker MicroVM Cluster)                        โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Ephemeral Sandbox (Hardware KVM Isolation)                         โ”‚ โ”‚
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ Python / REPL Kernel โ”‚ โ”‚ Bash Shell Stream โ”‚ โ”‚ File System    โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ (Rich Output/Plots)  โ”‚ โ”‚ (Stdout/Stderr)   โ”‚ โ”‚ (Bidirectional)โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

E2Bใฎไธป่ฆใชใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃๆฉŸ่ƒฝ๏ผš

1. ใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใชREPL & ใ‚ณใƒผใƒ‰ใ‚คใƒณใ‚ฟใƒผใƒ—ใƒชใ‚ฟ: ็ถ™็ถš็š„ใ‹ใคใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใชใ‚ณใƒผใƒ‰ๅฎŸ่กŒใ‚’ใ‚ตใƒใƒผใƒˆใ—ใพใ™ใ€‚ใ‚ฟใƒผใƒณ1ใงไฝœๆˆใ•ใ‚ŒใŸๅค‰ๆ•ฐใ€้–ขๆ•ฐใ€ใƒกใƒขใƒช็Šถๆ…‹ใฏใ€ๅŒไธ€ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใ‚ปใƒƒใ‚ทใƒงใƒณๅ†…ใฎๅพŒ็ถšใ‚ฟใƒผใƒณใงใ‚‚ไฟๆŒใ•ใ‚Œใพใ™ใ€‚ 2. ใƒชใƒƒใƒใƒกใƒ‡ใ‚ฃใ‚ขใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐ: ๆจ™ๆบ–ๅ‡บๅŠ›๏ผˆstdout๏ผ‰ใ€ๆจ™ๆบ–ใ‚จใƒฉใƒผๅ‡บๅŠ›๏ผˆstderr๏ผ‰ใ€matplotlibใƒ—ใƒญใƒƒใƒˆใ€ใƒใƒฃใƒผใƒˆใ€ใƒ†ใƒผใƒ–ใƒซๆˆๆžœ็‰ฉใ‚’ใ€WebSocket/gRPCใ‚นใƒˆใƒชใƒผใƒ ็ตŒ็”ฑใง็›ดๆŽฅใ‚ญใƒฃใƒ—ใƒใƒฃใ—ใพใ™ใ€‚ 3. ใ‚ซใ‚นใ‚ฟใƒ ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใƒ†ใƒณใƒ—ใƒฌใƒผใƒˆ: ้–‹็™บ่€…ใฏ๏ผˆใ‚ณใƒณใƒ‘ใ‚คใƒฉใ€Node.jsใ€Pythonใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใ€CLIใƒฆใƒผใƒ†ใ‚ฃใƒชใƒ†ใ‚ฃใ‚’ไบ‹ๅ‰ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ—ใŸ๏ผ‰็‹ฌ่‡ชใฎDockerfileใƒ™ใƒผใ‚นใฎใƒ†ใƒณใƒ—ใƒฌใƒผใƒˆใ‚’ไบ‹ๅ‰ๆง‹็ฏ‰ใ—ใ€็žฌๆ™‚ใซ่ตทๅ‹•ๅฏ่ƒฝใชFirecrackerใ‚นใƒŠใƒƒใƒ—ใ‚ทใƒงใƒƒใƒˆใซใ‚ณใƒณใƒ‘ใ‚คใƒซใงใใพใ™ใ€‚ 4. ๅผทๅ›บใชใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃๅขƒ็•Œ: ๅฎŒๅ…จใชใƒใƒƒใƒˆใƒฏใƒผใ‚ฏๅๅ‰็ฉบ้–“ใฎๅˆ†้›ขใ€่จญๅฎšๅฏ่ƒฝใชใ‚จใ‚ฐใƒฌใ‚นใƒ•ใ‚กใ‚คใ‚ขใ‚ฆใ‚ฉใƒผใƒซใ€CPU/ใƒกใƒขใƒชใฎๅŽณๆ ผใชcgroupๅˆถ้™ใ‚’ๅ‚™ใˆใฆใ„ใพใ™ใ€‚

ใ‚ณใ‚ขใƒ†ใ‚ฏใƒŽใƒญใ‚ธใƒผ2๏ผšModal Labs๏ผˆใ‚ตใƒผใƒใƒผใƒฌใ‚นPythonใจGPUใ‚ขใ‚ฏใ‚ปใƒฉใƒฌใƒผใ‚ทใƒงใƒณ๏ผ‰

E2BใŒๅฏพ่ฉฑๅž‹ใฎใ‚คใƒณใ‚ฟใƒฉใ‚ฏใƒ†ใ‚ฃใƒ–ใชREPLใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใซๆœ€้ฉๅŒ–ใ•ใ‚Œใฆใ„ใ‚‹ใฎใซๅฏพใ—ใ€Modalใฏ้ซ˜ใ‚นใƒซใƒผใƒ—ใƒƒใƒˆใงใ‚ณใƒณใƒ”ใƒฅใƒผใƒˆ้›†ไธญๅž‹ใฎใ‚ตใƒผใƒใƒผใƒฌใ‚นใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅฎŸ่กŒใซใŠใ‘ใ‚‹ใ‚ดใƒผใƒซใƒ‰ใ‚นใ‚ฟใƒณใƒ€ใƒผใƒ‰๏ผˆๆฑบๅฎš็‰ˆ๏ผ‰ใงใ™ใ€‚

Modalใฏใ‚ซใ‚นใ‚ฟใƒ ใƒฆใƒผใ‚ถใƒผใ‚นใƒšใƒผใ‚นใƒ•ใ‚กใ‚คใƒซใƒ‰ใƒฉใ‚คใƒใ‚’ๅ‚™ใˆใŸ็‰นๅŒ–ๅž‹ใฎLinuxใ‚ณใƒณใƒ†ใƒŠไปฎๆƒณๅŒ–ใ‚’ๆŽก็”จใ—ใฆใŠใ‚Šใ€ใƒ†ใƒฉใƒใ‚คใƒˆ่ฆๆจกใฎใ‚ฏใƒฉใ‚ฆใƒ‰ใ‚นใƒˆใƒฌใƒผใ‚ธใ‚’ใƒญใƒผใ‚ซใƒซใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใจใ—ใฆใƒžใ‚ฆใƒณใƒˆใ—ใชใŒใ‚‰ใ€ใƒชใƒขใƒผใƒˆใ‚ณใƒณใƒ†ใƒŠใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใ‚’1็ง’ๆœชๆบ€ใง่ตทๅ‹•ใงใใพใ™ใ€‚

import modal

app = modal.App("agent-code-executor")

# Define a sandboxed container image with all needed libraries
agent_image = (
    modal.Image.debian_slim()
    .pip_install("pandas", "numpy", "scikit-learn", "sympy")
)

@app.function(
    image=agent_image,
    timeout=60,                # Strict 60-second execution cap
    cpu=2.0,                   # Dedicated compute allocation
    memory=2048,               # 2GB RAM ceiling
    network_file_systems={"/workspace": modal.NetworkFileSystem.from_name("agent-storage")}
)
def execute_agent_code(python_code: str) -> dict:
    import sys
    from io import StringIO
    
    old_stdout = sys.stdout
    redirected_output = sys.stdout = StringIO()
    
    try:
        exec(python_code, {})
        return {"success": True, "output": redirected_output.getvalue(), "error": None}
    except Exception as e:
        return {"success": False, "output": redirected_output.getvalue(), "error": str(e)}
    finally:
        sys.stdout = old_stdout

E2BใงใฏใชใModalใ‚’้ธๆŠžใ™ในใใƒฆใƒผใ‚นใ‚ฑใƒผใ‚น๏ผš

  • GPUใ‚ขใ‚ฏใ‚ปใƒฉใƒฌใƒผใ‚ทใƒงใƒณ: Modalใงใฏใ€ใ‚ณใƒผใƒ‰ไธŠใฎใ‚ขใƒŽใƒ†ใƒผใ‚ทใƒงใƒณ1่กŒ๏ผˆgpu="L4"๏ผ‰ใงใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นๅ†…ใซๅฐ‚็”จใฎNVIDIA L4ใ€A10Gใ€ใพใŸใฏH100 GPUใ‚’ใƒชใ‚ฏใ‚จใ‚นใƒˆใงใใ€ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒใƒญใƒผใ‚ซใƒซAIใƒขใƒ‡ใƒซใฎๆŽจ่ซ–ใ€ๅŸ‹ใ‚่พผใฟใƒ™ใ‚ฏใƒˆใƒซใฎ็”Ÿๆˆใ€ใพใŸใฏCUDAใ‚ณใƒผใƒ‰ใ‚’ๅฎŸ่กŒใงใใพใ™ใ€‚
  • ๅคง่ฆๆจกใชไธฆๅˆ—ๅ‡ฆ็†: ่‡ชๅ‹•ใ‚นใ‚ฑใƒผใƒซใƒปใƒˆใ‚ฅใƒปใ‚ผใƒญใซใ‚ˆใ‚‹ๅ„ชใ‚ŒใŸใ‚ณใ‚นใƒˆๅŠน็އใฎใ‚‚ใจใ€ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏ1,000ๅ€‹ใฎใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใ‚’ๅŒๆ™‚ใซใƒ•ใ‚กใƒณใ‚ขใ‚ฆใƒˆ๏ผˆไธฆ่กŒๅฑ•้–‹๏ผ‰ใงใใพใ™๏ผˆไพ‹๏ผšใƒฌใ‚ฌใ‚ทใƒผใƒชใƒใ‚ธใƒˆใƒชๅ…จไฝ“ใซใ‚ใŸใฃใฆ็”Ÿๆˆใ•ใ‚ŒใŸ1,000ๅ€‹ใฎๅ˜ไฝ“ใƒ†ใ‚นใƒˆใ‚’ไธฆ่กŒๅฎŸ่กŒใ™ใ‚‹ใชใฉ๏ผ‰ใ€‚
---

ใ‚ณใ‚ขใƒ†ใ‚ฏใƒŽใƒญใ‚ธใƒผ3๏ผšๅ …็‰ขๅŒ–ใ•ใ‚ŒใŸใ‚ปใƒซใƒ•ใƒ›ใ‚นใƒˆๅž‹ใ‚ณใƒณใƒ†ใƒŠ๏ผˆDocker MCPใ€gVisorใ€WebContainers๏ผ‰

1. Google gVisor๏ผˆrunsc๏ผ‰

ใ‚ณใƒณใƒ—ใƒฉใ‚คใ‚ขใƒณใ‚น่ฆๅˆถใซใ‚ˆใ‚Š้กงๅฎขใ‚ณใƒผใƒ‰ใ‚’ใ‚ตใƒผใƒ‰ใƒ‘ใƒผใƒ†ใ‚ฃใฎใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใ‚ฏใƒฉใ‚ฆใƒ‰ใซ้€ไฟกใ™ใ‚‹ใ“ใจใŒ็ฆๆญขใ•ใ‚Œใฆใ„ใ‚‹ใ‚จใƒณใ‚ฟใƒผใƒ—ใƒฉใ‚คใ‚บ็ต„็น”ใซใจใฃใฆใ€gVisorใฏไปฃ่กจ็š„ใชใ‚ปใƒซใƒ•ใƒ›ใ‚นใƒˆๅž‹ใ‚ฝใƒชใƒฅใƒผใ‚ทใƒงใƒณใงใ™ใ€‚

gVisorใฏGoใงๆ›ธใ‹ใ‚ŒใŸใƒฆใƒผใ‚ถใƒผใ‚นใƒšใƒผใ‚นใ‚ซใƒผใƒใƒซใจใ—ใฆๆฉŸ่ƒฝใ—ใพใ™ใ€‚ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใ‚ณใƒณใƒ†ใƒŠใŒใƒ›ใ‚นใƒˆใฎLinuxใ‚ซใƒผใƒใƒซใซ็›ดๆŽฅใ‚ทใ‚นใƒ†ใƒ ใ‚ณใƒผใƒซใ‚’็™บ่กŒใ™ใ‚‹ไปฃใ‚ใ‚Šใซใ€gVisorใŒๅฎ‰ๅ…จใชใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใƒฌใ‚คใƒคใƒผใงใ™ในใฆใฎใ‚ทใ‚นใƒ†ใƒ ใ‚ณใƒผใƒซใ‚’ใ‚คใƒณใ‚ฟใƒผใ‚ปใƒ—ใƒˆ๏ผˆๆ•ๆ‰๏ผ‰ใ—ใฆๅ†ๅฎŸ่ฃ…ใ—ใพใ™๏ผš

  • ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚นใ‚ฏใƒชใƒ—ใƒˆใŒใ‚ซใƒผใƒใƒซใฎใ‚ผใƒญใƒ‡ใ‚ค่„†ๅผฑๆ€งใ‚’็ชใ“ใ†ใจใ—ใฆใ‚‚ใ€ใƒ›ใ‚นใƒˆใฎLinuxใ‚ซใƒผใƒใƒซใงใฏใชใgVisorใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใฎใƒกใƒขใƒช็ฉบ้–“ใซ่ก็ชใ—ใพใ™ใ€‚
  • ๆจ™ๆบ–ใฎDocker๏ผˆdocker run --runtime=runsc๏ผ‰ใ‚„Kubernetes๏ผˆruntimeClassName: gvisor๏ผ‰ใซๅฎนๆ˜“ใซ็ตฑๅˆๅฏ่ƒฝใงใ™ใ€‚

2. Model Context Protocol๏ผˆMCP๏ผ‰ๅฏพๅฟœDocker

2026ๅนดใ€DockerใฏAnthropicใฎModel Context Protocol๏ผˆMCP๏ผ‰ใจ็›ดๆŽฅ็ตฑๅˆใ•ใ‚Œใพใ—ใŸใ€‚Docker MCPใ‚ตใƒผใƒใƒผใซใ‚ˆใ‚Šใ€ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏ็”Ÿใฎrootใ‚ทใ‚งใƒซใงใฏใชใใ€ๆ˜Ž็คบ็š„ใชใƒ„ใƒผใƒซใจใ—ใฆ้š”้›ขใ•ใ‚ŒใŸใ‚ณใƒณใƒ†ใƒŠๆฉŸ่ƒฝใซใ‚ขใ‚ฏใ‚ปใ‚นใงใใ‚‹ใ‚ˆใ†ใซใชใ‚Šใพใ™ใ€‚ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏ็‰นๅฎšใฎๆ“ไฝœ๏ผˆไพ‹๏ผšrun_python_scriptใ€read_workspace_file๏ผ‰ใ‚’ใƒชใ‚ฏใ‚จใ‚นใƒˆใ—ใ€MCPใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚คใŒใใ‚Œใ‚’ไปฒไป‹ใ—ใฆๅŽณๆ ผใชใƒ‘ใ‚นใƒ›ใƒฏใ‚คใƒˆใƒชใ‚นใƒˆใจ่ชญใฟๅ–ใ‚Šๅฐ‚็”จใƒœใƒชใƒฅใƒผใƒ ใƒžใ‚ฆใƒณใƒˆใ‚’้ฉ็”จใ—ใพใ™ใ€‚

3. ใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใ‚ตใ‚คใƒ‰WebContainers๏ผˆใƒ–ใƒฉใ‚ฆใ‚ถใƒใ‚คใƒ†ใ‚ฃใƒ–ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚น๏ผ‰

StackBlitzใซใ‚ˆใฃใฆๅ…ˆ้ง†ใ‘ใฆ้–‹็™บใ•ใ‚ŒใŸWebContainersใฏใ€ๅฎŒๅ…จใชNode.jsใŠใ‚ˆใณWebAssemblyใƒฉใƒณใ‚ฟใ‚คใƒ ใ‚’ใƒฆใƒผใ‚ถใƒผใฎใƒ–ใƒฉใ‚ฆใ‚ถใ‚ฟใƒ–ๅ†…ใง็›ดๆŽฅๅฎŸ่กŒใ—ใพใ™ใ€‚
  • ใ‚คใƒณใƒ•ใƒฉใ‚ณใ‚นใƒˆใ‚ผใƒญ: ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใฎCPUไธŠใงใ‚นใ‚ฏใƒชใƒ—ใƒˆใ‚’ๅฎŸ่กŒใ—ใพใ™ใ€‚
  • ใ‚ตใƒผใƒใƒผใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃใƒชใ‚นใ‚ฏใ‚ผใƒญ: ใ‚นใ‚ฏใƒชใƒ—ใƒˆใฏใƒ–ใƒฉใ‚ฆใ‚ถใƒใ‚คใƒ†ใ‚ฃใƒ–ใฎJavaScriptใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นๅ†…ใงๅฎŸ่กŒใ•ใ‚Œใ‚‹ใŸใ‚ใ€ๆ‚ชๆ„ใฎใ‚ใ‚‹ใ‚นใ‚ฏใƒชใƒ—ใƒˆใŒใ‚ตใƒผใƒใƒผใธใ‚จใ‚นใ‚ฑใƒผใƒ—ใ™ใ‚‹ใ“ใจใฏไธๅฏ่ƒฝใงใ™ใ€‚
  • ๅˆถ้™ไบ‹้ …: WebAssemblyใŠใ‚ˆใณJavaScript/Node.jsใƒฉใƒณใ‚ฟใ‚คใƒ ใซๅˆถ้™ใ•ใ‚Œใ€็”Ÿใฎใƒใ‚คใƒ†ใ‚ฃใƒ–Cๆ‹กๅผตๆฉŸ่ƒฝใ‚„ๅคงๅฎน้‡ใƒกใƒขใƒชใ‚’ๆถˆ่ฒปใ™ใ‚‹Pythonใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใฎใ‚ตใƒใƒผใƒˆใฏ้™ๅฎš็š„ใงใ™ใ€‚
---

ๆœฌ็•ชๅฎŸ่ฃ…: Pythonใซใ‚ˆใ‚‹ใ‚ปใ‚ญใƒฅใ‚ขใชใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใฎๆง‹็ฏ‰

ไปฅไธ‹ใฎๆœฌ็•ชๅฏพๅฟœใฎPythonใ‚ฏใƒฉใ‚นใฏใ€่‡ชๅพ‹ๅž‹ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ชใƒผใ‚ฑใ‚นใƒˆใƒฌใƒผใ‚ฟใƒผใŒใ€ๅŽณๆ ผใชใ‚ฟใ‚คใƒ ใ‚ขใ‚ฆใƒˆใ€็’ฐๅขƒใฎ้š”้›ขใ€ใ‚จใƒฉใƒผใƒใƒณใƒ‰ใƒชใƒณใ‚ฐ๏ผˆใƒˆใƒฉใƒƒใƒ—๏ผ‰ใ‚’ๅ‚™ใˆใŸE2B Firecrackerใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นๅ†…ใงใ€ไฟก้ ผใงใใชใ„PythonใŠใ‚ˆใณBashใ‚ณใƒžใƒณใƒ‰ใ‚’ใฉใฎใ‚ˆใ†ใซๅฎŸ่กŒใ™ใ‚‹ใ‹ใ‚’็คบใ—ใฆใ„ใพใ™:

"""
Production AI Agent Sandbox Executor using E2B Firecracker MicroVMs
Ecosystem: Python 3.11+, E2B Code Interpreter SDK v1.0+
"""

import os
from typing import Dict, Any, Optional, List
from e2b_code_interpreter import Sandbox

class AgentSandboxExecutor:
    """
    Manages secure, ephemeral execution environments for autonomous coding agents.
    Provides hardware-isolated MicroVM sandboxes with bidirectional file transfer,
    strict execution timeouts, and automatic resource cleanup.
    """
    def __init__(self, template: str = "python-3", timeout_seconds: int = 120):
        self.template = template
        self.default_timeout = timeout_seconds

    def execute_agent_code(
        self, 
        code: str, 
        input_files: Optional[Dict[str, str]] = None,
        timeout: Optional[int] = None
    ) -> Dict[str, Any]:
        """
        Executes arbitrary agent code inside a dedicated Firecracker MicroVM.
        
        Args:
            code: The Python script generated by the LLM.
            input_files: Dict of {filename: content} to inject prior to execution.
            timeout: Maximum execution duration in seconds.
            
        Returns:
            Dict containing execution status, stdout, stderr, and generated artifacts.
        """
        exec_timeout = timeout or self.default_timeout
        artifacts: List[Dict[str, str]] = []
        
        # Spawn an ephemeral, hardware-isolated Firecracker MicroVM (~150ms)
        with Sandbox.create(template=self.template, timeout=exec_timeout) as sandbox:
            try:
                # Step 1: Pre-populate workspace files
                if input_files:
                    for path, content in input_files.items():
                        sandbox.files.write(path, content)

                # Step 2: Execute code with interactive output streaming
                execution = sandbox.run_code(
                    code,
                    timeout=exec_timeout,
                    on_stdout=lambda text: None, # Optional real-time streaming hook
                    on_stderr=lambda text: None
                )

                # Step 3: Extract generated visual artifacts (Matplotlib plots, PNGs, SVGs)
                if execution.results:
                    for idx, result in enumerate(execution.results):
                        if result.png:
                            artifacts.append({
                                "type": "png",
                                "name": f"artifact_{idx}.png",
                                "data": result.png
                            })
                        elif result.chart:
                            artifacts.append({
                                "type": "json_chart",
                                "name": f"chart_{idx}.json",
                                "data": str(result.chart)
                            })

                # Step 4: Verify execution success
                is_success = execution.error is None
                error_payload = None
                if not is_success:
                    error_payload = {
                        "name": execution.error.name,
                        "value": execution.error.value,
                        "traceback": execution.error.traceback
                    }

                return {
                    "success": is_success,
                    "stdout": "\n".join([str(log) for log in execution.logs.stdout]),
                    "stderr": "\n".join([str(log) for log in execution.logs.stderr]),
                    "error": error_payload,
                    "artifacts": artifacts
                }

            except TimeoutError:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": "Execution exceeded hard wall-clock timeout limit.",
                    "error": {"name": "TimeoutError", "value": f"Execution exceeded {exec_timeout}s limit"},
                    "artifacts": []
                }
            except Exception as e:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": str(e),
                    "error": {"name": type(e).__name__, "value": str(e)},
                    "artifacts": []
                }

ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃๆฏ”่ผƒใƒžใƒˆใƒชใ‚ฏใ‚น

ไปฅไธ‹ใฎใƒžใƒˆใƒชใ‚ฏใ‚นใฏใ€2026ๅนดใซใŠใ‘ใ‚‹ไธป่ฆใช4ใคใฎใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅฎŸ่กŒใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใ‚’ใ€้‡่ฆใชใ‚จใƒณใ‚ธใƒ‹ใ‚ขใƒชใƒณใ‚ฐใฎ่ฆณ็‚นใ‹ใ‚‰ๆฏ”่ผƒใ—ใŸใ‚‚ใฎใงใ™:

ๆฏ”่ผƒ้ …็›ฎE2B (Firecracker MicroVM)Modal Labs (Serverless Containers)Docker + gVisor (runsc)WebContainers (In-Browser Wasm)
้š”้›ขใƒกใ‚ซใƒ‹ใ‚บใƒ ใƒใƒผใƒ‰ใ‚ฆใ‚งใ‚ขKVMใƒใ‚คใƒ‘ใƒผใƒใ‚คใ‚ถใƒผ๏ผˆAWS Firecracker๏ผ‰ใƒฆใƒผใ‚ถใƒผ็ฉบ้–“ใ‚ณใƒณใƒ†ใƒŠไปฎๆƒณๅŒ–ใƒฆใƒผใ‚ถใƒผ็ฉบ้–“Goใ‚ซใƒผใƒใƒซใซใ‚ˆใ‚‹ใ‚ทใ‚นใƒ†ใƒ ใ‚ณใƒผใƒซใ‚คใƒณใ‚ฟใƒผใ‚ปใƒ—ใƒˆใƒ–ใƒฉใ‚ฆใ‚ถJavaScript / WebAssemblyใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚น
ใ‚ณใƒผใƒซใƒ‰ใ‚นใ‚ฟใƒผใƒˆใƒฌใ‚คใƒ†ใƒณใ‚ท120 โ€“ 180 ms600 โ€“ 1,200 ms1,500 โ€“ 3,500 ms50 โ€“ 100 ms๏ผˆใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใ‚ตใ‚คใƒ‰๏ผ‰
็Šถๆ…‹ใฎๆฐธ็ถšๅŒ–ใ‚นใƒ†ใƒผใƒˆใƒ•ใƒซใชๅฏพ่ฉฑๅž‹REPLใ‚ปใƒƒใ‚ทใƒงใƒณใ‚จใƒ•ใ‚งใƒกใƒฉใƒซ้–ขๆ•ฐ + ใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใƒ•ใ‚กใ‚คใƒซใ‚ทใ‚นใƒ†ใƒ ใ‚นใƒ†ใƒผใƒˆใƒ•ใƒซใชใ‚ณใƒณใƒ†ใƒŠใƒฉใ‚คใƒ•ใ‚ตใ‚คใ‚ฏใƒซใƒ–ใƒฉใ‚ฆใ‚ถใ‚ฟใƒ–ใƒกใƒขใƒช
GPUใ‚ขใ‚ฏใ‚ปใƒฉใƒฌใƒผใ‚ทใƒงใƒณใƒญใƒผใƒ‰ใƒžใƒƒใƒ— / ใ‚จใƒณใ‚ฟใƒผใƒ—ใƒฉใ‚คใ‚บใƒ—ใƒฉใ‚คใƒ™ใƒผใƒˆใ‚ฏใƒฉใ‚ฆใƒ‰ใƒ•ใ‚กใƒผใ‚นใƒˆใ‚ฏใƒฉใ‚นๅฏพๅฟœ๏ผˆNVIDIA L4ใ€œH100๏ผ‰ใ‚ปใƒซใƒ•ใƒ›ใ‚นใƒˆๅž‹GPUใƒ‘ใ‚นใ‚นใƒซใƒผ๏ผˆnvidia-container-runtime๏ผ‰ใชใ—๏ผˆWebGPUใ‚ณใƒณใƒ”ใƒฅใƒผใƒˆใฏๅฎŸ้จ“็š„๏ผ‰
ๅฏพ่ฉฑๅž‹REPL / ๆจ™ๆบ–ๅ…ฅๅŠ›๏ผˆStdin๏ผ‰ใƒใ‚คใƒ†ใ‚ฃใƒ–ๅฏพๅฟœ๏ผˆใ‚ปใƒซๅ˜ไฝใฎJupyterใƒขใƒ‡ใƒซ๏ผ‰้žๅฏพ่ฉฑๅž‹ใฎใƒใƒƒใƒ / ใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐ็–‘ไผผTTY๏ผˆpty๏ผ‰็ตŒ็”ฑใง่จญๅฎšๅฏ่ƒฝใƒใ‚คใƒ†ใ‚ฃใƒ–Node.jsใ‚ฟใƒผใƒŸใƒŠใƒซใ‚จใƒŸใƒฅใƒฌใƒผใ‚ฟใƒผ
ใƒใƒƒใƒˆใƒฏใƒผใ‚ฏใ‚จใ‚ฐใƒฌใ‚นใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃๅฎŒๅ…จใชๅๅ‰็ฉบ้–“ๅˆ†้›ข + ใ‚จใ‚ฐใƒฌใ‚นใƒ•ใ‚กใ‚คใ‚ขใ‚ฆใ‚ฉใƒผใƒซ่จญๅฎšๅฏ่ƒฝใชVPCใƒ”ใ‚ขใƒชใƒณใ‚ฐ + ่จฑๅฏใƒชใ‚นใƒˆใƒ›ใ‚นใƒˆใƒฌใƒ™ใƒซใฎiptables / Cilium eBPFใƒ–ใƒฉใ‚ฆใ‚ถใฎCORS / Fetchใƒใƒชใ‚ทใƒผใซใ‚ˆใ‚‹ๅˆถ้™
ใƒ‡ใƒ—ใƒญใ‚คใƒขใƒ‡ใƒซใƒžใƒใƒผใ‚ธใƒ‰ใ‚ฏใƒฉใ‚ฆใƒ‰ใพใŸใฏใ‚จใƒณใ‚ฟใƒผใƒ—ใƒฉใ‚คใ‚บๅฐ‚็”จ็’ฐๅขƒใƒžใƒใƒผใ‚ธใƒ‰ใ‚ฏใƒฉใ‚ฆใƒ‰ใƒ™ใ‚ขใƒกใ‚ฟใƒซ / K8sไธŠใงใฎ100%ใ‚ปใƒซใƒ•ใƒ›ใ‚นใƒˆ100%ใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใ‚ตใ‚คใƒ‰ใƒ–ใƒฉใ‚ฆใ‚ถ
ๆ–™้‡‘ใƒขใƒ‡ใƒซใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚น็ง’ๅ˜ไฝ่ชฒ้‡‘๏ผˆ็ด„$0.000028/็ง’๏ผ‰็ง’ๅ˜ไฝใฎCPU/ใƒกใƒขใƒช/GPU่ชฒ้‡‘ๅ›บๅฎšใฎใƒ›ใ‚นใƒˆใ‚คใƒณใƒ•ใƒฉใ‚ณใ‚นใƒˆ$0.00 ใ‚คใƒณใƒ•ใƒฉใ‚ณใ‚นใƒˆ
ๆœ€้ฉใชๆœฌ็•ชใƒฆใƒผใ‚นใ‚ฑใƒผใ‚นๅฏพ่ฉฑๅž‹ใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ€ใƒ‡ใƒผใ‚ฟใ‚ตใ‚คใ‚จใƒณใ‚นใƒœใƒƒใƒˆ้ซ˜่ฒ ่ทใชใƒใƒƒใƒใ‚ฟใ‚นใ‚ฏใ€ๅˆ†ๆ•ฃใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ฟใ‚นใ‚ฏใ€GPUใ‚ณใƒผใƒ‰ใ‚จใƒณใ‚ฟใƒผใƒ—ใƒฉใ‚คใ‚บใฎใ‚จใ‚ขใ‚ฎใƒฃใƒƒใƒ—็’ฐๅขƒ๏ผ†ใ‚ณใƒณใƒ—ใƒฉใ‚คใ‚ขใƒณใ‚นใ‚นใ‚ฟใƒƒใ‚ฏๅฎŒๅ…จใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใ‚ตใ‚คใƒ‰ใฎใƒ—ใƒฌใ‚คใ‚ฐใƒฉใ‚ฆใƒณใƒ‰ใ€ๆ•™่‚ฒใƒ„ใƒผใƒซ
---

ๆœฌ็•ชใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃใฎใƒ™ใ‚นใƒˆใƒ—ใƒฉใ‚ฏใƒ†ใ‚ฃใ‚นใจใ‚ณใ‚นใƒˆ็ตŒๆธˆๆ€ง

ๆฏŽๆœˆๆ•ฐ็™พไธ‡ๅ›žใฎใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ณใƒผใƒ‰ๅฎŸ่กŒใ‚’้‹็”จใ™ใ‚‹ใซใฏใ€ใ‚ฏใƒฉใ‚ฆใƒ‰่ฒป็”จใฎ้ซ˜้จฐใ‚„ใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃไพตๅฎณใ‚’้˜ฒใใŸใ‚ใฎๅŽณๆ ผใช้‹็”จๅขƒ็•ŒใŒๅฟ…่ฆใงใ™ใ€‚

1. ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใฎๅ …็‰ขๅŒ–ใƒใ‚งใƒƒใ‚ฏใƒชใ‚นใƒˆ

  • ๅŽณๆ ผใชๅฎŸๆ™‚้–“๏ผˆWall-Clock๏ผ‰ใ‚ฟใ‚คใƒ ใ‚ขใ‚ฆใƒˆใฎๅผทๅˆถ: ใ‚ณใƒผใƒ‰ๅ†…ใฎใ‚ฟใ‚คใƒ ใ‚ขใ‚ฆใƒˆ๏ผˆไพ‹: Pythonใฎsignal.alarm๏ผ‰ใซใฏๆฑบใ—ใฆไพๅญ˜ใ—ใชใ„ใงใใ ใ•ใ„ใ€‚ๅฟ…ใšใƒใ‚คใƒ‘ใƒผใƒใ‚คใ‚ถใƒผใƒฌใƒ™ใƒซใฎใƒใƒผใƒ‰ๅผทๅˆถ็ต‚ไบ†๏ผˆไพ‹: timeout = 60s๏ผ‰ใ‚’่จญๅฎšใ—ใพใ™ใ€‚ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒ็„กๅˆถ้™ใฎwhile Trueใƒซใƒผใƒ—ใ‚’็”Ÿๆˆใ—ใŸๅ ดๅˆใงใ‚‚ใ€ใƒ›ใ‚นใƒˆใŒ่‡ชๅ‹•็š„ใซMicroVMใ‚’็ ดๆฃ„ใ—ใพใ™ใ€‚
  • ใ‚ฏใƒฉใ‚ฆใƒ‰ใƒกใ‚ฟใƒ‡ใƒผใ‚ฟใ‚จใƒณใƒ‰ใƒใ‚คใƒณใƒˆใฎใƒ–ใƒญใƒƒใ‚ฏ: 169.254.169.254ใ‚„ใƒญใƒผใ‚ซใƒซใฎใƒ—ใƒฉใ‚คใƒ™ใƒผใƒˆCIDR็ฏ„ๅ›ฒ๏ผˆ10.0.0.0/8ใ€172.16.0.0/12ใ€192.168.0.0/16๏ผ‰ใ‚’้ฎๆ–ญใ™ใ‚‹ๆ˜Ž็คบ็š„ใชใ‚จใ‚ฐใƒฌใ‚นใƒ•ใ‚กใ‚คใ‚ขใ‚ฆใ‚ฉใƒผใƒซใƒซใƒผใƒซใ‚’ๅฎŸ่ฃ…ใ—ใ€SSRFๆ”ปๆ’ƒใ‚’ๅฎŒๅ…จใซๆŽ’้™คใ—ใพใ™ใ€‚
  • ่ชญใฟๅ–ใ‚Šๅฐ‚็”จใƒซใƒผใƒˆใƒ•ใ‚กใ‚คใƒซใ‚ทใ‚นใƒ†ใƒ ใจใ‚จใƒ•ใ‚งใƒกใƒฉใƒซใƒžใ‚ฆใƒณใƒˆ: ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใฎใƒ™ใƒผใ‚นใ‚ทใ‚นใƒ†ใƒ ใ‚คใƒกใƒผใ‚ธใ‚’ใ‚คใƒŸใƒฅใƒผใ‚ฟใƒ–ใƒซ๏ผˆไธๅค‰๏ผ‰ใซใ—ใพใ™ใ€‚ใƒใƒผใƒ‰ใƒ‡ใ‚ฃใ‚นใ‚ฏใ‚ฏใ‚ฉใƒผใ‚ฟ๏ผˆไพ‹: 512MB๏ผ‰ใ‚’่จญๅฎšใ—ใŸใ‚จใƒ•ใ‚งใƒกใƒฉใƒซใช/workspace tmpfsใƒ•ใ‚ฉใƒซใƒ€ใ‚’ใƒžใ‚ฆใƒณใƒˆใ—ใ€ใƒ‡ใ‚ฃใ‚นใ‚ฏๆžฏๆธ‡ๆ”ปๆ’ƒใ‚’้˜ฒใŽใพใ™ใ€‚
  • ๅ‡บๅŠ›ใƒใƒƒใƒ•ใ‚กใฎใ‚ตใƒ‹ใ‚ฟใ‚คใ‚บ: ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒ็„กๅˆถ้™ใซใƒฉใƒณใƒ€ใƒ ใชๆ–‡ๅญ—ๅˆ—ใ‚’ๅ‡บๅŠ›ใ—็ถšใ‘ใŸๅ ดๅˆใซใ‚ชใƒผใ‚ฑใ‚นใƒˆใƒฌใƒผใ‚ฟใƒผใ‚ตใƒผใƒใƒผใฎใƒกใƒขใƒชใŒๆžฏๆธ‡ใ™ใ‚‹ใฎใ‚’้˜ฒใใŸใ‚ใ€ๆจ™ๆบ–ๅ‡บๅŠ›๏ผˆstdout๏ผ‰ใŠใ‚ˆใณๆจ™ๆบ–ใ‚จใƒฉใƒผๅ‡บๅŠ›๏ผˆstderr๏ผ‰ใฎใ‚ญใƒฃใƒ—ใƒใƒฃใ‚’100KBใซๅˆถ้™ใ—ใพใ™ใ€‚
Cost Model Breakdown (10,000 Agent Sandbox Executions / Month):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Platform               โ”‚ Estimated Cost    โ”‚ Operational Overhead                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ E2B Managed Cloud      โ”‚ ~$35 - $60 / mo   โ”‚ Zero server management. Instant API.     โ”‚
โ”‚ Modal Labs (CPU only)  โ”‚ ~$40 - $70 / mo   โ”‚ Zero server management. Decorator syntax.โ”‚
โ”‚ Self-Hosted Kubernetes โ”‚ ~$350 - $600 / mo โ”‚ High (Cluster maintenance, KVM nodes).  โ”‚
โ”‚ WebContainers (Client) โ”‚ $0.00 / mo        โ”‚ Zero backend cost (Browser execution).   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ ใ‚ณใƒผใƒ‰ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใซใŠใ‘ใ‚‹ใƒ‡ใƒผใ‚ฟใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃใจใƒ—ใƒฉใ‚คใƒใ‚ทใƒผ:

ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒ็‹ฌ่‡ชใฎใ‚ฝใƒผใ‚นใ‚ณใƒผใƒ‰ใ€ไผๆฅญAPIใƒˆใƒผใ‚ฏใƒณใ€ใพใŸใฏ้กงๅฎขใฎๅ€‹ไบบๆƒ…ๅ ฑ๏ผˆPII๏ผ‰ใ‚’ๅซใ‚€ใ‚ณใƒผใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅ ดๅˆใ€ใ‚ปใƒƒใ‚ทใƒงใƒณ็ต‚ไบ†็›ดๅพŒใซใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใฎใ‚นใƒŠใƒƒใƒ—ใ‚ทใƒงใƒƒใƒˆใŒใƒ›ใ‚นใƒˆใƒกใƒขใƒชใ‹ใ‚‰ๅฎŒๅ…จใซๆถˆๅŽปใ•ใ‚Œใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใฆใใ ใ•ใ„ใ€‚ใพใŸใ€ใ‚ฏใƒฉใ‚ฆใƒ‰ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใƒ—ใƒญใƒใ‚คใƒ€ใƒผใŒๆฅญๅ‹™ๆๆบๅฅ‘็ด„๏ผˆBAA๏ผ‰ใ‚’็ท ็ตใ—ใ€ใƒ‡ใƒผใ‚ฟๆฐธ็ถšๅŒ–ใ‚ผใƒญใฎไฟ่จผใ‚’ๅซใ‚€SOC2 Type IIใ‚ณใƒณใƒ—ใƒฉใ‚คใ‚ขใƒณใ‚นใƒฌใƒใƒผใƒˆใ‚’ๆไพ›ใ—ใฆใ„ใ‚‹ใ‹ใ‚’ๆคœ่จผใ—ใฆใใ ใ•ใ„ใ€‚

---

ใพใจใ‚ใจใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใฎๆŽจๅฅจ

2026ๅนดใซใŠใ„ใฆใ€ใ‚ปใ‚ญใƒฅใ‚ขใชใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นๅŒ–ใฏไปปๆ„ใฎใ‚ชใƒ—ใ‚ทใƒงใƒณๆฉŸ่ƒฝใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚ใใ‚Œใฏ่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซใจใฃใฆไธๅฏๆฌ ใชๅ‰ๆๆกไปถใงใ™:

  • ๅฏพ่ฉฑๅž‹ใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚ขใ‚ทใ‚นใ‚ฟใƒณใƒˆใ€่‡ชๅพ‹ๅž‹ใ‚ฝใƒ•ใƒˆใ‚ฆใ‚งใ‚ขใ‚จใƒณใ‚ธใƒ‹ใ‚ขใ€ใพใŸใฏใƒ‡ใƒผใ‚ฟใ‚ขใƒŠใƒชใ‚นใƒˆใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚’ๆง‹็ฏ‰ใ—ใฆใ„ใ‚‹ๅ ดๅˆใฏใ€1็ง’ๆœชๆบ€ใง่ตทๅ‹•ใ™ใ‚‹Firecracker MicroVMใจ้ซ˜ๅบฆใชREPLใ‚นใƒˆใƒชใƒผใƒŸใƒณใ‚ฐๆฉŸ่ƒฝใ‚’ๅ‚™ใˆใŸE2Bใ‚’ๆŽก็”จใ—ใฆใใ ใ•ใ„ใ€‚
  • ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒๅคง่ฆๆจกใชไธฆๅˆ—ใƒ‡ใƒผใ‚ฟๅ‡ฆ็†ใ€่‡ชๅ‹•ๅŒ–ใ•ใ‚ŒใŸใƒขใƒ‡ใƒซใƒˆใƒฌใƒผใƒ‹ใƒณใ‚ฐใ€ใพใŸใฏGPUใซไพๅญ˜ใ™ใ‚‹ใ‚ฟใ‚นใ‚ฏใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅ ดๅˆใฏใ€Modalใ‚’ใƒ‡ใƒ—ใƒญใ‚คใ—ใฆใใ ใ•ใ„ใ€‚
  • ไผๆฅญใŒๅŽณๆ ผใชใ‚ชใƒณใƒ—ใƒฌใƒŸใ‚นใƒ‡ใƒผใ‚ฟใƒฌใ‚ธใƒ‡ใƒณใ‚ทใƒผ๏ผˆใƒ‡ใƒผใ‚ฟๆ‰€ๅœจ่ฆๅˆถ๏ผ‰ใ‚’่ฆๆฑ‚ใ™ใ‚‹ๅ ดๅˆใฏใ€็คพๅ†…Kubernetesใ‚ฏใƒฉใ‚นใ‚ฟใƒผไธŠใซGoogle gVisor๏ผˆrunsc๏ผ‰ใ‚’ๅ‚™ใˆใŸDockerใพใŸใฏKata Containersใ‚’ใƒ‡ใƒ—ใƒญใ‚คใ—ใฆใใ ใ•ใ„ใ€‚
  • ใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใŒๅฎŒๅ…จใซใƒฆใƒผใ‚ถใƒผใฎใƒ–ใƒฉใ‚ฆใ‚ถไธŠใงๅฎŸ่กŒใ•ใ‚Œใ‚‹ๅ ดๅˆใฏใ€WebContainersใ‚’ใƒ™ใƒผใ‚นใซๆง‹็ฏ‰ใ—ใฆใใ ใ•ใ„ใ€‚

AgDex.ai ใง้–ข้€ฃใ™ใ‚‹ใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใŠใ‚ˆใณใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚คใƒณใƒ•ใƒฉใƒ„ใƒผใƒซใ‚’ๆŽข็ดขใ™ใ‚‹:

  • E2B โ€” ่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅ‘ใ‘ใฎใ‚ปใ‚ญใƒฅใ‚ขใชFirecracker MicroVMใ‚ตใƒณใƒ‰ใƒœใƒƒใ‚ฏใ‚นใ€‚
  • Modal โ€” ้ซ˜ๆ€ง่ƒฝใชใ‚ตใƒผใƒใƒผใƒฌใ‚นใ‚ฏใƒฉใ‚ฆใƒ‰ใ‚ณใƒณใƒ†ใƒŠใŠใ‚ˆใณGPUๅฎŸ่กŒ็’ฐๅขƒใ€‚
  • OpenHands โ€” ่‡ชๅพ‹ๅž‹ใ‚ฝใƒ•ใƒˆใ‚ฆใ‚งใ‚ข้–‹็™บใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใŸใ‚ใฎใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใƒ—ใƒฉใƒƒใƒˆใƒ•ใ‚ฉใƒผใƒ ใ€‚
  • SWE-agent โ€” GitHub Issue่งฃๆฑบใฎใŸใ‚ใฎใƒ™ใƒณใƒใƒžใƒผใ‚ฏใŠใ‚ˆใณใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅฎŸ่กŒใ‚ทใ‚นใƒ†ใƒ ใ€‚
--- AgDex.ai ใซใ‚ˆใ‚Šๅ…ฌ้–‹ โ€” AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใŸใ‚ใฎใƒ—ใƒฌใƒŸใ‚ขใƒชใ‚ฝใƒผใ‚น๏ผ†ใƒ™ใƒณใƒใƒžใƒผใ‚ฏใƒ‡ใ‚ฃใƒฌใ‚ฏใƒˆใƒชใ€‚

ุงู„ุฃู…ุงู† ูˆุงู„ุจูŠุฆุงุช ุงู„ู…ุนุฒูˆู„ุฉ ุฏู„ูŠู„ ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุชู‚ู†ูŠุฉ ุณุจุชู…ุจุฑ 2026 ยท 15 ุฏู‚ูŠู‚ุฉ ู‚ุฑุงุกุฉ

ุนุฒู„ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ูˆุงู„ุชู†ููŠุฐ ุงู„ุขู…ู† ู„ู„ุฃูƒูˆุงุฏ ููŠ 2026: ู…ู‚ุงุฑู†ุฉ ุดุงู…ู„ุฉ ุจูŠู† E2B ูˆ Modal ูˆ Docker ูˆ Firecracker

ู„ู… ุชุนุฏ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ุงู„ู…ุณุชู‚ู„ุฉ ููŠ ุนุงู… 2026 ู…ุฌุฑุฏ ุฑูˆุจูˆุชุงุช ู…ุญุงุฏุซุฉ ุณู„ุจูŠุฉุ› ุจู„ ุฃุตุจุญุช ุชุชุทู„ุจ ูƒุชุงุจุฉ ูˆุชู†ููŠุฐ ุฃูƒูˆุงุฏ ุจุฑู…ุฌูŠุฉ ุนุดูˆุงุฆูŠุฉ ู„ุฅู†ุฌุงุฒ ู…ู‡ุงู… ู‡ู†ุฏุณุฉ ุงู„ุจุฑู…ุฌูŠุงุช ูˆุชุญู„ูŠู„ ุงู„ุจูŠุงู†ุงุช ูˆุฅุฏุงุฑุฉ ุงู„ุฃู†ุธู…ุฉ. ู„ูƒู† ู…ู†ุญ ู†ู…ุงุฐุฌ LLM ูˆุตูˆู„ุงู‹ ุฅู„ู‰ ุจูŠุฆุงุช ุงู„ุชู†ููŠุฐ ูŠูุฑุถ ู…ุฎุงุทุฑ ุฃู…ู†ูŠุฉ ูƒุงุฑุซูŠุฉ ุชุชุฌุงูˆุฒ ู‚ุฏุฑุงุช ุงู„ุญุงูˆูŠุงุช ุงู„ุชู‚ู„ูŠุฏูŠุฉ. ูŠุณุชุนุฑุถ ู‡ุฐุง ุงู„ุฏู„ูŠู„ ุงู„ู…ุชุนู…ู‚ ู…ุนู…ุงุฑูŠุฉ ุจูŠุฆุงุช ุงู„ุนุฒู„ ุงู„ุงูุชุฑุงุถูŠุฉ ุงู„ุญุฏูŠุซุฉ (Sandboxing) ุนุจุฑ ู…ู‚ุงุฑู†ุฉ ุชู‚ู†ูŠุฉ ุฏู‚ูŠู‚ุฉ ุจูŠู† Firecracker MicroVMs ูˆ E2B ูˆ Modal Labs ูˆ gVisor ูˆ WebContainers.

ูู‡ุฑุณ ุงู„ู…ุญุชูˆูŠุงุช

ููŠ ุนุงู… 2026ุŒ ู„ู… ุชุนุฏ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ู…ุฌุฑุฏ ุฑูˆุจูˆุชุงุช ู…ุญุงุฏุซุฉ ุณู„ุจูŠุฉ ุชู‚ุฏู… ุงู‚ุชุฑุงุญุงุช ุจุฑู…ุฌูŠุฉ ุนุจุฑ ุงู„ุฅูƒู…ุงู„ ุงู„ุชู„ู‚ุงุฆูŠ. ูˆุณูˆุงุก ูƒุงู† ุงู„ูˆูƒูŠู„ ู…ู‡ู†ุฏุณ ุจุฑู…ุฌูŠุงุช ุฐุงุชูŠ ุงู„ู‚ูŠุงุฏุฉ ู…ุซู„ Claude Code ุฃูˆ OpenHands ุฃูˆ SWE-agentุŒ ุฃูˆ ูˆูƒูŠู„ ุชุญู„ูŠู„ ุจูŠุงู†ุงุช ูŠูƒุชุจ ู†ุตูˆุต Pandas ุงู„ุจุฑู…ุฌูŠุฉุŒ ุฃูˆ ู…ุณุคูˆู„ ู†ุธุงู… ุขู„ูŠ ูŠู†ูุฐ ุฃูˆุงู…ุฑ BashุŒ ูุฅู† ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ุงู„ุญุฏูŠุซูŠู† ูŠุญุชุงุฌูˆู† ุจุตูˆุฑุฉ ุฃุณุงุณูŠุฉ ุฅู„ู‰ ุงู„ู‚ุฏุฑุฉ ุนู„ู‰ ูƒุชุงุจุฉ ูˆุชู†ููŠุฐ ุฃูƒูˆุงุฏ ุจุฑู…ุฌูŠุฉ ุนุดูˆุงุฆูŠุฉ.

ูˆู…ุน ุฐู„ูƒุŒ ูุฅู† ู…ู†ุญ ู†ู…ูˆุฐุฌ ู„ุบูˆูŠ ูƒุจูŠุฑ (LLM) ุบูŠุฑ ุญุชู…ูŠ (Non-deterministic) ูˆุตูˆู„ุงู‹ ู…ุจุงุดุฑุงู‹ ุฅู„ู‰ ุจูŠุฆุฉ ุชู†ููŠุฐ Shell ูŠูุชุญ ุงู„ุจุงุจ ุฃู…ุงู… ุซุบุฑุงุช ุฃู…ู†ูŠุฉ ูˆุชุดุบูŠู„ูŠุฉ ุจุงู„ุบุฉ ุงู„ุฎุทูˆุฑุฉ:

  • ู…ุงุฐุง ูŠุญุฏุซ ุนู†ุฏู…ุง ูŠุฏุฎู„ ุงู„ูˆูƒูŠู„ ููŠ ุญู„ู‚ุฉ ุชูƒุฑุงุฑูŠุฉ ู„ุง ู†ู‡ุงุฆูŠุฉ ุชู†ูุฐ ุฃู…ุฑ rm -rf / ุฃูˆ ุชุณุชู‡ู„ูƒ ูƒุงู…ู„ ุณุนุฉ ุงู„ู‚ุฑุต ุงู„ุชุฎุฒูŠู†ูŠุŸ
  • ู…ุงุฐุง ูŠุญุฏุซ ุนู†ุฏู…ุง ูŠู†ูุฐ ุงู„ูˆูƒูŠู„ ุญุฒู…ุฉ ุจุฑู…ุฌูŠุฉ ุฎุจูŠุซุฉ ุชู… ุณุญุจู‡ุง ู…ู† ู…ุณุชูˆุฏุน PyPI ุฃูˆ NPM ุบูŠุฑ ู…ูˆุซูˆู‚ุŸ
  • ู…ุงุฐุง ูŠุญุฏุซ ุฅุฐุง ุดู† ุงู„ูˆูƒูŠู„ ู‡ุฌูˆู…ุงู‹ ู„ุชุฒูˆูŠุฑ ุงู„ุทู„ุจุงุช ู…ู† ุฌุงู†ุจ ุงู„ุฎุงุฏู… (SSRF) ู„ุงุณุชุนู„ุงู… ู†ู‚ุทุฉ ู†ู‡ุงูŠุฉ ุจูŠุงู†ุงุช ุงู„ุชุนุฑูŠู ุงู„ุฏุงุฎู„ูŠุฉ ููŠ AWS (http://169.254.169.254/latest/meta-data/) ูˆุชุณุฑูŠุจ ุจูŠุงู†ุงุช ุงุนุชู…ุงุฏ ู‚ูˆุงุนุฏ ุงู„ุจูŠุงู†ุงุช ุงู„ุฅู†ุชุงุฌูŠุฉุŸ
ู„ู‚ุฏ ุตูู…ู…ุช ุญุงูˆูŠุงุช ุงู„ุชุทุจูŠู‚ุงุช ุงู„ุชู‚ู„ูŠุฏูŠุฉ (ู…ุซู„ Docker ุงู„ุฎุงู… ุนู„ู‰ ุฎุงุฏู… ู…ุดุชุฑูƒ) ู„ุฎุฏู…ุงุช ุงู„ู…ุงูŠูƒุฑูˆุณูŠุฑููŠุณ ุงู„ู…ุณุชู‚ุฑุฉ ูˆุงู„ู…ุชูˆู‚ุนุฉโ€”ูˆู„ูŠุณ ู„ุชุดุบูŠู„ ุฃูƒูˆุงุฏ ุจุฑู…ุฌูŠุฉ ุนุดูˆุงุฆูŠุฉ ุบูŠุฑ ู…ูˆุซูˆู‚ุฉ ุชู… ุชูˆู„ูŠุฏู‡ุง ุจูˆุงุณุทุฉ ู†ู…ุงุฐุฌ ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ.

ู„ู…ุนุงู„ุฌุฉ ู‡ุฐุง ุงู„ุชุญุฏูŠ ุงู„ุฌุฐุฑูŠุŒ ุงุณุชู‚ุฑุช ู…ุนู…ุงุฑูŠุฉ ุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ู„ู„ูˆูƒู„ุงุก ููŠ ุนุงู… 2026 ุญูˆู„ ุจูŠุฆุงุช ุงู„ุนุฒู„ ุงู„ุงูุชุฑุงุถูŠุฉ ุงู„ู…ุตุบุฑุฉ ุงู„ุนุงุจุฑุฉ (Ephemeral MicroVM Sandboxes) ูˆู…ู†ุตุงุช ุงู„ุชู†ููŠุฐ ุงู„ุขู…ู†ุฉ ุงู„ู…ุฎุตุตุฉ.

ูŠู‚ุฏู… ู‡ุฐุง ุงู„ุฏู„ูŠู„ ุงู„ู…ุนู…ุงุฑูŠ ู…ู‚ุงุฑู†ุฉ ู‡ู†ุฏุณูŠุฉ ุดุงู…ู„ุฉ ุจูŠู† ุฃุจุฑุฒ ุชู‚ู†ูŠุงุช ุฅู†ุดุงุก ุจูŠุฆุงุช ุงู„ุนุฒู„ ุงู„ุชูŠ ุชุณุชุฎุฏู…ู‡ุง ุฃู†ุธู…ุฉ ุงู„ูˆูƒู„ุงุก ุงู„ุฅู†ุชุงุฌูŠุฉ ููŠ ุนุงู… 2026: E2B (ุงู„ู…ุนุชู…ุฏุฉ ุนู„ู‰ Firecracker MicroVMs)ุŒ ูˆ Modal LabsุŒ ูˆ ุงู„ุญุงูˆูŠุงุช ุงู„ู…ุญุตู†ุฉ ุฐุงุชูŠุงู‹ (Docker MCP ูˆ gVisor)ุŒ ูˆ ุจูŠุฆุงุช WebContainers ุงู„ู…ู†ูุฐุฉ ููŠ ุงู„ู…ุชุตูุญ. ู†ุณุชุนุฑุถ ู…ุณุชูˆูŠุงุช ุงู„ุนุฒู„ ุงู„ุฃู…ู†ูŠุŒ ูˆุฒู…ู† ุงุณุชุฌุงุจุฉ ุงู„ุฅู‚ู„ุงุน ุงู„ุจุงุฑุฏุŒ ูˆุฅุฏุงุฑุฉ ุงู„ุญุงู„ุฉ ุงู„ุชูุงุนู„ูŠุฉ ู…ุชุนุฏุฏุฉ ุงู„ุฌูˆู„ุงุชุŒ ูˆุงู‚ุชุตุงุฏูŠุงุช ุงู„ุชูƒู„ูุฉ ุงู„ุญู‚ูŠู‚ูŠุฉุŒ ู…ุน ูƒูˆุฏ ุจุฑู…ุฌูŠ ุนู…ู„ูŠ ุฌุงู‡ุฒ ู„ู„ุฅู†ุชุงุฌ.

1. ู…ู„ุฎุต ุณุฑูŠุน ูˆุญุฏูˆุฏ ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุชู‚ู†ูŠุฉ

๐Ÿ’ก ู…ู„ุงุญุธุฉ ู…ุนู…ุงุฑูŠุฉ:
  • ุงุฎุชุฑ E2B (Firecracker MicroVMs) ุนู†ุฏู…ุง ูŠุญุชุงุฌ ูˆูƒู„ุงุคูƒ ุฅู„ู‰ ุจูŠุฆุงุช ุชูุงุนู„ูŠุฉ ู…ุฎุตุตุฉุŒ ูˆู…ุฒุงู…ู†ุฉ ุซู†ุงุฆูŠุฉ ุงู„ุงุชุฌุงู‡ ู„ู„ู…ู„ูุงุชุŒ ูˆุฒู…ู† ุฅู‚ู„ุงุน ูุงุฆู‚ ุงู„ุณุฑุนุฉ (~150 ู…ู„ู„ูŠ ุซุงู†ูŠุฉ)ุŒ ูˆุฌู„ุณุงุช REPL / Jupyter ุทูˆูŠู„ุฉ ุงู„ุฃู…ุฏ ู…ุน ุชุฏูู‚ ููˆุฑูŠ ู„ู„ุฑุณูˆู…ุงุช ุงู„ุจูŠุงู†ูŠุฉ ูˆุงู„ู…ุฎุฑุฌุงุช ุงู„ุบู†ูŠุฉ.
  • ุงุฎุชุฑ Modal Labs ุนู†ุฏู…ุง ุชุชุทู„ุจ ุฃุนุจุงุก ุนู…ู„ ุงู„ูˆูƒูŠู„ ู‚ุฏุฑุงุช ุญูˆุณุจุฉ ุณุญุงุจูŠุฉ ุจุฏูˆู† ุฎุงุฏู… (Serverless) ู‚ุงุจู„ุฉ ู„ู„ุชูˆุณุน ุงู„ููˆุฑูŠุŒ ูˆุญุฒู… ุจุงูŠุซูˆู† ุนู„ู…ูŠุฉ ุถุฎู…ุฉุŒ ูˆู…ุนุงู„ุฌุฉ ุฏูุนูŠุฉ ู…ูˆุฒุนุฉ ู„ู„ุจูŠุงู†ุงุชุŒ ุฃูˆ ุชุณุฑูŠุนุงู‹ ุนู†ุฏ ุงู„ุทู„ุจ ุนุจุฑ ูˆุญุฏุงุช ู…ุนุงู„ุฌุฉ ุงู„ุฑุณูˆู…ุงุช (GPU) ู„ุชูˆู„ูŠุฏ ุงู„ุชุถู…ูŠู†ุงุช ุฃูˆ ุงู„ุชุฏุฑูŠุจ ุฏุงุฎู„ ุจูŠุฆุฉ ุงู„ุนุฒู„.
  • ุงุฎุชุฑ Docker ู…ุน gVisor (runsc) ุฃูˆ Kata Containers ุนู†ุฏู…ุง ุชูุฑุถ ู‚ูŠูˆุฏ ุงู„ุงู…ุชุซุงู„ ูˆุงู„ุฃู…ุงู† ุฅุจู‚ุงุก ูƒุงู…ู„ ุนู…ู„ูŠุงุช ุงู„ุชู†ููŠุฐ ุฏุงุฎู„ ุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ุงู„ุฎุงุตุฉ ุจู…ุฑูƒุฒ ุจูŠุงู†ุงุชูƒ (On-Premise) ุฃูˆ ู…ุฌู…ูˆุนุงุช Kubernetes ุงู„ุฏุงุฎู„ูŠุฉุŒ ู…ุน ู…ู†ุน ุฅุฑุณุงู„ ุงู„ุฃูƒูˆุงุฏ ู„ุฃูŠ ู…ูˆูุฑ ุณุญุงุจูŠ ุฎุงุฑุฌูŠ.
  • ุงุฎุชุฑ WebContainers / WebAssembly (Wasm) ุนู†ุฏู…ุง ุชุณุชู‡ุฏู ุชู†ููŠุฐุงู‹ ุจู†ุณุจุฉ 100% ุฏุงุฎู„ ู…ุชุตูุญ ุงู„ู…ุณุชุฎุฏู… ู…ุจุงุดุฑุฉุŒ ู…ู…ุง ูŠู„ุบูŠ ุชู…ุงู…ุงู‹ ุชูƒุงู„ูŠู ุงู„ุฎูˆุงุฏู… ูˆูŠู„ุบูŠ ุงู„ู…ุณุคูˆู„ูŠุงุช ุงู„ุฃู…ู†ูŠุฉ ู…ู† ุฌุงู†ุจ ุงู„ุฎุงุฏู….
โšก ุชู†ุจูŠู‡ ู‡ุงู…:
  • ู…ุณุชูˆู‰ ุงู„ู…ุญุงูƒุงุฉ ุงู„ุงูุชุฑุงุถูŠุฉ (Virtualization Level): ุชุชุดุงุฑูƒ ุงู„ุญุงูˆูŠุงุช ุงู„ุชู‚ู„ูŠุฏูŠุฉ ู†ูˆุงุฉ ู†ุธุงู… ู„ูŠู†ูƒุณ ู„ู„ู…ุณุชุถูŠู (ู…ู…ุง ูŠุนุฑุถู‡ุง ู„ุงุฎุชุฑุงู‚ุงุช ุงู„ู†ูˆุงุฉ). ููŠ ุงู„ู…ู‚ุงุจู„ุŒ ุชู†ุดุฆ Firecracker MicroVM ู†ูˆุงุฉ ู„ูŠู†ูƒุณ ู…ุตุบุฑุฉ ูˆู…ุณุชู‚ู„ุฉ ู…ุฏุนูˆู…ุฉ ุจู…ุญุงูƒุงุฉ ุงู„ุนุชุงุฏ ุนุจุฑ (KVM) ู„ูƒู„ ู…ู‡ู…ุฉ ูˆูƒูŠู„ุŒ ู…ุญู‚ู‚ุฉ ุนุฒู„ุงู‹ ูƒุงู…ู„ุงู‹ ุนู„ู‰ ู…ุณุชูˆู‰ ุดุฑูŠุญุฉ ุงู„ู…ุนุงู„ุฌ (Hypervisor-Level Isolation).
  • ู†ู…ูˆุฐุฌ ุฏูˆุฑุฉ ุงู„ุญูŠุงุฉ (Lifecycle Model): ูŠุฌุจ ุฃู† ุชุฏุนู… ุจูŠุฆุฉ ุนุฒู„ ุงู„ูˆูƒูŠู„ ุงู„ุชูุงุนู„ูŠุฉ ุฃูˆุงู…ุฑ ู…ุชุณู„ุณู„ุฉ ุชุญุชูุธ ุจุงู„ุญุงู„ุฉ (ู…ุซู„ ุฅู†ุดุงุก ู…ู„ูุงุช ููŠ ุงู„ุฎุทูˆุฉ 1 ูˆูุญุตู‡ุง ููŠ ุงู„ุฎุทูˆุฉ 4) ู…ุน ูุฑุถ ู…ู‡ู„ุงุช ุฒู…ู†ูŠุฉ ุตุงุฑู…ุฉ ู„ุง ูŠู…ูƒู† ุชุฌู†ุจู‡ุง.
---

2. ุฃูˆุถุงุน ุงู„ูุดู„ ุงู„ู‡ูŠูƒู„ูŠุฉ ุงู„ุซู„ุงุซุฉ ู„ู„ุญุงูˆูŠุงุช ุงู„ุชู‚ู„ูŠุฏูŠุฉ ุฃู…ุงู… ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ

ู„ู…ุงุฐุง ู„ุง ุชุณุชุทูŠุน ุงู„ูุฑู‚ ุงู„ู‡ู†ุฏุณูŠุฉ ุจุจุณุงุทุฉ ุชุดุบูŠู„ ุญุงูˆูŠุฉ Docker ุงุนุชูŠุงุฏูŠุฉ ููŠ ุงู„ุฎู„ููŠุฉ ูˆุชู†ููŠุฐ ุฃูˆุงู…ุฑ ุงู„ูˆูƒูŠู„ ุนุจุฑ docker execุŸ ุชุจุฑุฒ ููŠ ุจูŠุฆุงุช ุงู„ุฅู†ุชุงุฌ ุซู„ุงุซุฉ ุฃูˆุถุงุน ูุดู„ ู‡ูŠูƒู„ูŠุฉ ุญุฑุฌุฉ:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ 1. The Kernel Privilege Escalation & Container Escape Vulnerability                    โ”‚
โ”‚    Failure: Standard Docker containers share the host kernel. If an LLM-generated      โ”‚
โ”‚    script triggers an unpatched Linux kernel vulnerability (e.g., dirty COW variants,  โ”‚
โ”‚    cgroup v1 escapes, or ptrace bypasses), the agent gains root on the underlying      โ”‚
โ”‚    bare-metal host. Mounting `/var/run/docker.sock` inside the agent container gives   โ”‚
โ”‚    the LLM trivial, unfettered root access to the entire cluster.                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. The Cold Start vs. State Drift Dilemma                                              โ”‚
โ”‚    Failure: Standard Docker containers take 2 to 5 seconds to boot and pull layers.   โ”‚
โ”‚    If you spin up a fresh container per command, multi-turn agent workflows become     โ”‚
โ”‚    unbearably sluggish. If you keep a long-lived shared container, zombie processes,  โ”‚
โ”‚    corrupted disk states, and cross-session variable leaks cause silent agent failures.โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. The Unrestricted Network Poisoning & SSRF Threat                                    โ”‚
โ”‚    Failure: Agents frequently need outbound internet access to install libraries or    โ”‚
โ”‚    fetch documentation. But without strict kernel-level eBPF egress filtering, the     โ”‚
โ”‚    agent can port-scan internal VPC subnets, access Kubernetes service account tokens,  โ”‚
โ”‚    or reach cloud metadata endpoints to steal IAM credentials.                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

3. ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุฃุณุงุณูŠุฉ 1: ุชู‚ู†ูŠุฉ Firecracker MicroVMs ูˆู…ู†ุตุฉ E2B

ุซูˆุฑุฉ Firecracker ููŠ ุงู„ู…ุญุงูƒุงุฉ ุงู„ุงูุชุฑุงุถูŠุฉ

ุทูˆู‘ุฑุช ุดุฑูƒุฉ AWS ููŠ ุงู„ุฃุตู„ ุชู‚ู†ูŠุฉ Firecracker ุงู„ู…ูุชูˆุญุฉ ุงู„ู…ุตุฏุฑ ูˆุงู„ู…ูƒุชูˆุจุฉ ุจู„ุบุฉ Rust ู„ุฏุนู… ุฎุฏู…ุงุช AWS Lambda ูˆ Fargate. ุชุณุชููŠุฏ ู‡ุฐู‡ ุงู„ุชู‚ู†ูŠุฉ ู…ู† ูˆุญุฏุฉ ุงู„ู…ุญุงูƒุงุฉ ุงู„ุงูุชุฑุงุถูŠุฉ ุงู„ู…ุนุชู…ุฏุฉ ุนู„ู‰ ุงู„ู†ูˆุงุฉ ููŠ ู„ูŠู†ูƒุณ (KVM) ู„ุฅู†ุดุงุก ุฃุฌู‡ุฒุฉ ุงูุชุฑุงุถูŠุฉ ูุงุฆู‚ุฉ ุงู„ุฎูุฉ ุชูุนุฑู ุจุงุณู… MicroVMs.

ุนู„ู‰ ุนูƒุณ ุจุฑู…ุฌูŠุงุช ุงู„ู…ุญุงูƒุงุฉ ุงู„ุชู‚ู„ูŠุฏูŠุฉ (ู…ุซู„ QEMU) ุงู„ุชูŠ ุชุญุงูƒูŠ ุนุชุงุฏ ุงู„ุญูˆุงุณุจ ุงู„ู‚ุฏูŠู… (ูƒู†ุงู‚ู„ุงุช PCI ูˆูˆุญุฏุงุช ุชุญูƒู… IDE)ุŒ ุชุฌุฑุฏ Firecracker ูƒุงูุฉ ุงู„ุฃุฌู‡ุฒุฉ ุงู„ุงูุชุฑุงุถูŠุฉ ุบูŠุฑ ุงู„ุถุฑูˆุฑูŠุฉ. ูˆุชุญุชูˆูŠ MicroVM ูู‚ุท ุนู„ู‰ ู†ูˆุงุฉ ู„ูŠู†ูƒุณ ุฏู†ูŠุงุŒ ูˆุจุฑุงู…ุฌ ุชุดุบูŠู„ ุงู„ุดุจูƒุฉ ูˆุงู„ุชุฎุฒูŠู† ุงู„ู…ุนุชู…ุฏุฉ ุนู„ู‰ virtioุŒ ูˆูˆุญุฏุฉ ุชุญูƒู… ุชุณู„ุณู„ูŠุฉ:

  • ุฒู…ู† ุงู„ุฅู‚ู„ุงุน ุงู„ุจุงุฑุฏ (Startup Latency): ุชู‚ู„ุน ุงู„ุขู„ุฉ ุงู„ุงูุชุฑุงุถูŠุฉ ููŠ ุฃู‚ู„ ู…ู† 150 ู…ู„ู„ูŠ ุซุงู†ูŠุฉ.
  • ุงุณุชู‡ู„ุงูƒ ุงู„ุฐุงูƒุฑุฉ (Memory Footprint): ุนุจุก ุชุดุบูŠู„ูŠ ูŠุจู„ุบ ุญูˆุงู„ูŠ 5 ู…ูŠุฌุงุจุงูŠุช ู…ู† ุงู„ุฐุงูƒุฑุฉ ุงู„ุนุดูˆุงุฆูŠุฉ ู„ูƒู„ ุขู„ุฉ MicroVM.
  • ุงู„ูƒุซุงูุฉ ุงู„ุญูˆุณุจูŠุฉ (Density): ูŠู…ูƒู† ุชุดุบูŠู„ ุขู„ุงู ุงู„ุขู„ุงุช ุงู„ุงูุชุฑุงุถูŠุฉ ุงู„ู…ุนุฒูˆู„ุฉ ุจุงู„ุชูˆุงุฒูŠ ุนู„ู‰ ุฎุงุฏู… ููŠุฒูŠุงุฆูŠ ูˆุงุญุฏ ุจุฃู…ุงู† ูƒุงู…ู„.

ูƒูŠู ุชุฌุนู„ E2B ุชู‚ู†ูŠุฉ MicroVMs ุฌุงู‡ุฒุฉ ู„ุฅู†ุชุงุฌ ุงู„ูˆูƒู„ุงุก

ุชูุนุฏ ู…ู†ุตุฉ E2B ุจู†ูŠุฉ ุชุญุชูŠุฉ ู…ุทูˆุฑุฉ ุฎุตูŠุตุงู‹ ู„ู„ู…ุทูˆุฑูŠู†ุŒ ุญูŠุซ ุชุบู„ู Firecracker MicroVMs ููŠ ูˆุงุฌู‡ุงุช ุจุฑู…ุฌูŠุฉ ู…ุฎุตุตุฉ ู„ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ุงู„ุฐุงุชูŠูŠู†.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        AI Agent Orchestrator                          โ”‚
โ”‚            (LangChain / LangGraph / AutoGen / Custom Loop)             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚ E2B Python / TypeScript SDK
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ E2B Sandbox Cloud (Firecracker MicroVM Cluster)                        โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Ephemeral Sandbox (Hardware KVM Isolation)                         โ”‚ โ”‚
โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ Python / REPL Kernel โ”‚ โ”‚ Bash Shell Stream โ”‚ โ”‚ File System    โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ (Rich Output/Plots)  โ”‚ โ”‚ (Stdout/Stderr)   โ”‚ โ”‚ (Bidirectional)โ”‚  โ”‚ โ”‚
โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ุฃุจุฑุฒ ุงู„ู‚ุฏุฑุงุช ุงู„ู…ุนู…ุงุฑูŠุฉ ู„ู…ู†ุตุฉ E2B:

  1. ู…ูุณุฑ ุงู„ุฃูƒูˆุงุฏ ูˆุจูŠุฆุฉ REPL ุงู„ุชูุงุนู„ูŠุฉ: ูŠุฏุนู… ุงู„ุชู†ููŠุฐ ุงู„ุชูุงุนู„ูŠ ุงู„ู…ุณุชู…ุฑ ู„ู„ุฃูƒูˆุงุฏ ุงู„ุจุฑู…ุฌูŠุฉุ› ุญูŠุซ ุชุธู„ ุงู„ู…ุชุบูŠุฑุงุช ูˆุงู„ุฏูˆุงู„ ูˆุญุงู„ุฉ ุงู„ุฐุงูƒุฑุฉ ุงู„ุชูŠ ุฃูู†ุดุฆุช ููŠ ุงู„ุฌูˆู„ุฉ ุงู„ุฃูˆู„ู‰ ู…ุญููˆุธุฉ ุนุจุฑ ุงู„ุฌูˆู„ุงุช ุงู„ู„ุงุญู‚ุฉ ููŠ ู†ูุณ ุงู„ุฌู„ุณุฉ.
  2. ุงู„ุชุฏูู‚ ุงู„ู…ุจุงุดุฑ ู„ู„ูˆุณุงุฆุท ุงู„ุบู†ูŠุฉ (Rich Media Streaming): ุงู„ุชู‚ุงุท ู…ุฎุฑุฌุงุช stdout ูˆ stderr ูˆุฑุณูˆู…ุงุช Matplotlib ุงู„ุจูŠุงู†ูŠุฉ ูˆุงู„ุฌุฏุงูˆู„ ู…ุจุงุดุฑุฉ ุนุจุฑ ู‚ู†ูˆุงุช ุงุชุตุงู„ุงุช WebSocket ูˆ gRPC.
  3. ู‚ูˆุงู„ุจ ุจูŠุฆุงุช ุงู„ุนุฒู„ ุงู„ู…ุฎุตุตุฉ: ูŠู…ูƒู† ู„ู„ู…ุทูˆุฑูŠู† ุชุฌู‡ูŠุฒ ู‚ูˆุงู„ุจ ู…ุจู†ูŠุฉ ุนู„ู‰ Dockerfile ู…ุณุจู‚ุงู‹ (ุชุชุถู…ู† ุงู„ู…ุชุฑุฌู…ุงุช ูˆุญุฒู… Node.js ูˆุจุงูŠุซูˆู† ูˆุฃุฏูˆุงุช CLI) ู„ูŠุชู… ุชุญูˆูŠู„ู‡ุง ู„ุญุธูŠุงู‹ ุฅู„ู‰ ู„ู‚ุทุงุช Firecracker ููˆุฑูŠุฉ ุงู„ุฅู‚ู„ุงุน.
  4. ุญุฏูˆุฏ ุฃู…ู†ูŠุฉ ู…ุดุฏุฏุฉ: ุนุฒู„ ูƒุงู…ู„ ู„ู…ุณุงุญุฉ ุฃุณู…ุงุก ุงู„ุดุจูƒุฉ (Network Namespace)ุŒ ูˆุฌุฏุฑุงู† ุญู…ุงูŠุฉ ู‚ุงุจู„ุฉ ู„ู„ุชุฎุตูŠุต ู„ุญุฑูƒุฉ ุงู„ู…ุฑูˆุฑ ุงู„ุตุงุฏุฑุฉุŒ ูˆุชุญุฏูŠุฏ ุตุงุฑู… ู„ู„ู…ูˆุงุฑุฏ ุนุจุฑ Linux cgroups.

4. ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุฃุณุงุณูŠุฉ 2: ู…ู†ุตุฉ Modal Labs (ุจุงูŠุซูˆู† ุจุฏูˆู† ุฎุงุฏู… ูˆุชุณุฑูŠุน ูˆุญุฏุงุช GPU)

ููŠ ุญูŠู† ุชู… ุชุญุณูŠู† E2B ู„ุฌู„ุณุงุช REPL ุงู„ุชูุงุนู„ูŠุฉ ู„ู„ูˆูƒู„ุงุกุŒ ุชู…ุซู„ ู…ู†ุตุฉ Modal ุงู„ู…ุนูŠุงุฑ ุงู„ุฐู‡ุจูŠ ู„ู€ ุงู„ุชู†ููŠุฐ ุงู„ุณุญุงุจูŠ ุจุฏูˆู† ุฎุงุฏู… ุฐูŠ ุงู„ุฅู†ุชุงุฌูŠุฉ ุงู„ุนุงู„ูŠุฉ ูˆุงู„ู…ู‡ุงู… ุงู„ุญูˆุณุจูŠุฉ ุงู„ู…ูƒุซูุฉ ู„ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ.

ุชุนุชู…ุฏ Modal ุนู„ู‰ ุชู‚ู†ูŠุฉ ุญุงูˆูŠุงุช ู„ูŠู†ูƒุณ ู…ุฎุตุตุฉ ู…ุน ู…ุดุบู„ุงุช ู…ู„ูุงุช ููŠ ู…ุณุงุญุฉ ุงู„ู…ุณุชุฎุฏู… ุชุชูŠุญ ุฅู‚ู„ุงุน ุจูŠุฆุงุช ุงู„ุนุฒู„ ุงู„ุจุนูŠุฏุฉ ููŠ ุฃู‚ู„ ู…ู† ุซุงู†ูŠุฉ ูˆุงุญุฏุฉุŒ ู…ุน ุฅู…ูƒุงู†ูŠุฉ ุฑุจุท ู…ุณุงุญุงุช ุชุฎุฒูŠู† ุณุญุงุจูŠุฉ ุถุฎู…ุฉ ุจู…ุซุงุจุฉ ู…ุฌู„ุฏุงุช ู…ุญู„ูŠุฉ ููˆุฑูŠุฉ.

import modal

app = modal.App("agent-code-executor")

# Define a sandboxed container image with all needed libraries
agent_image = (
    modal.Image.debian_slim()
    .pip_install("pandas", "numpy", "scikit-learn", "sympy")
)

@app.function(
    image=agent_image,
    timeout=60,                # Strict 60-second execution cap
    cpu=2.0,                   # Dedicated compute allocation
    memory=2048,               # 2GB RAM ceiling
    network_file_systems={"/workspace": modal.NetworkFileSystem.from_name("agent-storage")}
)
def execute_agent_code(python_code: str) -> dict:
    import sys
    from io import StringIO
    
    old_stdout = sys.stdout
    redirected_output = sys.stdout = StringIO()
    
    try:
        exec(python_code, {})
        return {"success": True, "output": redirected_output.getvalue(), "error": None}
    except Exception as e:
        return {"success": False, "output": redirected_output.getvalue(), "error": str(e)}
    finally:
        sys.stdout = old_stdout

ู…ุชู‰ ุชุฎุชุงุฑ Modal ุจุฏู„ุงู‹ ู…ู† E2B:

  • ุงู„ุชุณุฑูŠุน ุนุจุฑ ูˆุญุฏุงุช ู…ุนุงู„ุฌุฉ ุงู„ุฑุณูˆู…ุงุช (GPU): ุชุชูŠุญ Modal ู„ู„ูˆูƒูŠู„ ุทู„ุจ ุจุทุงู‚ุฉ ุฑุณูˆู…ุงุช ู…ุฎุตุตุฉ (ู…ุซู„ NVIDIA L4 ุฃูˆ A10G ุฃูˆ H100) ุฏุงุฎู„ ุจูŠุฆุฉ ุงู„ุนุฒู„ ุจุณุทุฑ ุจุฑู…ุฌูŠ ูˆุงุญุฏ (gpu="L4")ุŒ ู…ู…ุง ูŠู…ูƒู‘ู† ุงู„ูˆูƒูŠู„ ู…ู† ุงุณุชู†ุชุงุฌ ู†ู…ุงุฐุฌ ุฐูƒุงุก ุงุตุทู†ุงุนูŠ ู…ุญู„ูŠุฉ ุฃูˆ ุชู†ููŠุฐ ุฃูƒูˆุงุฏ CUDA.
  • ุงู„ู…ุนุงู„ุฌุฉ ุงู„ู…ุชูˆุงุฒูŠุฉ ุงู„ู‡ุงุฆู„ุฉ: ูŠุณุชุทูŠุน ุงู„ูˆูƒูŠู„ ุฅุทู„ุงู‚ 1,000 ุจูŠุฆุฉ ุนุฒู„ ู…ุชุฒุงู…ู†ุฉ ููŠ ู„ุญุธุงุช (ุนู„ู‰ ุณุจูŠู„ ุงู„ู…ุซุงู„ุŒ ู„ุงุฎุชุจุงุฑ 1,000 ุงุฎุชุจุงุฑ ูˆุญุฏุฉ ููŠ ู…ุณุชูˆุฏุน ุถุฎู…) ู…ุน ุชุณุนูŠุฑ ูŠุชูˆู‚ู ุชู„ู‚ุงุฆูŠุงู‹ ุนู†ุฏ ุงู†ุชู‡ุงุก ุงู„ุชู†ููŠุฐ (Scale-to-zero).
---

5. ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุฃุณุงุณูŠุฉ 3: ุงู„ุญุงูˆูŠุงุช ุงู„ู…ุญุตู†ุฉ ุฐุงุชูŠุงู‹ (Docker MCP ูˆ gVisor ูˆ WebContainers)

1. ุชู‚ู†ูŠุฉ Google gVisor (runsc)

ุจุงู„ู†ุณุจุฉ ู„ู„ู…ุคุณุณุงุช ูˆุงู„ุดุฑูƒุงุช ุงู„ูƒุจุฑู‰ ุงู„ู…ู‚ูŠุฏุฉ ุจุงู„ู‚ูˆุงู†ูŠู† ุงู„ุชู†ุธูŠู…ูŠุฉ ุงู„ุชูŠ ุชู…ู†ุน ุฅุฑุณุงู„ ุฃูƒูˆุงุฏ ุงู„ุนู…ู„ุงุก ุฅู„ู‰ ุณุญุงุจุงุช ุทุฑู ุซุงู„ุซุŒ ุชู…ุซู„ ุชู‚ู†ูŠุฉ gVisor ู…ู† ุฌูˆุฌู„ ุงู„ุญู„ ุงู„ุฃุจุฑุฒ ู„ู„ุงุณุชุถุงูุฉ ุงู„ุฐุงุชูŠุฉ.

ุชุนู…ู„ gVisor ุจู…ุซุงุจุฉ ู†ูˆุงุฉ ููŠ ู…ุณุงุญุฉ ุงู„ู…ุณุชุฎุฏู… (User-space Kernel) ู…ูƒุชูˆุจุฉ ุจู„ุบุฉ Go. ูˆุจุฏู„ุงู‹ ู…ู† ุฃู† ุชู‚ูˆู… ุงู„ุญุงูˆูŠุงุช ุจุฅุฌุฑุงุก ุงุณุชุฏุนุงุกุงุช ู†ุธุงู… ู…ุจุงุดุฑุฉ ู„ู†ูˆุงุฉ ู„ูŠู†ูƒุณ ุงู„ุฎุงุตุฉ ุจุงู„ู…ุณุชุถูŠูุŒ ุชุนุชุฑุถ gVisor ูƒุงูุฉ ุงู„ุงุณุชุฏุนุงุกุงุช ูˆุชู†ูุฐู‡ุง ุฏุงุฎู„ ุทุจู‚ุฉ ุนุฒู„ ู…ุดุฏุฏุฉ:

  • ุฅุฐุง ุญุงูˆู„ ูƒูˆุฏ ุงู„ูˆูƒูŠู„ ุงุณุชุบู„ุงู„ ุซุบุฑุฉ ุฃู…ู†ูŠุฉ ุตูุฑูŠุฉ ููŠ ุงู„ู†ูˆุงุฉุŒ ูุฅู†ู‡ ูŠุตุทุฏู… ุจุฐุงูƒุฑุฉ ุนุฒู„ gVisor ูˆู„ูŠุณ ุจู†ูˆุงุฉ ุงู„ู†ุธุงู… ุงู„ู…ุถูŠู ุงู„ุญู‚ูŠู‚ูŠุฉ.
  • ุชุชูƒุงู…ู„ ุจุณู„ุงุณุฉ ู…ุน ู…ุญุฑูƒ Docker ุงู„ู‚ูŠุงุณูŠ (docker run --runtime=runsc) ูˆุจูŠุฆุงุช Kubernetes (ุนุจุฑ runtimeClassName: gvisor).

2. ุญุงูˆูŠุงุช Docker ู…ุน ุจุฑูˆุชูˆูƒูˆู„ ุณูŠุงู‚ ุงู„ู†ู…ูˆุฐุฌ (MCP)

ููŠ ุนุงู… 2026ุŒ ุชูƒุงู…ู„ุช Docker ู…ุจุงุดุฑุฉ ู…ุน ุจุฑูˆุชูˆูƒูˆู„ Model Context Protocol (MCP) ุงู„ุฐูŠ ุฃุทู„ู‚ุชู‡ Anthropic. ูˆุชุณู…ุญ ุฎูˆุงุฏู… Docker MCP ู„ู„ูˆูƒู„ุงุก ุจุงู„ูˆุตูˆู„ ุฅู„ู‰ ูˆุธุงุฆู ุงู„ุญุงูˆูŠุฉ ุงู„ู…ุนุฒูˆู„ุฉ ูƒุฃุฏูˆุงุช ุตุฑูŠุญุฉ ู…ุญุฏุฏุฉ ุงู„ุตู„ุงุญูŠุงุช ุจุฏู„ุงู‹ ู…ู† ู…ู†ุญู‡ู… ูˆุตูˆู„ุงู‹ ุนุดูˆุงุฆูŠุงู‹ ูƒุฌุฐุฑ (Root Shell). ูˆูŠุทู„ุจ ุงู„ูˆูƒูŠู„ ุนู…ู„ูŠุงุช ู…ุญุฏุฏุฉ (ู…ุซู„ run_python_script ุฃูˆ read_workspace_file) ุนุจุฑ ุจูˆุงุจุฉ MCP ุงู„ุชูŠ ุชูุฑุถ ู…ุณุงุฑุงุช ู…ุณู…ูˆุญุฉ ูˆุฃุญุฌุงู… ุชุฎุฒูŠู† ู„ู„ู‚ุฑุงุกุฉ ูู‚ุท.

3. ุจูŠุฆุงุช WebContainers ุงู„ู…ู†ูุฐุฉ ุฏุงุฎู„ ุงู„ู…ุชุตูุญ

ุงุจุชูƒุฑุช ุดุฑูƒุฉ StackBlitz ุชู‚ู†ูŠุฉ WebContainers ุงู„ุชูŠ ุชุชูŠุญ ุชุดุบูŠู„ ุจูŠุฆุฉ Node.js ูˆ WebAssembly ูƒุงู…ู„ุฉ ุฏุงุฎู„ ู„ุณุงู† ุงู„ู…ุชุตูุญ ุงู„ุฎุงุต ุจุงู„ู…ุณุชุฎุฏู… ู…ุจุงุดุฑุฉ ุฏูˆู† ุงู„ุญุงุฌุฉ ู„ุฃูŠ ุฎุงุฏู…:

  • ุชูƒู„ูุฉ ุจู†ูŠุฉ ุชุญุชูŠุฉ ู…ุนุฏูˆู…ุฉ: ูŠู†ูุฐ ุงู„ูˆูƒูŠู„ ุฃูˆุงู…ุฑู‡ ุนู„ู‰ ู…ุนุงู„ุฌ ุฌู‡ุงุฒ ุงู„ุนู…ูŠู„ ู…ุจุงุดุฑุฉ.
  • ุฃู…ุงู† ุฎุงุฏู… ุจู†ุณุจุฉ 100%: ู„ุง ูŠู…ูƒู† ู„ุฃูŠ ูƒูˆุฏ ุฎุจูŠุซ ุงู„ูˆุตูˆู„ ุฅู„ู‰ ุฎูˆุงุฏู…ูƒ ุงู„ุฎู„ููŠุฉ ู„ุฃู†ู‡ ูŠุนู…ู„ ูƒู„ูŠุงู‹ ุฏุงุฎู„ ุจูŠุฆุฉ ุนุฒู„ ุฌุงูุง ุณูƒุฑูŠุจุช ููŠ ุงู„ู…ุชุตูุญ.
  • ุงู„ู‚ูŠูˆุฏ ุงู„ู…ุนู…ุงุฑูŠุฉ: ุชู‚ุชุตุฑ ุนู„ู‰ ุจูŠุฆุงุช WebAssembly ูˆุฌุงูุง ุณูƒุฑูŠุจุช/Node.js ู…ุน ุฏุนู… ู…ุญุฏูˆุฏ ู„ู…ูƒุชุจุงุช C ุงู„ุฃุตู„ูŠุฉ ูˆุญุฒู… ุจุงูŠุซูˆู† ุงู„ุชูŠ ุชุชุทู„ุจ ุฐุงูƒุฑุฉ ุถุฎู…ุฉ.
---

6. ุงู„ุชู†ููŠุฐ ุงู„ุนู…ู„ูŠ ููŠ ุงู„ุฅู†ุชุงุฌ: ุจู†ุงุก ุจูŠุฆุฉ ุนุฒู„ ุขู…ู†ุฉ ู„ู„ูˆูƒู„ุงุก ุจู„ุบุฉ ุจุงูŠุซูˆู†

ุชูˆุถุญ ูุฆุฉ ุจุงูŠุซูˆู† ุงู„ุฌุงู‡ุฒุฉ ู„ู„ุฅู†ุชุงุฌ ุงู„ุชุงู„ูŠุฉ ูƒูŠู ูŠุฏูŠุฑ ู†ุธุงู… ุชู†ุณูŠู‚ ุงู„ูˆูƒู„ุงุก ุงู„ู…ุณุชู‚ู„ ุชู†ููŠุฐ ุฃูˆุงู…ุฑ ุจุงูŠุซูˆู† ูˆุฃูˆุงู…ุฑ Bash ุบูŠุฑ ุงู„ู…ูˆุซูˆู‚ุฉ ุฏุงุฎู„ ุจูŠุฆุฉ ุนุฒู„ Firecracker ู…ุฏุนูˆู…ุฉ ุจู…ู†ุตุฉ E2B ู…ุน ูุฑุถ ู‚ูŠูˆุฏ ุฒู…ู†ูŠุฉ ุตุงุฑู…ุฉุŒ ูˆุนุฒู„ ุจูŠุฆูŠ ูƒุงู…ู„ุŒ ูˆุงุนุชุฑุงุถ ุงู„ุฃุฎุทุงุก:

"""
Production AI Agent Sandbox Executor using E2B Firecracker MicroVMs
Ecosystem: Python 3.11+, E2B Code Interpreter SDK v1.0+
"""

import os
from typing import Dict, Any, Optional, List
from e2b_code_interpreter import Sandbox

class AgentSandboxExecutor:
    """
    Manages secure, ephemeral execution environments for autonomous coding agents.
    Provides hardware-isolated MicroVM sandboxes with bidirectional file transfer,
    strict execution timeouts, and automatic resource cleanup.
    """
    def __init__(self, template: str = "python-3", timeout_seconds: int = 120):
        self.template = template
        self.default_timeout = timeout_seconds

    def execute_agent_code(
        self, 
        code: str, 
        input_files: Optional[Dict[str, str]] = None,
        timeout: Optional[int] = None
    ) -> Dict[str, Any]:
        """
        Executes arbitrary agent code inside a dedicated Firecracker MicroVM.
        
        Args:
            code: The Python script generated by the LLM.
            input_files: Dict of {filename: content} to inject prior to execution.
            timeout: Maximum execution duration in seconds.
            
        Returns:
            Dict containing execution status, stdout, stderr, and generated artifacts.
        """
        exec_timeout = timeout or self.default_timeout
        artifacts: List[Dict[str, str]] = []
        
        # Spawn an ephemeral, hardware-isolated Firecracker MicroVM (~150ms)
        with Sandbox.create(template=self.template, timeout=exec_timeout) as sandbox:
            try:
                # Step 1: Pre-populate workspace files
                if input_files:
                    for path, content in input_files.items():
                        sandbox.files.write(path, content)

                # Step 2: Execute code with interactive output streaming
                execution = sandbox.run_code(
                    code,
                    timeout=exec_timeout,
                    on_stdout=lambda text: None, # Optional real-time streaming hook
                    on_stderr=lambda text: None
                )

                # Step 3: Extract generated visual artifacts (Matplotlib plots, PNGs, SVGs)
                if execution.results:
                    for idx, result in enumerate(execution.results):
                        if result.png:
                            artifacts.append({
                                "type": "png",
                                "name": f"artifact_{idx}.png",
                                "data": result.png
                            })
                        elif result.chart:
                            artifacts.append({
                                "type": "json_chart",
                                "name": f"chart_{idx}.json",
                                "data": str(result.chart)
                            })

                # Step 4: Verify execution success
                is_success = execution.error is None
                error_payload = None
                if not is_success:
                    error_payload = {
                        "name": execution.error.name,
                        "value": execution.error.value,
                        "traceback": execution.error.traceback
                    }

                return {
                    "success": is_success,
                    "stdout": "\n".join([str(log) for log in execution.logs.stdout]),
                    "stderr": "\n".join([str(log) for log in execution.logs.stderr]),
                    "error": error_payload,
                    "artifacts": artifacts
                }

            except TimeoutError:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": "Execution exceeded hard wall-clock timeout limit.",
                    "error": {"name": "TimeoutError", "value": f"Execution exceeded {exec_timeout}s limit"},
                    "artifacts": []
                }
            except Exception as e:
                return {
                    "success": False,
                    "stdout": "",
                    "stderr": str(e),
                    "error": {"name": type(e).__name__, "value": str(e)},
                    "artifacts": []
                }

7. ู…ุตููˆูุฉ ุงู„ู…ู‚ุงุฑู†ุฉ ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุดุงู…ู„ุฉ

ุชู‚ุงุฑู† ุงู„ู…ุตููˆูุฉ ุงู„ุชุงู„ูŠุฉ ุจูŠู† ุฃุจุฑุฒ 4 ู…ุนู…ุงุฑูŠุงุช ู„ุชู†ููŠุฐ ุฃูƒูˆุงุฏ ุงู„ูˆูƒู„ุงุก ููŠ ุนุงู… 2026 ุนุจุฑ ุฃู‡ู… ุงู„ุฃุจุนุงุฏ ุงู„ู‡ู†ุฏุณูŠุฉ ุงู„ุญุฑุฌุฉ:

ุงู„ุจุนุฏ ุงู„ู…ุนู…ุงุฑูŠE2B (Firecracker MicroVM)Modal Labs (ุญุงูˆูŠุงุช ุจุฏูˆู† ุฎุงุฏู…)Docker + gVisor (runsc)WebContainers (ุฏุงุฎู„ ุงู„ู…ุชุตูุญ Wasm)
ุขู„ูŠุฉ ุงู„ุนุฒู„ ุงู„ุฃู…ู†ูŠู…ุญุงูƒุงุฉ ุนุชุงุฏูŠุฉ ูƒุงู…ู„ุฉ ุนุจุฑ KVM (AWS Firecracker)ู…ุญุงูƒุงุฉ ุญุงูˆูŠุงุช ุงูุชุฑุงุถูŠุฉ ููŠ ู…ุณุงุญุฉ ุงู„ู…ุณุชุฎุฏู…ุงุนุชุฑุงุถ ุงุณุชุฏุนุงุกุงุช ุงู„ู†ุธุงู… ุนุจุฑ ู†ูˆุงุฉ GoุจูŠุฆุฉ ุนุฒู„ ุฌุงูุง ุณูƒุฑูŠุจุช ูˆ WebAssembly ููŠ ุงู„ู…ุชุตูุญ
ุฒู…ู† ุงู„ุฅู‚ู„ุงุน ุงู„ุจุงุฑุฏ120 โ€“ 180 ู…ู„ู„ูŠ ุซุงู†ูŠุฉ600 โ€“ 1,200 ู…ู„ู„ูŠ ุซุงู†ูŠุฉ1,500 โ€“ 3,500 ู…ู„ู„ูŠ ุซุงู†ูŠุฉ50 โ€“ 100 ู…ู„ู„ูŠ ุซุงู†ูŠุฉ (ุนู„ู‰ ุงู„ุนู…ูŠู„)
ุงุณุชู…ุฑุงุฑูŠุฉ ุงู„ุญุงู„ุฉุฌู„ุณุงุช REPL ุชูุงุนู„ูŠุฉ ู…ุณุชู…ุฑุฉ ุงู„ุญูุธุฏูˆุงู„ ุนุงุจุฑุฉ + ู†ุธุงู… ู…ู„ูุงุช ุดุจูƒูŠ ู…ุดุชุฑูƒุฏูˆุฑุฉ ุญูŠุงุฉ ุญุงูˆูŠุฉ ู…ุณุชู…ุฑุฉุฐุงูƒุฑุฉ ู„ุณุงู† ุงู„ู…ุชุตูุญ
ุชุณุฑูŠุน ูˆุญุฏุงุช GPUุฎุฑูŠุทุฉ ุทุฑูŠู‚ / ุณุญุงุจุงุช ุฎุงุตุฉ ู„ู„ู…ุคุณุณุงุชุฏุนู… ุฃุตู„ูŠ ู…ู† ุงู„ุฏุฑุฌุฉ ุงู„ุฃูˆู„ู‰ (NVIDIA L4 ุฅู„ู‰ H100)ุชู…ุฑูŠุฑ GPU ู…ุณุชุถุงู ุฐุงุชูŠุงู‹ (nvidia-container-runtime)ุบูŠุฑ ู…ุชูˆูุฑ (ุญูˆุณุจุฉ WebGPU ุชุฌุฑูŠุจูŠุฉ)
ุจูŠุฆุฉ REPL ุงู„ุชูุงุนู„ูŠุฉุฃุตู„ูŠุฉ (ู†ู…ูˆุฐุฌ ุฎู„ุงูŠุง Jupyter ุงู„ุชูุงุนู„ูŠ)ุชู†ููŠุฐ ุฏูุนูŠ ุบูŠุฑ ุชูุงุนู„ูŠ / ุชุฏูู‚ ู…ุฎุฑุฌุงุชู‚ุงุจู„ุฉ ู„ู„ุชู‡ูŠุฆุฉ ุนุจุฑ pseudo-TTY (pty)ู…ุญุงูƒูŠ ุทุฑููŠุฉ Node.js ุฃุตู„ูŠ
ุฃู…ุงู† ุญุฑูƒุฉ ุงู„ู…ุฑูˆุฑ ุงู„ุตุงุฏุฑุฉุนุฒู„ ู…ุณุงุญุงุช ุงู„ุฃุณู…ุงุก + ุฌุฏุฑุงู† ุญู…ุงูŠุฉ ุญุฑูƒุฉ ุงู„ุตุงุฏุฑุฑุจุท VPC ู‚ุงุจู„ ู„ู„ุชุฎุตูŠุต + ู‚ูˆุงุฆู… ุจูŠุถุงุกุฌุฏุฑุงู† iptables ุนู„ู‰ ุงู„ู…ุถูŠู / Cilium eBPFู…ู‚ูŠุฏุฉ ุจุณูŠุงุณุงุช ุงู„ู…ุชุตูุญ CORS / Fetch
ู†ู…ูˆุฐุฌ ุงู„ู†ุดุฑ ูˆุงู„ุชุดุบูŠู„ุณุญุงุจุฉ ู…ุฏุงุฑุฉ ุจุงู„ูƒุงู…ู„ ุฃูˆ ุฎูˆุงุฏู… ุฎุงุตุฉ ู„ู„ู…ุคุณุณุงุชุณุญุงุจุฉ ู…ุฏุงุฑุฉ ุจุงู„ูƒุงู…ู„ุงุณุชุถุงูุฉ ุฐุงุชูŠุฉ ุจู†ุณุจุฉ 100% ุนู„ู‰ ุฎูˆุงุฏู… ุฃูˆ Kubernetesุนู„ู‰ ุฌู‡ุงุฒ ุงู„ุนู…ูŠู„ ุฏุงุฎู„ ุงู„ู…ุชุตูุญ ุจู†ุณุจุฉ 100%
ู†ู…ูˆุฐุฌ ุงู„ุชุณุนูŠุฑู„ูƒู„ ุซุงู†ูŠุฉ ุจูŠุฆุฉ ุนุฒู„ (~$0.000028/ุซุงู†ูŠุฉ)ููˆุชุฑุฉ ุจุงู„ุซุงู†ูŠุฉ ู„ู„ู…ุนุงู„ุฌ / ุงู„ุฐุงูƒุฑุฉ / ูˆุญุฏุงุช GPUุชูƒุงู„ูŠู ุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ุงู„ุซุงุจุชุฉ ู„ู„ุฎูˆุงุฏู…0.00$ ุชูƒู„ูุฉ ุจู†ูŠุฉ ุชุญุชูŠุฉ
ุฃูุถู„ ู…ู„ุงุกู…ุฉ ู„ู„ุฅู†ุชุงุฌูˆูƒู„ุงุก ุงู„ุจุฑู…ุฌุฉ ุงู„ุชูุงุนู„ูŠูŠู† ูˆุฑูˆุจูˆุชุงุช ุนู„ูˆู… ุงู„ุจูŠุงู†ุงุชุงู„ู…ู‡ุงู… ุงู„ุฏูุนูŠุฉ ุงู„ุซู‚ูŠู„ุฉุŒ ุงู„ู…ู‡ุงู… ุงู„ู…ูˆุฒุนุฉุŒ ุฃูƒูˆุงุฏ GPUุงู„ู…ุคุณุณุงุช ุฐุงุช ู…ุชุทู„ุจุงุช ุงู„ุงู…ุชุซุงู„ ูˆุงู„ุดุจูƒุงุช ุงู„ู…ุนุฒูˆู„ุฉุจูŠุฆุงุช ุงู„ุชุฌุงุฑุจ ุงู„ุชุนู„ูŠู…ูŠุฉ ูˆุชุทุจูŠู‚ุงุช ุงู„ูˆูŠุจ ุงู„ู…ุจุงุดุฑุฉ
---

8. ุฃูุถู„ ุงู„ู…ู…ุงุฑุณุงุช ุงู„ุฃู…ู†ูŠุฉ ููŠ ุงู„ุฅู†ุชุงุฌ ูˆุงู‚ุชุตุงุฏูŠุงุช ุงู„ุชูƒู„ูุฉ

ูŠุชุทู„ุจ ุชุดุบูŠู„ ู…ู„ุงูŠูŠู† ุนู…ู„ูŠุงุช ุชู†ููŠุฐ ุงู„ุฃูƒูˆุงุฏ ุงู„ุจุฑู…ุฌูŠุฉ ู„ู„ูˆูƒู„ุงุก ุดู‡ุฑูŠุงู‹ ุญุฏูˆุฏุงู‹ ุชุดุบูŠู„ูŠุฉ ู…ุดุฏุฏุฉ ู„ู…ู†ุน ุชุถุฎู… ููˆุงุชูŠุฑ ุงู„ุณุญุงุจุฉ ูˆุญู…ุงูŠุฉ ุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ู…ู† ุงู„ุงุฎุชุฑุงู‚ุงุช.

1. ู‚ุงุฆู…ุฉ ุงู„ุชุญุตูŠู† ุงู„ุฃู…ู†ูŠ ู„ุจูŠุฆุงุช ุนุฒู„ ุงู„ูˆูƒู„ุงุก

  • ูุฑุถ ู…ู‡ู„ุงุช ุฒู…ู†ูŠุฉ ุตุงุฑู…ุฉ ู„ุง ุชู‚ุจู„ ุงู„ุชุฌุงูˆุฒ (Hard Wall-Clock Timeouts): ู„ุง ุชุนุชู…ุฏ ุฃุจุฏุงู‹ ุนู„ู‰ ุงู„ู…ู‡ู„ุงุช ุงู„ุฒู…ู†ูŠุฉ ุงู„ู…ูƒุชูˆุจุฉ ุฏุงุฎู„ ุงู„ูƒูˆุฏ (ู…ุซู„ signal.alarm ููŠ ุจุงูŠุซูˆู†). ุงุถุจุท ุฏุงุฆู…ุงู‹ ุฅู†ู‡ุงุกู‹ ุฅุฌุจุงุฑูŠุงู‹ ุนู„ู‰ ู…ุณุชูˆู‰ ุงู„ู€ Hypervisor (ู…ุซู„ timeout = 60s)ุ› ูุฅุฐุง ูˆู„ู‘ุฏ ุงู„ูˆูƒูŠู„ ุญู„ู‚ุฉ while True ู„ุง ู†ู‡ุงุฆูŠุฉุŒ ูŠู‚ูˆู… ุงู„ุฎุงุฏู… ุงู„ู…ุถูŠู ุจุฅุณู‚ุงุท ุงู„ู€ MicroVM ุชู„ู‚ุงุฆูŠุงู‹.
  • ุญุธุฑ ู†ู‚ุงุท ู†ู‡ุงูŠุฉ ุจูŠุงู†ุงุช ุชุนุฑูŠู ุงู„ุณุญุงุจุฉ (Block Cloud Metadata): ุชุทุจูŠู‚ ู‚ูˆุงุนุฏ ุฌุฏุงุฑ ุญู…ุงูŠุฉ ุตุฑูŠุญุฉ ู„ุญุฑูƒุฉ ุงู„ู…ุฑูˆุฑ ุงู„ุตุงุฏุฑุฉ ุชุญุธุฑ ุงู„ุนู†ูˆุงู† 169.254.169.254 ูˆู†ุทุงู‚ุงุช ุงู„ุดุจูƒุงุช ุงู„ูุฑุนูŠุฉ ุงู„ุฎุงุตุฉ (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) ู„ู„ู‚ุถุงุก ุงู„ุชุงู… ุนู„ู‰ ู‡ุฌู…ุงุช SSRF.
  • ู†ุธุงู… ู…ู„ูุงุช ู„ู„ู‚ุฑุงุกุฉ ูู‚ุท ู…ุน ู…ุณุงุญุงุช ุชุฎุฒูŠู† ุนุงุจุฑุฉ: ุงุฌุนู„ ุงู„ุตูˆุฑุฉ ุงู„ุฃุณุงุณูŠุฉ ู„ุจูŠุฆุฉ ุงู„ุนุฒู„ ุบูŠุฑ ู‚ุงุจู„ุฉ ู„ู„ุชุนุฏูŠู„ (Immutable)ุŒ ู…ุน ุฑุจุท ู…ุฌู„ุฏ /workspace ุนุงุจุฑ ุนู„ู‰ ุฐุงูƒุฑุฉ tmpfs ู…ุน ุญุตุต ุชุฎุฒูŠู† ุตุงุฑู…ุฉ (ู…ุซู„ 512 ู…ูŠุฌุงุจุงูŠุช) ู„ู…ู†ุน ู‡ุฌู…ุงุช ุงุณุชู†ุฒุงู ุงู„ู‚ุฑุต.
  • ุชู†ู‚ูŠุฉ ู…ุฎุฑุฌุงุช ุงู„ุฐุงูƒุฑุฉ ุงู„ู…ุคู‚ุชุฉ (Sanitize Output Buffers): ุญุฏุฏ ุงุณุชูŠุนุงุจ ู…ุฎุฑุฌุงุช stdout ูˆ stderr ุจู€ 100 ูƒูŠู„ูˆุจุงูŠุช ู„ู…ู†ุน ุงุณุชู†ุฒุงู ุฐุงูƒุฑุฉ ุฎุงุฏู… ุงู„ุชู†ุณูŠู‚ ููŠ ุญุงู„ ุญุงูˆู„ ุงู„ูˆูƒูŠู„ ุทุจุงุนุฉ ุชุฏูู‚ ู„ุง ู†ู‡ุงุฆูŠ ู…ู† ุงู„ุญุฑูˆู ุงู„ุนุดูˆุงุฆูŠุฉ.
Cost Model Breakdown (10,000 Agent Sandbox Executions / Month):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Platform               โ”‚ Estimated Cost    โ”‚ Operational Overhead                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ E2B Managed Cloud      โ”‚ ~$35 - $60 / mo   โ”‚ Zero server management. Instant API.     โ”‚
โ”‚ Modal Labs (CPU only)  โ”‚ ~$40 - $70 / mo   โ”‚ Zero server management. Decorator syntax.โ”‚
โ”‚ Self-Hosted Kubernetes โ”‚ ~$350 - $600 / mo โ”‚ High (Cluster maintenance, KVM nodes).  โ”‚
โ”‚ WebContainers (Client) โ”‚ $0.00 / mo        โ”‚ Zero backend cost (Browser execution).   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ ุฃู…ุงู† ูˆุฎุตูˆุตูŠุฉ ุงู„ุจูŠุงู†ุงุช ููŠ ุจูŠุฆุงุช ุงู„ุนุฒู„:

ุนู†ุฏู…ุง ูŠู†ูุฐ ุงู„ูˆูƒู„ุงุก ุฃูƒูˆุงุฏุงู‹ ุจุฑู…ุฌูŠุฉ ุชุญุชูˆูŠ ุนู„ู‰ ุดูŠูุฑุงุช ู…ุตุฏุฑูŠุฉ ุณุฑูŠุฉุŒ ุฃูˆ ุฑู…ูˆุฒ ูˆุตูˆู„ API ู„ู„ู…ุคุณุณุฉุŒ ุฃูˆ ุจูŠุงู†ุงุช ุดุฎุตูŠุฉ ู„ู„ุนู…ู„ุงุก (PII)ุŒ ุชุฃูƒุฏ ู…ู† ู…ุญูˆ ู„ู‚ุทุงุช ุจูŠุฆุงุช ุงู„ุนุฒู„ ู…ู† ุฐุงูƒุฑุฉ ุงู„ุฎุงุฏู… ุงู„ู…ุถูŠู ููˆุฑ ุฅู†ู‡ุงุก ุงู„ุฌู„ุณุฉ. ูˆุชุญู‚ู‚ ู…ู† ุฃู† ู…ุฒูˆุฏ ุจูŠุฆุงุช ุงู„ุนุฒู„ ุงู„ุณุญุงุจูŠ ูŠูˆู‚ุน ุงุชูุงู‚ูŠุงุช ู…ุนุงู„ุฌุฉ ุงู„ุจูŠุงู†ุงุช (BAA/DPA) ูˆูŠูˆูุฑ ุชู‚ุงุฑูŠุฑ ุงู…ุชุซุงู„ SOC2 Type II ุชุถู…ู† ุนุฏู… ุงู„ุงุญุชูุงุธ ุจุฃูŠ ุจูŠุงู†ุงุช ุนู„ู‰ ุงู„ุฅุทู„ุงู‚.

---

9. ุงู„ุฎู„ุงุตุฉ ูˆุงู„ุชูˆุตูŠุงุช ุงู„ู…ุนู…ุงุฑูŠุฉ

ููŠ ุนุงู… 2026ุŒ ู„ู… ูŠุนุฏ ุฅู†ุดุงุก ุจูŠุฆุงุช ุงู„ุนุฒู„ ุงู„ุขู…ู†ุฉ ู…ูŠุฒุฉ ุงุฎุชูŠุงุฑูŠุฉุŒ ุจู„ ู‡ูˆ ุงู„ุฑูƒูŠุฒุฉ ุงู„ุฃุณุงุณูŠุฉ ุงู„ุชูŠ ู„ุง ุบู†ู‰ ุนู†ู‡ุง ู„ุจู†ุงุก ูˆู†ุดุฑ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ุงู„ุฐุงุชูŠูŠู†:

  • ุฅุฐุง ูƒู†ุช ุชุจู†ูŠ ู…ุณุงุนุฏูŠู† ุจุฑู…ุฌูŠูŠู† ุชูุงุนู„ูŠูŠู†ุŒ ุฃูˆ ู…ู‡ู†ุฏุณูŠ ุจุฑู…ุฌูŠุงุช ู…ุณุชู‚ู„ูŠู†ุŒ ุฃูˆ ูˆูƒู„ุงุก ู„ุชุญู„ูŠู„ ุงู„ุจูŠุงู†ุงุชุŒ ุงุนุชู…ุฏ ุนู„ู‰ E2B ุจูุถู„ ุชู‚ู†ูŠุฉ Firecracker MicroVMs ูุงุฆู‚ุฉ ุงู„ุณุฑุนุฉ ูˆู‚ุฏุฑุงุช ุชุฏูู‚ REPL ุงู„ุชูุงุนู„ูŠุฉ ุงู„ุบู†ูŠุฉ.
  • ุฅุฐุง ูƒุงู† ูˆูƒู„ุงุคูƒ ูŠู†ูุฐูˆู† ู…ุนุงู„ุฌุฉ ุฏูุนูŠุฉ ู…ุชูˆุงุฒูŠุฉ ุถุฎู…ุฉ ู„ู„ุจูŠุงู†ุงุชุŒ ุฃูˆ ุชุฏุฑูŠุจ ู†ู…ุงุฐุฌ ุขู„ูŠุŒ ุฃูˆ ู…ู‡ุงู… ุชุชุทู„ุจ ุชุณุฑูŠุน ูˆุญุฏุงุช GPUุŒ ุงู†ุดุฑ ุญู„ูˆู„ูƒ ุนู„ู‰ Modal.
  • ุฅุฐุง ูƒุงู†ุช ู…ุคุณุณุชูƒ ุชูุฑุถ ุฅุจู‚ุงุก ุงู„ุจูŠุงู†ุงุช ู…ุญู„ูŠุงู‹ ุฏุงุฎู„ ู…ุฑุงูƒุฒ ุจูŠุงู†ุงุช ุฎุงุตุฉุŒ ุงู†ุดุฑ Docker ู…ุน Google gVisor (runsc) ุฃูˆ Kata Containers ุนู„ู‰ ู…ุฌู…ูˆุนุงุช Kubernetes ุงู„ุฏุงุฎู„ูŠุฉ.
  • ุฅุฐุง ูƒุงู† ุชุทุจูŠู‚ูƒ ูŠุนู…ู„ ุจุงู„ูƒุงู…ู„ ุฏุงุฎู„ ู…ุชุตูุญ ุงู„ู…ุณุชุฎุฏู…ุŒ ุงุจู†ู ุญู„ูƒ ููˆู‚ WebContainers.

ุงุณุชูƒุดู ุงู„ุฃุฏูˆุงุช ุฐุงุช ุงู„ุตู„ุฉ ุจุจูŠุฆุงุช ุงู„ุนุฒู„ ูˆุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ู„ู„ูˆูƒู„ุงุก ุนู„ู‰ AgDex.ai:

  • E2B โ€” ุจูŠุฆุงุช ุนุฒู„ ุงูุชุฑุงุถูŠุฉ ุขู…ู†ุฉ ุชุนุชู…ุฏ ุนู„ู‰ Firecracker MicroVMs ู„ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ.
  • Modal โ€” ุญุงูˆูŠุงุช ุณุญุงุจูŠุฉ ุจุฏูˆู† ุฎุงุฏู… ุนุงู„ูŠุฉ ุงู„ุฃุฏุงุก ูˆุชุณุฑูŠุน ูˆุญุฏุงุช GPU ุนู†ุฏ ุงู„ุทู„ุจ.
  • OpenHands โ€” ู…ู†ุตุฉ ู…ูุชูˆุญุฉ ุงู„ู…ุตุฏุฑ ู„ุจู†ุงุก ูˆุชุดุบูŠู„ ูˆูƒู„ุงุก ุชุทูˆูŠุฑ ุงู„ุจุฑู…ุฌูŠุงุช ุงู„ุฐุงุชูŠุฉ.
  • SWE-agent โ€” ุฅุทุงุฑ ุนู…ู„ ูˆู†ุธุงู… ูˆูƒูŠู„ ู„ุญู„ ุงู„ู…ุดูƒู„ุงุช ุงู„ุจุฑู…ุฌูŠุฉ ุนู„ู‰ ู…ุณุชูˆุฏุนุงุช GitHub.
---

ู†ูุดุฑ ุจูˆุงุณุทุฉ AgDex.ai โ€” ุงู„ุฏู„ูŠู„ ูˆุงู„ู…ุคุดุฑ ุงู„ู…ุฑุฌุนูŠ ุงู„ุฃูˆู„ ู„ุฃุฏูˆุงุช ูˆุจู†ูŠุฉ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ.

ุงุณุชูƒุดู ุงู„ุฃุฏูˆุงุช ุฐุงุช ุงู„ุตู„ุฉ ุจุจูŠุฆุงุช ุงู„ุนุฒู„ ูˆุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ู„ู„ูˆูƒู„ุงุก ุนู„ู‰ AgDex.ai