Feature in Beta
container) gets its own sandbox, created on demand by the bundled OpenSandbox service on the same Kubernetes cluster.
Users see it in the Workspace when they work with Skills or generate files. Developers can use it through the API; see Code Execution tool.
Code execution is enabled by default in standard Zylon 1.58 deployments. Operators can control its availability in Workspace chat with the setting below.
Configuration
Example
When disabled
After settingfeatures.codeExecution.enabled: false, run sudo zylon-cli sync to apply the change. Workspace chat removes code-execution tools before sending requests to the model, including when a Skill would otherwise add them. Ordinary chat and other available tools continue to work; Skill steps that require running code cannot execute through that chat flow.
How it works
- One sandbox per thread. Each sandbox is a pod in the
opensandbox-runtimesnamespace, created when the assistant first runs code in a thread and shut down aftersessionTTLSecondsof inactivity. - Persistent files. Uploads, outputs, and workspace files are stored in the
sessionsbucket of the platform object storage, so they survive sandbox restarts and platform upgrades. - Pre-pulled images. The sandbox images are pulled during installation and upgrade, so no registry access is needed when a sandbox starts. This also works in airgapped installations.
Network access
Sandboxes have no internet access. By default, a code execution sandbox can only reach:- DNS.
- The Zylon API, so code in the sandbox can call the model with the permissions of the user who sent the request.
external.opensandbox.codeExecution.internal.services. Each entry is a Kubernetes NetworkPolicy peer:
Resources
By default, sandboxes don’t have CPU or memory limits. To cap the total resources sandboxes can use, enable the quota and limit range for the sandbox namespace:Sandbox images
The image includes Python 3 with common data libraries (pandas, numpy, matplotlib, openpyxl, python-docx, pypdf, and others) and command-line tools such as
unzip, rg, and sqlite3.
Troubleshooting
Check the sandboxes that are running:features.codeExecution.enabled and run sudo zylon-cli sync after changing it.
The error code_execution provider is not configured. means the GPT code-execution provider is missing. Check the GPT provider configuration and OpenSandbox service; this error is not the expected result of disabling the Workspace flag alone.