Features ยท New

Secure code execution

An agent can run code โ€” crunch a spreadsheet, draw a chart, build a PDF, transform a file โ€” and every run happens in a sandbox that exists for that run alone: it starts empty, has no network, holds no credentials, runs as nobody, and is gone the moment the script ends. The files it writes come back into the thread as downloadable artifacts. In production each run is its own hardened Kubernetes pod, optionally its own lightweight VM.

Three rules the sandbox never breaks No network โ€” a script cannot reach the internet, the cluster or your data stores; it works only on what the run handed it. Nothing persists โ€” the workload is deleted after every run, scratch space lives in memory, and no two runs ever share one. No identity โ€” a sandbox carries no token, no key, no credential; even a hostile script has nothing to steal.

What a person sees

Ask for something that needs computation, and the agent writes and runs a script:

Simulate 12 months of a subscription business at 6% growth and 2% churn.
Write the table to customers.csv and a chart to customers.png, then summarise.

The Activity row shows code_execution ran; the files the script wrote to its output directory arrive as links in the answer and in the thread's Artifacts tab. The script itself, its output and its timing are on the run's trace in Observe, like any other tool call.

A chat thread: the user asks for a 12-month subscription simulation written to customers.csv and customers.png; an Activity row shows code_execution done; the answer links both files and summarises a 60.1% increase to about 1,601 customers.
The Assistant answers a data question by running a script: the sandbox produced customers.csv and customers.png, and the answer links them.

What runs there

Entry pointWho uses itWhat it does
code_executionAny agent that declares the tool โ€” the built-in Assistant and Deep Research doRuns a Python or Node script the model wrote, with the run's earlier artifacts staged as inputs. Files written to /out come back.
run_skill_scriptAgents with a skill attachedRuns one of the skill's declared entrypoints with arguments โ€” five of the six shipped skill bundles (chart builder, CSV cleaner, data profiler, calendar scheduler, PDF report) are scripts.
The skill test benchBuilders, in the Playground and on a skill's pageRuns an entrypoint through the same sandbox before the skill is proposed for promotion.

The sandbox image ships with Python 3.12 and Node 20, plus the libraries a data task needs โ€” numpy, pandas, matplotlib, pillow, reportlab, fpdf2, pypdf โ€” and no package managers: pip, npm and apt are removed, so nothing can be installed at run time even if a script somehow found a network.

How a run is isolated

Two drivers behind one interface. Development uses a child container over the Docker socket; staging and production use one Kubernetes pod per run, created through the API server and deleted afterwards. Nothing above the driver knows which one ran.

ControlIn production (one pod per run)
IdentityNon-root user, no service-account token, no service links โ€” the pod cannot talk to the cluster it runs in.
FilesystemRead-only root; /work, /out and /tmp are memory-backed scratch with a size cap, wiped with the pod.
PrivilegesEvery Linux capability dropped, no privilege escalation, the runtime's default seccomp profile.
NetworkA deny-all network policy on every sandbox pod: no ingress, no egress, not even DNS.
RuntimeA hardened runtime class on the pod itself โ€” gVisor, or Kata VM isolation so each run is its own lightweight virtual machine โ€” on a tainted node pool that runs nothing else.
Time and sizeA wall clock that kills the run, a pod deadline as backstop, CPU and memory limits, a per-person concurrency cap.
LifetimeCreated for the run, deleted after it. Never reused, never shared.

The image is built with every deploy and pinned by digest, so what runs in the sandbox is exactly what was built and reviewed.

What you control

Where it shows up

Honest limits

Turning it on

One value in the Helm chart selects the driver; the deploy pipeline builds the image and pins its digest; the chart adds the role the platform needs, the network policy, and the environment the driver reads. The Deployment page has the shape of the cluster; the operations runbook has the checklist for the sandbox node pool and the smoke test that proves a cluster is ready.