Skip to content

[FEATURE] Self-hosted code interpreter alternative to E2B (exec-sandbox) #5894

@clemlesne

Description

@clemlesne

Feature Description

Add a self-hosted code interpreter tool node backed by exec-sandbox, giving Flowise users hardware-isolated Python, JavaScript, and raw shell execution without requiring a cloud account or sending code to external servers.

Problem Statement

The current CodeInterpreterE2B node requires an E2B cloud API key and sends all executed code and data to E2B's servers. This is a blocker for:

  • Air-gapped / regulated environments -- healthcare, finance, government, and defense organizations that cannot send code or data to third-party clouds.
  • Data-sensitive workloads -- any flow that processes PII, proprietary data, or trade secrets through code execution.
  • Local development -- developers on macOS who want code execution without network dependency.
  • Cost control -- teams running high volumes of executions who want to avoid per-execution cloud billing.

The E2B node also has known reliability issues: DNS resolution failures against E2B's ephemeral sandbox hostnames reportedly cause Flowise to crash roughly 30% of the time per #4254.

Proposed Solution

A new tool node, CodeInterpreterExecSandbox, that wraps exec-sandbox as a drop-in alternative to the E2B node. The integration would follow the same INode / StructuredTool pattern as the existing CodeInterpreterE2B node under packages/components/nodes/tools/.

exec-sandbox runs each execution in a dedicated QEMU microVM with hardware virtualization (KVM on Linux, HVF on macOS). The VM boots, runs code, and is destroyed -- no state leaks, no cloud dependency.

E2B vs exec-sandbox

E2B (current) exec-sandbox (proposed)
Deployment Cloud-hosted (API key required) Self-hosted (runs on your machine)
Data residency Code sent to E2B servers Code never leaves your infrastructure
Isolation Firecracker microVM (cloud) QEMU microVM (KVM/HVF, local)
Warm start ~80-150ms 1-2ms (pre-booted VM pool)
Cold start ~300ms ~100ms (L1 memory snapshot)
Languages Python only (Flowise node hardcodes python; E2B platform also supports JS, R, Java, Bash) Python, JavaScript, raw shell
Platform Cloud-only macOS + Linux
Network required Yes (always) No
License Apache-2.0 Apache-2.0
Install npm i @e2b/code-interpreter pip install exec-sandbox + QEMU

How it would work

The node would import and use exec-sandbox's Python API directly (the package is a standard Python library). The user configures no credentials -- just installs exec-sandbox and QEMU on the Flowise host.

# exec-sandbox API (what the node would call under the hood)
from exec_sandbox import Scheduler

async with Scheduler() as scheduler:
    result = await scheduler.run(
        code="import pandas as pd; print(pd.__version__)",
        language="python",
    )
    # result.stdout, result.stderr, result.exit_code

Node configuration

  • Tool Name (string, default: code_interpreter)
  • Tool Description (string, default: describes Python/JS/Shell execution capabilities)
  • Language (dropdown: python | javascript | raw, default: python)
  • Timeout (number, seconds, default: 30)

No credential input required.

Prior Art and Related Issues

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions