From a92a87b964569b99033bac723f6e9cd275e21e26 Mon Sep 17 00:00:00 2001
From: Kevin Hsiao
Date: Fri, 27 Nov 2026 09:04:41 +0800
Subject: [PATCH] docs(vefaas-sandbox): surface BytePlus veFaaS cloud sandbox
across docs, env template, and landing page (#8702)
---
.env.example | 7 +++
README_zh.md | 1 +
.../community/provider_credentials.py | 3 ++
.../community/vefaas_sandbox/README.md | 2 +-
docs/guide/sandbox.md | 13 ++++++
.../landing/sections/sandbox-section.tsx | 13 ++++++
.../content/en/application/configuration.mdx | 20 ++++++++-
frontend/src/content/en/harness/sandbox.mdx | 45 ++++++++++++++++++-
.../content/zh/application/configuration.mdx | 13 ++++++
frontend/src/content/zh/harness/sandbox.mdx | 45 ++++++++++++++++++-
10 files changed, 158 insertions(+), 4 deletions(-)
diff --git a/.env.example b/.env.example
index a718076b97..827c8f5e21 100644
--- a/.env.example
+++ b/.env.example
@@ -97,6 +97,13 @@ EXA_BASE_URL=https://api.exa.ai
# Create one in the boxd console: https://boxd.sh?ref=deer-flow
# BOXD_API_KEY=your-boxd-api-key
+# BytePlus veFaaS cloud sandbox credentials — required only when using VeFaaSSandboxProvider.
+# Learn more: https://www.byteplus.com/en/product/vefaas
+# BYTEPLUS_ACCESS_KEY_ID=your-byteplus-access-key-id
+# BYTEPLUS_SECRET_ACCESS_KEY=your-byteplus-secret-access-key
+# BYTEPLUS_VEFAAS_SANDBOX_APP_ID=your-vefaas-sandbox-app-id
+# BYTEPLUS_VEFAAS_SANDBOX_BASE_URL=https://sandbox.example.com
+
# FEISHU_APP_ID=your-feishu-app-id
# FEISHU_APP_SECRET=your-feishu-app-secret
diff --git a/README_zh.md b/README_zh.md
index 205bf5271d..9ff9b3ed3c 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -419,6 +419,7 @@ DeerFlow 支持多种沙箱模式。
- **本地工作区**(通过工作区文件工具访问已配置的挂载)
- **Docker 执行**(在隔离的 Docker 容器里运行 sandbox 代码)
- **Docker + Kubernetes 执行**(通过 provisioner 服务在 Kubernetes Pod 中运行 sandbox 代码)
+- **BytePlus veFaaS 云端沙箱**(基于 [BytePlus veFaaS](https://www.byteplus.com/en/product/vefaas) Serverless AIO 沙箱,支持推测预热、空闲暂停/自动唤醒、线程级快照、镜像预热与可选 TOS 挂载,详见 [veFaaS Sandbox Provider](backend/packages/harness/deerflow/community/vefaas_sandbox/README.md))
Docker 开发时,服务启动行为会遵循 `config.yaml` 里的 sandbox 模式。在 Local / Docker 模式下,不会启动 `provisioner`。
diff --git a/backend/packages/harness/deerflow/community/provider_credentials.py b/backend/packages/harness/deerflow/community/provider_credentials.py
index cb8e9b9945..79c1210352 100644
--- a/backend/packages/harness/deerflow/community/provider_credentials.py
+++ b/backend/packages/harness/deerflow/community/provider_credentials.py
@@ -39,6 +39,8 @@ ENV_TEMPLATE_PLACEHOLDERS = frozenset(
{
"your-anthropic-auth-token",
"your-boxd-api-key",
+ "your-byteplus-access-key-id",
+ "your-byteplus-secret-access-key",
"your-claude-code-oauth-token",
"your-deepseek-api-key",
"your-dingtalk-client-id",
@@ -74,6 +76,7 @@ ENV_TEMPLATE_PLACEHOLDERS = frozenset(
"your-tavily-api-key",
"your-telegram-bot-token",
"your-unbrowse-api-key",
+ "your-vefaas-sandbox-app-id",
"your-vllm-api-key",
"your-volcengine-api-key",
"your-webz-api-key",
diff --git a/backend/packages/harness/deerflow/community/vefaas_sandbox/README.md b/backend/packages/harness/deerflow/community/vefaas_sandbox/README.md
index 56698ea3a4..a4af2dad7e 100644
--- a/backend/packages/harness/deerflow/community/vefaas_sandbox/README.md
+++ b/backend/packages/harness/deerflow/community/vefaas_sandbox/README.md
@@ -1,6 +1,6 @@
# BytePlus veFaaS Cloud Sandbox Provider (`deerflow/community/vefaas_sandbox/`)
-Runs each DeerFlow thread sandbox on **BytePlus Function Service (veFaaS) Cloud Sandbox** using the All-in-One Sandbox (`all-in-one-sandbox`) image.
+Runs each DeerFlow thread sandbox on **[BytePlus Function Service (veFaaS) Cloud Sandbox](https://www.byteplus.com/en/product/vefaas)** using the All-in-One Sandbox (`all-in-one-sandbox`) image (see the [veFaaS documentation](https://docs.byteplus.com/en/docs/vefaas/what-is-vefaas)).
- **Control plane**: BytePlus veFaaS OpenAPI (`Version=2024-06-06`, SigV4 HMAC-SHA256) over `httpx` — no extra cloud SDK dependency required.
- **Data plane**: Reuses DeerFlow's `AioSandbox` HTTP client via the Sandbox App's unified access domain (`X-Faas-Instance-Name: `) or a `{sandbox_id}` URL template.
diff --git a/docs/guide/sandbox.md b/docs/guide/sandbox.md
index b613ab7ad9..a2a1c45e6f 100644
--- a/docs/guide/sandbox.md
+++ b/docs/guide/sandbox.md
@@ -6,6 +6,7 @@ DeerFlow supports multiple sandbox execution modes:
- **Local Workspace** (files through workspace tools and configured mounts)
- **Docker Execution** (runs sandbox code in isolated Docker containers)
- **Docker Execution with Kubernetes** (runs sandbox code in Kubernetes pods via provisioner service)
+- **Cloud Sandboxes** (serverless remote providers including [BytePlus veFaaS](../../backend/packages/harness/deerflow/community/vefaas_sandbox/README.md), E2B, OpenSandbox, boxd, and Tenki)
When a provider returns a structured exit code, Bash tool status follows that
code, including timeout failures. Providers that return plain text, including
@@ -113,6 +114,18 @@ the thread's files and skills before it is handed out, and release copies
generated outputs back to thread storage with the same alias and path checks.
See its [configuration](../../backend/docs/CONFIGURATION.md#sandbox).
+The optional [BytePlus veFaaS Cloud Sandbox provider](../../backend/packages/harness/deerflow/community/vefaas_sandbox/README.md)
+runs each user/thread scope in a serverless [BytePlus veFaaS](https://www.byteplus.com/en/product/vefaas)
+AIO sandbox over the veFaaS OpenAPI (`Version=2024-06-06`, SigV4) with no extra
+cloud SDK dependency. It supports per-agent skill isolation, optional
+thread-scoped TOS mounts or automatic output mirroring on release, speculative
+`sandbox.prewarm`, opt-in idle pause/resume, thread-scoped snapshots with
+retention pruning, and asynchronous image precaching. Multi-worker gateways
+sharing one veFaaS sandbox application should enable `sandbox.ownership.type: redis`.
+See the [veFaaS documentation](https://docs.byteplus.com/en/docs/vefaas/what-is-vefaas)
+and [provider README](../../backend/packages/harness/deerflow/community/vefaas_sandbox/README.md)
+for setup and snapshot retention guidance.
+
The [sandbox benchmark](../../backend/scripts/benchmark/sandbox/README.md#opensandbox)
also supports OpenSandbox cold acquisition, warm reuse and concurrent scopes,
using the configured service connection and reporting unconfirmed cleanup as a
diff --git a/frontend/src/components/landing/sections/sandbox-section.tsx b/frontend/src/components/landing/sections/sandbox-section.tsx
index 1ced21d7df..bb450e1514 100644
--- a/frontend/src/components/landing/sections/sandbox-section.tsx
+++ b/frontend/src/components/landing/sections/sandbox-section.tsx
@@ -99,6 +99,19 @@ export function SandboxSection({ className }: { className?: string }) {
that combines Browser, Shell, File, MCP and VSCode Server in a
single Docker container.
+
+ For serverless cloud deployments without managing Docker or
+ Kubernetes, run the same AIO Sandbox on{" "}
+
+ BytePlus veFaaS Cloud Sandbox
+ {" "}
+ with prewarm, pause/resume, and thread snapshots.
+
{/* Feature Tags */}
diff --git a/frontend/src/content/en/application/configuration.mdx b/frontend/src/content/en/application/configuration.mdx
index 8f4f92a636..ae2a15e780 100644
--- a/frontend/src/content/en/application/configuration.mdx
+++ b/frontend/src/content/en/application/configuration.mdx
@@ -180,7 +180,7 @@ models:
Choose the execution environment for agent file and command operations:
-
+
```yaml
sandbox:
@@ -201,6 +201,24 @@ Install: `agent-sandbox` is already a core dependency of `deerflow-harness`, so
```yaml
+sandbox:
+ use: deerflow.community.vefaas_sandbox:VeFaaSSandboxProvider
+ vefaas:
+ region: ap-southeast-1
+ endpoint: https://vefaas.ap-southeast-1.byteplusapi.com
+ function_id: $BYTEPLUS_VEFAAS_SANDBOX_APP_ID
+ sandbox_base_url: $BYTEPLUS_VEFAAS_SANDBOX_BASE_URL
+ access_key_env: BYTEPLUS_ACCESS_KEY_ID
+ secret_key_env: BYTEPLUS_SECRET_ACCESS_KEY
+ replicas: 3
+ idle_timeout: 600
+```
+
+Serverless cloud sandboxes on [BytePlus veFaaS](https://www.byteplus.com/en/product/vefaas) with optional speculative prewarm, pause/resume, snapshots, image precaching, and TOS mounts. See the [Sandbox guide](/docs/harness/sandbox) for all options.
+
+
+
+```yaml
sandbox:
use: deerflow.community.aio_sandbox:AioSandboxProvider
provisioner_url: http://provisioner:8002
diff --git a/frontend/src/content/en/harness/sandbox.mdx b/frontend/src/content/en/harness/sandbox.mdx
index 070b836e69..5e8cb4612d 100644
--- a/frontend/src/content/en/harness/sandbox.mdx
+++ b/frontend/src/content/en/harness/sandbox.mdx
@@ -17,7 +17,7 @@ The sandbox gives the Lead Agent a controlled environment where it can read file
## Sandbox modes
-DeerFlow supports four sandbox modes. Choose the one that fits your deployment:
+DeerFlow supports five sandbox modes. Choose the one that fits your deployment:
### LocalSandbox (default)
@@ -118,6 +118,49 @@ Get an API key at [e2b.dev/dashboard](https://e2b.dev/dashboard) and either set
that read or write under `/mnt/user-data/...` continue to work transparently.
+### BytePlus veFaaS Cloud Sandbox
+
+Commands run in serverless [BytePlus Function Service (veFaaS)](https://www.byteplus.com/en/product/vefaas) cloud sandboxes running the `all-in-one-sandbox` image (see the [veFaaS documentation](https://docs.byteplus.com/en/docs/vefaas/what-is-vefaas)). DeerFlow manages the sandbox lifecycle over the veFaaS OpenAPI (`Version=2024-06-06`, SigV4) with no extra cloud SDK dependency and reuses the `AioSandbox` HTTP data plane.
+
+- **Best for**: serverless production deployments, multi-tenant cloud workloads, teams wanting fast cold-start mitigation (**speculative prewarm**, **image precaching**, **pause/resume**), and persistent workspaces via **thread-scoped snapshots** or optional **TOS object storage mounts**.
+- **Trade-off**: requires a BytePlus veFaaS Sandbox Application and SigV4 access keys. Multi-worker gateways sharing one veFaaS app require `ownership.type: redis`.
+
+```yaml
+sandbox:
+ use: deerflow.community.vefaas_sandbox:VeFaaSSandboxProvider
+ # Optional: overlap sandbox creation with the first model turn
+ # prewarm: true
+ vefaas:
+ region: ap-southeast-1
+ endpoint: https://vefaas.ap-southeast-1.byteplusapi.com
+ function_id: $BYTEPLUS_VEFAAS_SANDBOX_APP_ID
+ sandbox_base_url: $BYTEPLUS_VEFAAS_SANDBOX_BASE_URL
+ access_key_env: BYTEPLUS_ACCESS_KEY_ID
+ secret_key_env: BYTEPLUS_SECRET_ACCESS_KEY
+ cpu_milli: 1000
+ memory_mb: 2048
+ timeout_minutes: 60
+ # Optional fast-resume, snapshot & image precache settings:
+ # pause_on_idle: true
+ # snapshot_on_idle: true
+ # snapshot_retention_days: 7
+ # max_snapshots_per_sandbox: 3
+ # precache_images:
+ # - cr-ap-southeast-1.cr.bytepluses.com/namespace/all-in-one-sandbox:latest
+ # precache_on_startup: true
+ tos_mount:
+ enabled: false
+ bucket: $BYTEPLUS_TOS_BUCKET
+ prefix: deerflow-user-data
+ replicas: 3
+ idle_timeout: 600
+ # Required for multi-worker gateways sharing one veFaaS app:
+ # ownership:
+ # type: redis
+```
+
+No extra Python SDK is needed — the provider uses `httpx` and `agent-sandbox` directly. See `backend/packages/harness/deerflow/community/vefaas_sandbox/README.md` in the repository for the full option reference, snapshot retention guidance, and TOS mount details.
+
### Provisioner-managed Sandbox (Kubernetes)
Each sandbox gets a dedicated Pod in a Kubernetes cluster, managed by the provisioner service. This provides the strongest isolation and is recommended for production environments with multiple concurrent users.
diff --git a/frontend/src/content/zh/application/configuration.mdx b/frontend/src/content/zh/application/configuration.mdx
index 87b1e2b4db..b17e995415 100644
--- a/frontend/src/content/zh/application/configuration.mdx
+++ b/frontend/src/content/zh/application/configuration.mdx
@@ -180,6 +180,19 @@ sandbox:
use: deerflow.community.aio_sandbox:AioSandboxProvider
replicas: 3
idle_timeout: 600
+
+# BytePlus veFaaS 云端沙箱(Serverless,支持预热、暂停/唤醒、快照与 TOS 挂载)
+# sandbox:
+# use: deerflow.community.vefaas_sandbox:VeFaaSSandboxProvider
+# vefaas:
+# region: ap-southeast-1
+# endpoint: https://vefaas.ap-southeast-1.byteplusapi.com
+# function_id: $BYTEPLUS_VEFAAS_SANDBOX_APP_ID
+# sandbox_base_url: $BYTEPLUS_VEFAAS_SANDBOX_BASE_URL
+# access_key_env: BYTEPLUS_ACCESS_KEY_ID
+# secret_key_env: BYTEPLUS_SECRET_ACCESS_KEY
+# replicas: 3
+# idle_timeout: 600
```
### 工具
diff --git a/frontend/src/content/zh/harness/sandbox.mdx b/frontend/src/content/zh/harness/sandbox.mdx
index 0ea05fecbc..275ca53df3 100644
--- a/frontend/src/content/zh/harness/sandbox.mdx
+++ b/frontend/src/content/zh/harness/sandbox.mdx
@@ -16,7 +16,7 @@ import { Callout, Tabs } from "nextra/components";
## 沙箱模式
-DeerFlow 支持四种沙箱模式,选择适合你部署的一种:
+DeerFlow 支持五种沙箱模式,选择适合你部署的一种:
### LocalSandbox(默认)
@@ -109,6 +109,49 @@ sandbox:
原本读写 `/mnt/user-data/...` 的工具无需任何改动即可正常工作。
+### BytePlus veFaaS 云端沙箱
+
+命令在 [BytePlus 函数服务(veFaaS)](https://www.byteplus.com/en/product/vefaas) Serverless 云端沙箱中运行,使用 `all-in-one-sandbox` 镜像(参见 [veFaaS 文档](https://docs.byteplus.com/en/docs/vefaas/what-is-vefaas))。DeerFlow 直接基于 `httpx` 通过 veFaaS OpenAPI(`Version=2024-06-06`,SigV4 签名)管理控制面,无需额外安装云厂商 SDK,数据面复用 `AioSandbox` 客户端。
+
+- **适合**:Serverless 生产部署、多租户云端工作负载、希望降低冷启动耗时(支持**推测预热 `prewarm`**、**镜像预热 `precache_images`**、**空闲暂停/自动唤醒 `pause_on_idle`**),以及需要通过**线程级快照 `snapshot_on_idle`** 或 **TOS 对象存储挂载**持久化工作区的团队。
+- **取舍**:需要准备 BytePlus veFaaS 沙箱应用与 SigV4 访问密钥;多 Worker Gateway 共享同一个 veFaaS 应用时必须启用 `ownership.type: redis`。
+
+```yaml
+sandbox:
+ use: deerflow.community.vefaas_sandbox:VeFaaSSandboxProvider
+ # 可选:在首轮模型推理期间并行预热沙箱
+ # prewarm: true
+ vefaas:
+ region: ap-southeast-1
+ endpoint: https://vefaas.ap-southeast-1.byteplusapi.com
+ function_id: $BYTEPLUS_VEFAAS_SANDBOX_APP_ID
+ sandbox_base_url: $BYTEPLUS_VEFAAS_SANDBOX_BASE_URL
+ access_key_env: BYTEPLUS_ACCESS_KEY_ID
+ secret_key_env: BYTEPLUS_SECRET_ACCESS_KEY
+ cpu_milli: 1000
+ memory_mb: 2048
+ timeout_minutes: 60
+ # 可选:快速唤醒、快照与镜像预热配置
+ # pause_on_idle: true
+ # snapshot_on_idle: true
+ # snapshot_retention_days: 7
+ # max_snapshots_per_sandbox: 3
+ # precache_images:
+ # - cr-ap-southeast-1.cr.bytepluses.com/namespace/all-in-one-sandbox:latest
+ # precache_on_startup: true
+ tos_mount:
+ enabled: false
+ bucket: $BYTEPLUS_TOS_BUCKET
+ prefix: deerflow-user-data
+ replicas: 3
+ idle_timeout: 600
+ # 多 Worker Gateway 共享同一 veFaaS 应用时必填:
+ # ownership:
+ # type: redis
+```
+
+无需安装额外 Python SDK。完整参数说明、快照保留策略与 TOS 挂载细节见仓库中的 `backend/packages/harness/deerflow/community/vefaas_sandbox/README.md`。
+
### Provisioner 管理的沙箱(Kubernetes)
每个沙箱在 Kubernetes 集群中获得一个专用 Pod,由 Provisioner 服务管理。这提供最强的隔离性,适合有多个并发用户的生产环境。