Sign in

Run the pi coding agent in the cloud

Updated

Run pi on a cloud box that stays on: sign in with a subscription or a provider key on the box, why a box suits an agent with no approval prompts, sessions you can pick back up, headless runs, and what it costs.

On this page6

pi is a minimal terminal coding agent: a few tools, any model provider, and no approval prompts, so every command it decides to run, runs with your account's permissions (pi's security notes). That makes a box a natural home for it: a Linux machine of its own that stays on, where pi keeps working with your laptop closed and its edits sync back to your project.

1. Start pi on a box

No box yet? Sign up and run the install command the tour shows; the box starts on $30 of free credit (Quickstart). Sync your project to it, with --no-start so setup starts no other agent there:

cd ~/code/myproject
prized setup --sync --no-start

Then start pi in a session on the box:

prized agents run pi --attach --dir code/myproject

The first run installs pi from a pinned release, checked against its SHA-256, with pi's own update check off. If you installed pi on the box yourself, that copy runs instead.

2. Sign in on the box

pi has no models until it has a provider, and your laptop's pi sign-in stays on your laptop. On the box:

  • /login in pi. Pick an account (a subscription) or an API key, then the provider, and follow its prompt. The browser that finishes an account sign-in is on your laptop, not the box, so pi asks you to paste back the code or the address the browser lands on (pi's providers). pi keeps the sign-in in ~/.pi/agent/auth.json on the box.
  • A key in the environment. pi reads provider keys such as ANTHROPIC_API_KEY or OPENROUTER_API_KEY at startup. Store one as a Secret and the box holds only a placeholder for it (Keys for other agents); restart pi with prized agents run pi to pick it up.

Then /model in pi picks the model, and pi --list-models in a shell lists what your providers offer.

3. No approval prompts: what that means on a box

pi never asks before it runs a command or edits a file. On your laptop that reaches everything your account can; on a box it reaches the box: your synced project, the box's disk, and any credentials you put there. Keep keys you don't want it to use off the box, and review its edits as they sync, before you commit them.

For a run that should only edit files, prized prompt without --auto leaves pi's bash tool out (below).

4. Close the lid, and pick the session back up

Give pi its task and close the laptop: the pi session belongs to the box, and its edits reach your laptop when it wakes (Sync).

  • From a terminal: prized ssh -s pi. If the session is gone, prized agents run pi --attach --dir code/myproject starts pi again; pi -c there continues the last conversation in that folder, and pi -r picks an older one (pi's sessions).
  • From your phone: open the box on the dashboard and pick pi from the arrow beside Open terminal.

On the free credit an idle box sleeps after 2 hours. pi printing in its session counts as use, and prized box auto-pause BOX off keeps the box up through a quiet stretch of up to 12 hours, and with no limit on a plan or after a top-up (Auto-pause).

Hand it a task without a terminal

prized prompt --provider pi --cwd code/myproject --auto --detach "run the test suite and fix what fails"

This runs pi headless on the box and returns at once; prized events --follow follows it. Without --auto it gets read, edit, write, grep, find and ls but no bash, so it edits files without running commands; --auto adds bash. --model openrouter/… and the like pick a backend, and --effort sets pi's thinking level (Prompt an agent remotely).

What it costs

pi itself is free and open source; your provider bills your subscription or key, as on your laptop. Prized bills the box: a Small (4 vCPU, 16 GB) is $0.137 an hour awake, $1.37 for a 10 hour run overnight, and only its disk while it sleeps (Billing).