-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
featureNew feature or requestNew feature or request
Description
Feature Request
Is your feature request related to a problem? Please describe.
Python and JavaScript with npm packages currently require E2B (external cloud service), making them unavailable in air-gapped/restricted environments. This blocks enterprise deployments with compliance requirements that prohibit outbound traffic.
Describe the solution you'd like
Implement a local sandbox environment similar to DifySandbox with these capabilities:
Core Features:
- Multi-language support: Python and JavaScript/Node.js
- Dependency management:
- Python:
requirements.txt
or inline declarations - JavaScript:
package.json
or inline imports
- Python:
- Security isolation:
- Seccomp-based system call filtering (whitelist policy)
- File system isolation
- Network isolation via Docker network/proxy
- Pre-configured packages: Common libraries (numpy, pandas, requests)
- Custom dependencies: Users can add packages via config
Configuration:
LOCAL_SANDBOX_ENABLED=true
LOCAL_SANDBOX_PYTHON_PACKAGES=numpy,pandas,requests,beautifulsoup4
Implementation approach (following Dify's architecture):
- Isolated Docker containers with Seccomp security profiles
- Dependency caching to avoid repeated installations
- Network proxy for controlled external access (optional)
- Resource limits (CPU, memory, timeout)
Describe alternatives you've considered
- E2B only - Requires internet access, not viable for air-gapped
- Basic execution without packages - Too limited for real-world use
- Dify solves this with DifySandbox - a local, secure code execution environment that runs Python and Node.js with custom dependencies in self-hosted deployments.
Additional context
Reference Implementation:
- Dify's DifySandbox: https://github.com/langgenius/dify-sandbox
- Supports Python 3.10+ and Node.js locally
- Pre-installed dependencies with custom additions
- Battle-tested in production self-hosted deployments
- Built on Seccomp for system-level security
Use cases this enables:
- Data processing with pandas/numpy
- API integrations with custom libraries
- ML inference with scikit-learn/transformers
- Web scraping with beautifulsoup4
- All in fully air-gapped environments
Impact:
- Enables government, healthcare, financial deployments
- ~30-40% of enterprise self-hosted market has network restrictions
- Feature parity with Dify, n8n etc.
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request