How-To Guides

Set up a sandbox

A sandbox is the safe space where your agent reads files and runs commands.

Set up a sandbox

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

sandboxes.nt
sandbox workspace
  description: A safe in-memory space for notes and commands.
  type: virtual
  cwd: /workspace

Then point an agent at it:

agent age
  sandbox: workspace

What a sandbox needs

SettingWhat it does
descriptionA short note about the sandbox.
typevirtual (safe, in memory) or local (your real computer).
cwdThe folder the agent starts in.
envExtra settings passed to commands, if any.
sandbox workspace
  type: virtual
  cwd: /workspace
  env:
    GREETING: hello

Using 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 builder

Only 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.

Next