Documentation Index
Fetch the complete documentation index at: https://smithers.sh/llms.txt
Use this file to discover all available pages before exploring further.
<Sandbox> is a task boundary for work that should execute outside the parent task process. The public component is provider-first: pass an injectable provider object or a registered provider id. runtime remains only for the built-in legacy local transports.
Basic usage
Execution model
- Smithers renders
<Sandbox>as one scheduler task. Children do not become parent-run tasks. - At execution time Smithers writes a request bundle under
.smithers/sandboxes/<run>/<sandbox>/request-bundle. - A provider receives the request, runs work remotely, and returns either a local bundle path or a structured result.
- Smithers validates the result bundle, records sandbox lifecycle events, enforces diff review policy, applies accepted
diffBundles, and returnsoutputsto the parent task output table.
Result bundles
A provider can return a path to a bundle it created:Diff review
reviewDiffs defaults to true. If the sandbox returns patch files or a diffBundle, Smithers records SandboxDiffReviewRequested.
When autoAcceptDiffs is false, changed bundles fail closed until a review path accepts them. When autoAcceptDiffs is true, or reviewDiffs is false, Smithers applies diffBundle through the engine diff-bundle applier. Legacy patch files are still collected and review-gated, but the apply path is diffBundle.
Nested sandboxes
Nested sandbox execution is disabled by default. A sandbox running inside another sandbox must setallowNested.
Use nesting only when the provider and diff policy are designed for it. The hard cases are:
- Diff base conflicts: an inner sandbox can generate a
diffBundleagainst a different base than the outer sandbox. - Cleanup ordering: an outer provider cleanup can delete the workspace before the inner provider finishes.
- Quotas and concurrency: nested remote VMs can multiply resource usage quickly.
- Network and secrets: inherited remote credentials may be broader than intended.
- Event lineage: parent run, outer sandbox run, and inner sandbox run need clear ids for debugging.
Parallel or MergeQueue instead of nesting.
Built-in local transports
Whenprovider is omitted, Smithers uses the legacy local transport path. runtime may be "bubblewrap", "docker", or "codeplane". If runtime is omitted, the local path defaults to "bubblewrap".
Unknown runtimes now fail closed. Docker is not silently replaced by bubblewrap when Docker is unavailable.
Freestyle provider example
Freestyle VMs are extremely powerful sandboxes with nested virtualization, full networking, and the ability to scale to more resources than alternatives. Use Freestyle VMs when you want to give your agents a real computer, not a code runner. Seeexamples/freestyle/ for a provider adapter that creates a Freestyle VM, ships a request with additionalFiles, executes a command with vm.exec(), reads smithers-result.json, and returns a Smithers sandbox result.
Freestyle’s current VM docs show the stable package as freestyle, VM creation through freestyle.vms.create(), support for additionalFiles, gitRepos, workdir, idleTimeoutSeconds, and command execution with vm.exec(). Relevant Freestyle docs: