app icon
Sandbox Fusion
0.0.2

A secure sandbox for running and judging code generated by LLMs.

jingfelix/sandboxfusion1994 installs

dify-plugin-SandboxFusion

Author: jingfelix

Version: 0.0.2

Type: tool

Description

[!WARNING]
Sandbox Fusion does not support fine-grained permission control, so it should be used with caution in production environments (preferably avoided).

Sandbox Fusion is a tool that allows you to run and test your code in a sandboxed environment, developed by Bytedance. You can think of it as an alternative to DifySandbox that supports more languages but offers weaker security.

Usage

  1. Install SandboxFusion to your local machine. You can find the installation instructions in the SandboxFusion repository. We recommend using the Docker version for simplicity.

  2. Install the plugin and setup the configuration.

  1. Tool offers several parameters to customize the execution environment.
    • : The code to be executed.
    • : The programming language of the code. Supported languages:
    • : The maximum time (in seconds) the code is allowed to run. Default is None.
    • : To upload files to the execution environment, you need to bind the files to node variables. In the execution code, retrieve the corresponding content using the file name. Please note the default file size limit for uploads in Dify.
    • : A comma-separated list of filenames to download. After execution, the files will be output to the files variable of the output node.

An example of using the tool:

Comparison with DifySandbox

SandboxFusionDifySandbox
# Datasets10+0
# Languages232
Securitynamespace & cgroupseccomp
API TypeHTTP & SDKHTTP
DeploymentSingle ServerSingle Server
OthersJupyter Mode (Not supported yet)Fine-Grained Limitation Security

FAQ

  1. How can I install custom libraries in the sandbox?

    SandboxFusion does not support installing custom libraries dynamically. However, you can create a custom Docker image with the required libraries pre-installed and use that image to run your code. You can find more information on how to create a custom Docker image in the SandboxFusion documentation.

  2. How can I use SandboxFusion with cloud.dify.ai?

    You need to make sure that the SandboxFusion server is accessible from the cloud.dify.ai environment.

TODO

  • Support jupyter mode
  • Support calling benchmarks

Last updated: 2025-05-16

CATEGORY
Tool
VERSION
0.0.2
jingfelix·08/04/2025 05:24 AM
REQUIREMENTS
Maximum memory
256MB