Run the Pi coding agent on a remote server
An agent that doesn't ask first, on a computer that can take it.
Shelley handles the setup. About 2 minutes.
Prefer a terminal?
curl -fsSL https://exe-staging.dev/deploy/pi/prompt.txt | ssh exe.dev new --prompt=/dev/stdinPi is a small, open-source coding agent from Earendil that you shape to fit your work with extensions, skills and prompt templates. exeuntu, exe.dev's default VM image, ships it ready to go: Pi finds the models of exe.dev's LLM integration on its own, so there's no API key to paste, and model usage is billed to your exe.dev account.
Pi doesn't stop to ask before it runs a command or edits a file. That's why it belongs on a computer of its own, where it can build, run and break things that aren't on your laptop.
Note
Building an agent of your own that runs for days and survives a crash? That's Pi Durable, a library from the same team. This page is about the Pi coding agent.
What you get#
- Pi answering through exe.dev's LLM integration, with no API key or sign-in
- A Git repository at
~/projecton persistent disk - A
pitmux session that survives disconnects
What's running, and where
ssh my-pi.exe.xyz
your terminal
Deploy with Shelley#
Click Deploy and Shelley will set up Pi on a new VM, then check that it works. No config-file wrangling required.
Prefer a terminal?
curl -fsSL \
https://exe-staging.dev/deploy/pi/prompt.txt \
| ssh exe.dev new --prompt=/dev/stdinWhat Shelley is told
Set up Pi on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/pi.md from top to bottom.
The recipe's example VM name is my-pi. This VM's name is the output of `hostname`: use it wherever the recipe writes my-pi. Skip the step that creates the VM; you are on it.
You are done when all of these are true. Check each one yourself:
- Pi answering through exe.dev's LLM integration, with no API key or sign-in
- A Git repository at `~/project` on persistent disk
- A `pi` tmux session that survives disconnects
Use the preinstalled Pi; do not install another copy. If `pi --version`
is older than 1.4.0, run `exeuntu update pi` (without sudo). Run the
VM-side setup in "Start coding". Create tmux detached
(`tmux new -d -s pi -c ~/project`) rather than attaching. Reuse the
session if it already exists, and don't add the tmux setting twice. Do
not launch interactive Pi; leave its first-run question to the owner. Do
not change `~/.pi/agent/auth.json`, `settings.json` or the `exe-dev`
extension. Verify from ~/project with
`pi -p --model gpt-6-luna@llm "Reply with exactly: OK" </dev/null` and
check `tmux has-session -t pi`. Skip the later optional instructions and
FAQ. Finish with the SSH command from "Take a break", using this VM's
name, and tell the owner to run `pi` inside it and choose "Use exe.dev
LLM integration" when Pi asks.
Finish with the URLs I should open.
Also at /deploy/pi/prompt.txt. The recipe it follows is /deploy/pi.md.
Start coding#
On your computer, create a VM and connect. Pick any free name; if you've already clicked Deploy or have a VM, skip the first command and use its name:
ssh exe.dev new --name=my-pi
ssh my-pi.exe.xyz
On the VM, make a project folder and open a tmux session. The project is a Git repository, so you can review and undo whatever Pi changes. The tmux setting lets Pi tell Shift+Enter (a new line) from Enter (send), if your terminal reports the difference:
git init ~/project
echo 'set -g extended-keys on' >> ~/.tmux.conf
tmux new -A -s pi -c ~/project
Inside that session, start Pi:
pi
The first time, Pi asks Use exe.dev LLM integrations? Choose Use exe.dev LLM integration. Pi picks a model and shows it at the bottom right. Then give it a small task. For example:
Build a tiny website for a lighthouse keeper who reviews fog.
That's the setup. Your files live in ~/project.
Take a break#
Press Ctrl-b, then d to detach. Pi keeps working on the VM when you disconnect. On your computer, use this command to hop back in:
ssh -t my-pi.exe.xyz 'tmux new -A -s pi -c ~/project'
A VM restart ends the running session, but not your saved work. Pi saves
every conversation as it goes: reconnect and run pi --continue from your
project's folder on the VM to pick up the last one, or pi --resume to
choose another.
Know what it can reach#
Pi doesn't have permission prompts to loosen. From the first task, it
reads, writes and runs whatever the exedev user can, which on this VM
includes sudo. Pi's own security guide
suggests running it inside a virtual machine, and that's what this is:
your laptop, its files and its keys are out of reach.
What Pi can reach is the VM itself, the internet, and the integrations attached to the VM. Keep secrets you wouldn't hand to Pi off this VM, and attach only the integrations it needs.
Tip
Before a big unattended job, take a copy of the VM with
ssh exe.dev cp my-pi my-pi-backupon your computer. If the job goes sideways, carry on from the copy.
Make yourself at home#
- Pick a model: type
/modelin Pi, or start it withpi --model claude-sonnet-5-5@llm. exe.dev's models end in@llm;pi --list-models @llmlists them, and exe.dev keeps a list of available models and prices. - Make it yours: Pi can explain its own features and read its own
docs, so ask it for what you're missing: "write a Pi extension that
asks me before any
git push". Extensions are TypeScript files in~/.pi/agent/extensions/; type/reloadto load a new one. Put instructions for a project in anAGENTS.mdin its folder. Pi's extension docs have more. - Bring your code: connect a GitHub repo,
clone it onto the VM, and run
pifrom its directory. Use that folder instead of~/projectin the commands above. - Peek at your app: ask Pi to serve it on
0.0.0.0:8000, then openhttps://my-pi.exe.xyz/. It's private by default. More about previews. - Give it more VMs: connect Pi to
exe.dev's MCP server and it can create VMs of its
own, to try something risky on a copy or to host what it builds. Pi
never asks before a tool call, so use a token limited to one tag rather
than your whole account, as
that page shows.
With the token in
EXE_TOKENwhere you start Pi, runpi mcp add exe --url https://exe.dev/mcp --bearer-token-env-var EXE_TOKENand check thatpi mcp listsaysexe: connected. Then ask Pi to "make a new VM and host this there". - Script it:
pi -p "Summarize the TODOs in this repo"runs one task without the interactive screen and prints the answer.--mode jsonstreams every step as JSON lines instead.
This page was last checked with Pi 1.4.0. For Pi's own features, head to the Pi docs.
Frequently asked questions#
How is this different from Pi Durable?
This page is Pi, the coding agent you talk to in a terminal: you give it tasks and watch it work. Pi Durable is a library from the same team for building your own agent apps that run for days and pick up where they left off after a crash. If you want a coding partner, you're in the right place.
Can I use my own subscription or API key?
Yes. Type /login in Pi, choose a provider, and follow its prompts. On a VM the sign-in page can't call Pi back, so paste the final redirect URL or code into Pi when it asks. Then pick that provider's model with /model. exe.dev's models stay on the list beside it; see Pi's provider docs.
How do I update Pi?
On the VM, run exeuntu update pi, without sudo, then reopen your last chat with pi --continue. pi update can't update the copy exe.dev installs, but pi update --extensions still updates Pi packages. To pin a release, add --version: exeuntu update pi --version 1.4.0. See updating coding agents.
Pi doesn't show exe.dev's models. What now?
exe.dev's models end in @llm; pi --list-models @llm lists them. If you answered "I'll configure pi myself" the first time, Pi remembered: delete ~/.pi/agent/exe-dev-llm-integration.json and start Pi again to be asked again. If the list is still empty, check that an LLM integration is attached to the VM. The exe-dev extension in ~/.pi/agent/extensions does the connecting, so leave it in place.
How do I back up my work?
Commit and push your code. For a copy of the whole VM, run ssh exe.dev cp my-pi my-pi-backup on your computer (choose a free backup name). To use that copy, connect with ssh my-pi-backup.exe.xyz; your files and Pi sessions, which live in ~/.pi/agent/sessions, are there. Reattach any VM-specific integrations.
Updated Oct 30, 2026 · tested end to end Oct 30, 2026 · Markdown · manifest.json · Something wrong? Tell us