-
-
Notifications
You must be signed in to change notification settings - Fork 24k
Description
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_codeNode 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
- [BUG] Flowise crashes with E2B code interpreter tool #4254 -- E2B DNS crashes (~30% failure rate)
- Add support for Azure Foundry Code Interpreter integration #5302 -- Request for Azure Foundry Code Interpreter (same underlying need: more execution backends)
- [FEATURE]how add code interpreter? #3027 -- How to add code interpreter?
- [FEATURE] Pass files to E2B code interpreter node #3952 -- File passing to E2B node
Additional Context
- PyPI: exec-sandbox
- GitHub: dualeai/exec-sandbox (Apache-2.0)
- Requires: QEMU (
brew install qemuon macOS,apt install qemu-systemon Linux)