Set up a sandbox
A sandbox is the safe space where your agent reads files and runs commands.
A sandbox is the workspace your agent uses when it reads files, writes files, or runs commands. It keeps the agent's actions in one place so nothing unexpected happens on your computer.
The two kinds
There are two kinds of sandbox:
virtual (safe, default)
A pretend filesystem that lives in memory. Nothing touches your real computer. Best for most cases.
local (real access)
The real files and terminal on your computer. Powerful, but only use it when you trust the input.
Make a sandbox
sandbox workspace
description: A safe in-memory space for notes and commands.
type: virtual
cwd: /workspaceThen point an agent at it:
agent age
sandbox: workspaceWhat a sandbox needs
| Setting | What it does |
|---|---|
description | A short note about the sandbox. |
type | virtual (safe, in memory) or local (your real computer). |
cwd | The folder the agent starts in. |
env | Extra settings passed to commands, if any. |
sandbox workspace
type: virtual
cwd: /workspace
env:
GREETING: helloUsing the real computer
The local type lets the agent touch your real files and run real commands.
Because that is powerful, NT keeps it off by default. To turn it on, set
NT_ALLOW_LOCAL=1 when you run:
NT_ALLOW_LOCAL=1 nt run builderOnly use local with trusted input
A local sandbox runs whatever commands the model decides to run, on your real computer. Only use
it when you trust what is going in. When in doubt, stick with virtual.