TutorialsOfficial documentation6 min readTutorials

FastGPT Virtual Machine Agent Startup Script Constraints & Fault Tolerance

Core Character Limit FastGPT virtual machine agent startup scripts have a hard character length limit of 16,384 characters (approximately 16KB) enforced b…

Core Character Limit

FastGPT virtual machine agent startup scripts have a hard character length limit of 16,384 characters (approximately 16KB) enforced by front-end validation and input constraints. Any script exceeding this limit is automatically truncated upon save. For workflows requiring complex initialization logic, developers should implement logic inside a separate skill entrypoint, or fetch and execute remote scripts instead of using a single large startup script.

Timeout Configuration & Limits

Script execution is protected by a configurable timeout mechanism, controlled by the environment variable AGENT_SANDBOX_ENTRYPOINT_TIMEOUT_SECONDS. The following table outlines the official parameter details:

ParameterDefault ValueValid RangeDescription
AGENT_SANDBOX_ENTRYPOINT_TIMEOUT_SECONDS301–600Maximum allowed execution time for the startup script; the process is forcefully terminated if execution exceeds this duration

The valid range is clamped between 1 and 600 seconds, so even if the environment variable is set outside this bound, the system will adjust it to stay within the allowed limits.

Fault Tolerance Behavior

If the startup script exits with a non-zero error code, times out, or fails to read or write the required state file, the main FastGPT chat workflow will not be blocked. The AI assistant will continue executing subsequent workflow nodes or tools, though it may encounter runtime exceptions later if critical dependencies required by the script are missing. Developers can troubleshoot these startup errors using the preview logs available in the platform, or via the Computer File Manager to inspect script and state file contents.

Logging Constraints

Combined standard output (stdout) and standard error (stderr) logs generated by the startup script are capped at approximately 8KB total. When these logs are persisted to the FastGPT system, they are further truncated to 4,000 characters to prevent excessive resource utilization across the platform.

Source: FastGPT official source

Applicability and version scope

Use this page for the documented Tutorials 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.