This document covers environment variable updates required for self-hosted FastGPT 4.16.0, specifically changes to Agent Sandbox configurations. All variable modifications must be applied to both fastgpt-app and fastgpt-pro deployment environments.
Mandatory New Environment Variables
Two new required environment variables must be added to your FastGPT configuration:
# HTTP(S) URL used by browsers to preview Sandbox files. Use the URL configured in step 1.
AGENT_SANDBOX_PREVIEW_PROXY_URL=https://sandbox-proxy.example.com
# Required for OpenSandbox. Sets the full storage name prefix (previously configured on the volume image).
VM_VOLUME_NAME_PREFIX=fastgpt-sessionSet AGENT_SANDBOX_PREVIEW_PROXY_URL to the public URL established during your initial sandbox setup, and VM_VOLUME_NAME_PREFIX to match the storage name prefix configured for your OpenSandbox volume image.
Deprecated and Removed Configuration
The following changes apply to legacy sandbox configurations:
AGENT_SANDBOX_DISK_MBand all E2B-related environment variables are deprecated and should be removed from your configuration.- The E2B Sandbox Provider has been fully removed. Any environments previously configured for E2B must switch to either
opensandboxorsealosdevbox, and theAGENT_SANDBOX_E2B_API_KEYvariable must be deleted entirely. - Preview protocols for
fastgpt-agent-sandbox-proxyandfastgpt-agent-sandboxhave been updated. Mixing old and new service versions is not supported; all related FastGPT images must use the 4.16.0 release.
Optional Sandbox Tuning Parameters
You can configure optional environment variables to adjust Agent Sandbox resource limits and automatic lifecycle policies. The following table lists all available optional parameters, their default values, and descriptions:
| Variable | Default | Description |
|---|---|---|
AGENT_SANDBOX_CPU_COUNT | 1 | Maximum CPU cores per Agent Sandbox instance. |
AGENT_SANDBOX_MEMORY_MIB | 2048 | Memory limit per Agent Sandbox instance, in MiB. |
AGENT_SANDBOX_STORAGE_SIZE_GI | 1 | Agent Sandbox storage capacity, in Gi. Used as the Sealos Devbox storage limit and to create new PVCs in OpenSandbox Kubernetes mode. |
AGENT_SANDBOX_SUSPEND_MINUTES | 60 | Number of minutes an active Sandbox can remain idle before it is automatically suspended. |
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS | 7 | Number of days a suspended Sandbox can remain inactive before it is automatically archived. |