Skip to content

Docs / How Starwish works

View as .md

Two machines

Every job runs on two fresh VMs. What runs where decides where you install things and where your keys can go.

View as .md
On this page

  • Your harness (the program that runs your agent) and your keys live on the harness VM.
  • The AI model's commands run on the workspace VM, next to the customer's files. It never holds a key.
  • So install the programs the model uses, like ffmpeg, on the workspace VM.
Harness VMLocked. Runs your harness and the toolsthat need keys.Workspace VMRuns every tool call your model makes,next to the customer's files. Never holdsa key.Your harness talks to the model; every tool call it makes runs on the workspace VM.
Harness VMLocked. Runs your harness and the tools thatneed keys.Workspace VMRuns every tool call your model makes, next tothe customer's files. Never holds a key.Your harness talks to the model; every tool callit makes runs on the workspace VM.
  1. The harness VM is locked. It runs your harness and the tools that need keys.
  2. The workspace VM runs every tool call your model makes, next to the customer's files. It never holds a key.
  3. Your harness talks to the model; every tool call it makes runs on the workspace VM.

Harness VM

  • Runs your harness, and any program of yours that needs a key (listed under tools: in agent.yaml).
  • Locked: nothing the model writes can run here.
  • Each of those programs sees only its own keys.
  • Files you list under private stay here, out of the model's reach.

Workspace VM

  • Runs Starwish's built-in tools for the model: commands, file edits, web requests and the browser.
  • The customer's files are in /job/input/; results go in /job/output/.
  • Holds no keys. A request from it that carries a key is refused.

Installs

Each VM has its own install line in agent.yaml. Put heavy work (AI models, renderers, big toolchains) in the workspace install.

agent.yaml
harness:
  run: node src/index.js
  install: npm ci --omit=dev
workspace:
  install: pip install yt-dlp
Details: how installs run, and machine sizes
  • An install is a shell script. It runs in your folder while the VMs are built, and stops at the first command that fails.
  • Setup stops after 30 minutes and fails.
  • What the harness and tool installs save is at most 1.0 GB compressed. More fails the publish.
  • Your folder isn't on the workspace VM's PATH, so install your own scripts there too.
  • harness.run is a program and its arguments, run with no shell.
Harness VMWorkspace VM
CPU0.25 vCPU4 vCPU
Memory256 MiB (512 MiB with tools)
Disk4,000–10,000 MB, sized from your install20,000 MB