You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
All-in-one sandbox
Deploying All-in-One Sandbox applications with a few clicks
Copy page
Download PDF
Deploying All-in-One Sandbox applications with a few clicks
This topic describes how to deploy an All-in-One Sandbox application with a few clicks by using the Application Center of Volcano Engine Function as a Service (veFaaS).​
Background information​
  • Application introduction​
  • All-in-One Sandbox functions as a highly integrated, multifunctional environment for cloud-based development and execution. It is mainly used to encapsulate all essential tools required for a complete development and interaction process into a single sandbox. The tools include the browser, shell terminal, file system, VSCode editor, and Python/node.js code execution. This provides a standardized, ready-to-use environment for automated tasks (especially AI agents), cloud-based development, and secure code execution.​
  • All-in-One Sandbox addresses the issues of traditional separated tool chains, such as environment inconsistency, cumbersome file transfers, and difficulty in add-on interaction, which delivers a truly integrated and seamless experience.​
  • Runtime​
  • Native runtime​
  • Associated cloud services​
warning​
The fees for using associated cloud services will be incurred. For billing details, see the billing documentation of the associated cloud services.​
  • veFaaS: veFaaS is used to create sandbox instances.​
Considerations​
This feature is only supported in the China (Beijing) region.​
Prerequisites​
  • An APIG instance of the Serverless gateway type has been created. For detailed operations, see Creating instances.​
  • If you use veFaaS for the first time, make sure that the cross-service authorization is complete. If the authorization is not complete, the cross-service authorization page will appear, which provides guidance on authorization.​
Procedure​
  1. Log in to the veFaaS console.​
  1. In the top navigation bar, select the target region.​
  1. In the left navigation bar, click App > App plaza.​
  1. On the App plaza page, select the All-in-One Sandbox template and click Create sandbox app.​
  1. On the Create sandbox app page, configure application parameters.​
  • ​
    Parameter​
    Description​
    Basic information​
    ​
    Name​
    Specify a custom name for the sandbox application. The sandbox application name must be unique within the same account. The name cannot be modified after being created.​
    For sandbox images​
    ​
    Container image​
    The latest All-in-one sandbox image version is selected by default.​
    Gateway routing configuration​
    ​
    Domain type​
    Domain type of the sandbox application:​
    • Unified domain: All the instances in a sandbox application share the same domain name. You can target a specific instance by including the x-faas-instance-name header or the faasInstanceName query parameter in requests.​
    For description of sandbox instances, see Sandbox instances.​
    APIG instance​
    Select an APIG instance. The sandbox application will use an API gateway as the traffic entrance.​
    Gateway service​
    Select the service that corresponds to the APIG instance.​
    Route name​
    Specify a custom route name. The route name cannot be modified after being created.​
    Path​
    Set a request path through which the sandbox application can be accessed. It can be matched only by a prefix and must start with a forward slash (/).​
    Environment variables​
    ​
    Environment variables​
    ​
    Configure custom environment variables, which can be directly read during the runtime of the function code.​
    tip​
    If you set the Container image parameter to Custom images, veFaaS will automatically parse the configuration file of the target image to obtain the environment variables for the image. You can modify it if necessary.​
    Advanced settings​
    For details, see Function configuration.​
    ​
  1. Click Confirm to create and deploy the application.​
  • You will be automatically redirected to the application details page, which displays the application deployment logs in real time.​
Operation result​
After the application is deployed, click the access address below the API gateway ID in the Linked cloud resource section on the application details page to go to the interactive interface of your application.​
What to do next​
Using All-in-One Sandbox​
You can call All-in-One Sandbox by using an API, SDK, and MCP.​
  • API​
  • SDK​
  • The sample Python SDK is as follows.​
tip​
In the sample code, $URL indicates the access endpoint of the sandbox. For the method of obtaining the endpoint, see Accessing sandbox instances.​
  • ​
    from agent_sandbox import Sandbox​
    ​
    client = Sandbox(base_url="$URL")​
    ​
    ctx = client.sandbox.get_sandbox_context()​
    print(ctx)​
    ​
    result = client.shell.exec_command(command="ls -la")​
    print(result)​
    ​
  • MCP​
  • The MCP endpoint is /v1/mcp. You can append the MCP endpoint to the access address of the application to form the full MCP address, which is shown in the following example.​
  • ​
    {​
    "mcpServers": {​
    "aio-sandbox": {​
    "url": "https://sd2mleni5ni4n75n9****.apigateway-cn-beijing.volceapi.com/v1/mcp"​
    }​
    }​
    }​
    ​
  • ​
Related document​
Creating sandbox instances by using the API or SDK​
In addition to creating sandbox instances in the veFaaS console, you can also create sandbox instances by using an API or an all-in-one SDK.​
  • API​
  • SDK​
  • The sample Python all-in-one SDK is as follows.​
  • ​
    from __future__ import print_function​
    ​
    import os​
    import sys​
    ​
    # Add the parent directory to the Python path so we can import agent_sandbox​
    sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))​
    ​
    from agent_sandbox.providers import VolcengineProvider​
    ​
    ​
    def main():​
    """​
    Main function demonstrating Volcengine provider usage.​
    """​
    # Configuration - replace with your actual credentials​
    access_key = os.getenv("VOLC_ACCESSKEY")​
    secret_key = os.getenv("VOLC_SECRETKEY")​
    region = os.getenv("VOLCENGINE_REGION", "cn-beijing")​
    ​
    # Initialize the Volcengine provider​
    provider = VolcengineProvider(​
    access_key=access_key,​
    secret_key=secret_key,​
    region=region​
    )​
    ​
    print("=== Volcengine Sandbox Provider Example ===\n")​
    ​
    function_id = "yatoczqh"​
    ​
    print("1. Creating a sandbox...")​
    sandbox_id = provider.create_sandbox(function_id=function_id)​
    print(f"Create response: {sandbox_id}")​
    ​
    ​
    if __name__ == "__main__":​
    main()​
    ​
​
Last updated: 2026.08.19 14:06:07