Skip to main content
sandbox gives an Agent an isolated place to run code, and agent.executeCode() runs a one-shot snippet there.

Quick Start

1

Give the agent a sandbox

sandbox: true selects the built-in subprocess sandbox.
2

Name a place per call


SandboxConfig

Pass true, a sandbox type string, or a config object.

executeCode(code, options?)

ExecuteCodeOptions: The method returns a SandboxResult:
The static scan is best-effort pattern matching for the operator’s awareness. The sandbox is what actually isolates — a warning does not stop execution.

When it throws

executeCode() with an unknown runIn type throws the same “no runner registered” error.

Registering a remote runner

docker, e2b and friends are provider integrations a host supplies:

Agent

executeCode & options

Placement

Where tools run