NuFiDocs
NuFi Team boxWorks on the box

Works on the box

NuFi Works puts a coding-agent workspace on the box — on Linux, or on a Mac in a Linux VM — with every run landing in a gVisor sandbox behind an egress proxy with one exit.

install-box.sh --with-works adds NuFi Works to the box at https://<box>:3003. It is reached by name, not by IP: Works' private-hostname guard accepts only its own name and loopback, and the console handoff is what carries an authenticated sign-in there, so it is entered the same way Studio is — from the Agents page. A cold visit to the address still works; it just lands on Works' own login page, with a button to sign in through NuFi rather than an already-authenticated session.

What a run is

Every agent run on Works lands inside a gVisor sandbox: a container under the runsc runtime, on the works-sandbox network, with exactly one way out — the same works-egress proxy the rest of this section describes. It allows the model gateway and refuses everything else with a 403.

Installing

./install-box.sh --with-works

Ubuntu only — or a Mac running a Linux VM, see On a Mac. The installer refuses outright on macOS directly, where Docker Desktop cannot host runsc. When Works is there, the closing banner names it:

Works:       https://<box>:3003  → enter it from the Agents page as <admin>.
             Every agent run lands in a gVisor sandbox with no network
             except the box gateway (README "NuFi Works on the box").

On a Mac

Works runs agent code in gVisor sandboxes, and gVisor is Linux-only — neither Docker Desktop nor OrbStack can host it, so --with-works refuses on macOS directly. The way to run Works on a Mac is to run the whole box inside a Linux VM: it installs gVisor exactly like any Ubuntu box and keeps the full sandbox isolation, and the Mac reaches it over the VM's network. This is the recommended setup and a one-time, roughly ten-minute step.

A box without Works — chat, your documents and the department agents — installs on macOS directly, no VM. The VM is only for Works.

The repo ships a Lima recipe sized for the box plus Works:

brew install lima
limactl start --name nufi-works deploy/box/mac/works-vm.yaml
limactl shell nufi-works
# inside the VM, get the box (git clone — see Installing), then:
./install-box.sh --with-works --emulate-amd64
# add --claude-subscription --claude-token <token> for Claude on your subscription

Everything on the Installing page is the same inside that VM — you are on a normal Ubuntu machine there. Two Mac-only details: --emulate-amd64 covers the one amd64-only image, the Works server, and the recipe turns on Rosetta so it runs reliably on Apple Silicon (plain QEMU user emulation segfaults the emulated Node servers). The sandbox itself has a native arm64 build and runs under gVisor without emulation. The box also joins the mesh from the VM with its own container, so reaching it from home needs no native Tailscale app on the Mac — unlike a box installed on macOS directly.

First sign-in

The install already did the paperwork: nufi-box works install signs in as the box admin and claims the instance, so that account lands as instance admin and owner of the box's company, with the sandbox environment already registered and made the default. The first person into Works has to be the box admin, from the Agents page — nobody else is registered yet. Everyone after that is invited from inside Works itself.

WORKS_BOX_KEY in .env is the box admin's own Works API key (instance admin), kept at file mode 0600 beside the other secrets. The LiteLLM virtual key minted for a sandbox (WORKS_MODEL_KEY) carries no budget of its own — the box's usage limits apply through the gateway's own policy.

Reaching past the gateway

A sandbox can otherwise reach only Works itself and the model gateway. Anything else a run needs — a package index, say — has to be named in .env:

WORKS_EGRESS_ALLOW=pypi.org,files.pythonhosted.org

Bare hostnames, comma-separated. Everything not on the list gets a 403, logged by hostname.

Claude on your subscription

By default the Claude harness runs on the box's own gateway. To run it on your Claude Pro/Max subscription instead — so every member gets Claude through Works with no setup of their own — enable it at install:

claude setup-token        # on a machine signed in to your subscription; prints a token
./install-box.sh --with-works --claude-subscription --claude-token <token>

The owner authenticates once; the token is forwarded into each sandbox and Claude talks straight to api.anthropic.com, which is opened on the sandbox egress allow list for this. It is opt-in — a plain box keeps Claude on the gateway and the sandbox sealed — and --no-claude-subscription turns it back off. The token lives at mode 0600 in .env; it can also come from the environment (export CLAUDE_CODE_OAUTH_TOKEN=…).

It also pre-hires a Claude agent in Works. The box otherwise ships only the nufi_agent routines, and a task with no responsible agent starts no run — so on a subscription box a member assigns the ready-made Claude agent to a task and runs Claude straight away, without hiring one first.

Checking it

./nufi-box doctor          # runtime, socket group, server, registration
./nufi-box works status    # asks Works itself whether the registration holds

Run nufi-box works install again after an upgrade, or if the registration ever drifts — it is written to converge, not to fail on a second run.

Honest limits

  • The Works server is amd64-only. On an x86 Ubuntu box it runs natively; on Arm (a Mac VM, or Ubuntu on Arm) it runs under emulation — --emulate-amd64, and Rosetta on Apple Silicon. The sandbox itself has a native arm64 build, so agent code runs under gVisor without emulation.
  • The first sign-in has to be the box admin, from the Agents page. The install registered that one account as instance admin and company owner; everyone else waits to be invited from inside Works.
  • A NuFi knowledge agent's gateway is per-agent config, not a box default. Point its gatewayUrl at http://litellm-proxy:4000/v1 and give it a model the box actually serves.
  • The smallest box models cannot drive a coding harness. Hiring codex, claude or opencode as a Works agent wants real tool-calling; the box's smallest model does not have it.
  • Hiring a coding agent is meant to work as in the cloud. codex, claude and opencode are installed and the sandbox is wired up; Claude on a subscription has answered from a sandbox on a live box, but driving a full task from the Works UI as a member is newer and less exercised.
  • From home, Works stays on the office network. The box answers to a second, from-home name once it is on the mesh, and chat and the drives work through it — but Works does not. Its private-hostname guard accepts only the box's LAN name, and its sign-in is built from that name, so a laptop reaching the box by the mesh name is turned away, and even past that would be bounced to an address it cannot resolve off the LAN. Letting Works answer to both names is a larger change (it is per-request host handling the sign-in does not do yet); for now, use Works on an office-network visit.