docs(vefaas-sandbox): surface BytePlus veFaaS cloud sandbox across docs, env template, and landing page (#8702)

This commit is contained in:
Kevin Hsiao 2026-11-27 09:04:41 +08:00 committed by GitHub
parent e45da192fe
commit a92a87b964
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 158 additions and 4 deletions

View File

@ -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

View File

@ -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`。

View File

@ -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",

View File

@ -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: <SandboxId>`) or a `{sandbox_id}` URL template.

View File

@ -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

View File

@ -99,6 +99,19 @@ export function SandboxSection({ className }: { className?: string }) {
that combines Browser, Shell, File, MCP and VSCode Server in a
single Docker container.
</p>
<p>
For serverless cloud deployments without managing Docker or
Kubernetes, run the same AIO Sandbox on{" "}
<a
href="https://www.byteplus.com/en/product/vefaas"
className="underline"
target="_blank"
rel="noopener noreferrer"
>
BytePlus veFaaS Cloud Sandbox
</a>{" "}
with prewarm, pause/resume, and thread snapshots.
</p>
</div>
{/* Feature Tags */}

View File

@ -180,7 +180,7 @@ models:
Choose the execution environment for agent file and command operations:
<Tabs items={["Local (default)", "Docker container", "K8s Provisioner"]}>
<Tabs items={["Local (default)", "Docker container", "BytePlus veFaaS", "K8s Provisioner"]}>
<Tabs.Tab>
```yaml
sandbox:
@ -201,6 +201,24 @@ Install: `agent-sandbox` is already a core dependency of `deerflow-harness`, so
</Tabs.Tab>
<Tabs.Tab>
```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.
</Tabs.Tab>
<Tabs.Tab>
```yaml
sandbox:
use: deerflow.community.aio_sandbox:AioSandboxProvider
provisioner_url: http://provisioner:8002

View File

@ -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.
</Callout>
### 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.

View File

@ -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
```
### 工具

View File

@ -16,7 +16,7 @@ import { Callout, Tabs } from "nextra/components";
## 沙箱模式
DeerFlow 支持四种沙箱模式,选择适合你部署的一种:
DeerFlow 支持五种沙箱模式,选择适合你部署的一种:
### LocalSandbox(默认)
@ -109,6 +109,49 @@ sandbox:
原本读写 `/mnt/user-data/...` 的工具无需任何改动即可正常工作。
</Callout>
### 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 服务管理。这提供最强的隔离性,适合有多个并发用户的生产环境。