Deployment and upgradesOfficial documentation7 min readDeployment and upgrades

Configure FastGPT Sandbox Resource and Lifecycle Settings

Purpose of Sandbox Configuration Settings For self-hosted FastGPT deployments, controlled sandbox resource allocation and automated lifecycle management a…

Purpose of Sandbox Configuration Settings

For self-hosted FastGPT deployments, controlled sandbox resource allocation and automated lifecycle management are critical to balancing functional availability and host system efficiency. These environment variables define computational resource limits for individual agent sandboxes, maximum allowable WebSocket message and frame sizes for platform-sandbox communications, and rules for automatically suspending and archiving inactive sandbox instances.

Configuration Parameter Reference

VariableDefaultDescription
AGENT_SANDBOX_CPU_COUNT1Maximum CPU count for each Agent Sandbox.
AGENT_SANDBOX_MEMORY_MIB2048Maximum memory for each Agent Sandbox, in MiB.
AGENT_SANDBOX_STORAGE_SIZE_GI1Sandbox storage capacity, in Gi.
AGENT_SANDBOX_WS_MAX_MESSAGE_BYTES67108864Maximum IDE Agent WebSocket message size.
AGENT_SANDBOX_WS_MAX_FRAME_BYTES16777216Maximum IDE Agent WebSocket frame size.
AGENT_SANDBOX_SUSPEND_MINUTES60Inactive minutes before a running sandbox is suspended.
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS7Inactive days before a suspended sandbox is archived.

Automated Lifecycle Management

The sandbox lifecycle follows a two-stage automated cleanup process. First, any running sandbox that remains inactive for the duration specified by AGENT_SANDBOX_SUSPEND_MINUTES is suspended to halt its resource consumption while preserving its state. After a sandbox has been suspended and remains inactive for the number of days defined in AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS, the system archives the sandbox permanently to reclaim storage and cluster resources. The WebSocket configuration parameters control the maximum allowable sizes for individual messages and frames passed between the FastGPT platform and connected sandboxes, preventing oversized data transfers from disrupting sandbox communications.

Source: FastGPT official source

Applicability and version scope

Use this page for the documented Deployment and upgrades scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.

Safety guardrails

Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.

Rollback guidance

Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.