v0.11.0 Built on Pi Durable →

Your coding agent,
in your pocket.

Pi Pocket lets you use Pi from a browser, including your phone's. It runs on your computer, or on Android in Termux. Several people can share a session, and a run keeps going after a server restart.

$ git clone https://github.com/TannerMidd/pi-pocket.git
Self-hosted Any provider No build step Node.js 22.19+
Foundation

Built on Pi Durable.

Pi Durable is Earendil's harness for long-running agents, released with Pi 1.0. It keeps conversations, model calls, tool calls, and app state in one storage, and commits each step before anything is shown. If the process dies, the next one picks the work up where it stopped.

Pi Pocket is a web app on top of it. Pi Durable runs the agent: it saves each step, resumes runs after a restart, queues messages, and runs subagents. Pi Pocket adds the screens, the people, and the ways to connect. Its sessions live in one SQLite file, ~/.pi-pocket/pocket.sqlite.

What Pi Pocket gets from it

tasks + checkpoints

Runs survive restarts

Each model request and tool call is a task that saves a checkpoint before it moves on. After a restart, unfinished runs continue. A tool call that was cut off reruns only if that is safe; otherwise the model is told it was interrupted.

atomic commits

Same view on every device

Nothing is shown before it is stored, and browsers only get committed state. A device that reconnects or joins late sees what everyone else sees.

inbox

Steer or queue

A message sent while Pi works either joins the current run or waits for the next one. Queued messages stay queued across restarts.

documents

Chat, pins, notes, artifacts

Pi Pocket stores its own data as documents, changed in the same commits as the transcript, so after a crash the two never disagree.

owned conversations

Subagents

A subagent is a conversation of its own, owned by a task. It survives restarts, tracks its own cost, and you can open it and talk to it.

extensions + hooks

Live editing and Lancet Guard

Pi Pocket's features are extensions. Installing a new version replaces the old one while the server runs. The guard is a hook that stores each decision, so a restart never asks twice.

Pi Durable is experimental, and its API can change between releases. Pi Pocket pins the exact version it is tested with.

Features

Pi in a browser.

Pi's tools and models, with additions for phones and for sessions that several people share.

Survives restarts

Every model call, tool call, queued message, and subagent is a durable task in SQLite. Restart mid-run and the work picks up where it stopped.

Multiplayer

Several people and devices can watch and steer one session. They also get a side chat, pins, reactions, and shared notes.

Any provider, any model

Uses Pi's own model runtime and sign-ins. Pick the model and thinking level per session, and sign in to providers from the app.

Made for phones

Built for one hand: swipes, the places a thumb away, and back that goes where you were. Streaming replies, tool cards with diffs and live output, push notifications, and an icon for your home screen.

A built-in browser

Pi opens, clicks through, and screenshots pages in a real Chromium on the server, and you watch and use the same page, your localhost dev server included.

Artifacts and subagents

Publish sandboxed HTML, Markdown, and SVG artifacts. Spawn background subagents you can open, watch, and talk to.

Steer or queue @file mentions ! shell commands Files tile Swipe gestures Find in session Skills as commands Message history Forks & retries Plan mode Scheduled messages Done when Git worktrees Diff review & undo Branch switcher Spend limits Share to Pi Drop-in extensions Docs for agents Codemode Take turns @mentions Shared notes View-only invites QR sign-in Uploads & inline images HTML previews in chat Extensions sheet Every Omarchy theme
Multiplayer

Share a session.

Invite other people, or open the same session on your own devices. Everyone sees the run as it happens.

  • Presence. See who is in the session and when someone is writing to Pi.
  • Side chat. A chat Pi does not see. @mention people, quote Pi's replies, and send a chat message on to Pi.
  • Take turns. One person drives and only they send to Pi. The others can ask to drive.
  • Invites and roles. Let people steer or just watch, in every session or only one, with a one-time link or QR code that lasts 15 minutes, or up to a week.
  • Notifications. Get a push when Pi finishes, needs approval, or someone mentions you.
Live editing

Ask Pi to change Pi Pocket.

There is no build step, so changes Pi makes to Pi Pocket's code apply while you are still talking to it. Pi knows where Pi Pocket's docs are, and checks a change on a throwaway copy first.

web/

Browsers reload

Save a file and every open browser reloads.

src/server/extensions/

Reinstalled while running

Extensions reload into the running server. A broken one keeps its last good version.

src/server/

Needs a restart

Restart from the menu. Running work resumes afterward.

Access

Four ways to connect.

The launcher asks how your devices should connect, then shows a sign-in link and a QR code for your phone.

--access local

This device

Listens on 127.0.0.1. Bring your own tunnel, such as ngrok or tailscale serve.

--access lan

Local network

Any device on the same network, over plain http.

--access tailscale

Tailscale

Only devices on your tailnet, encrypted by Tailscale.

Runs on Android too: install it in Termux and keep everything on the phone.

Security

Who can make Pi act.

Pi runs commands on your machine as you. These settings control who can ask it to, and which calls need someone's approval.

  • Lancet Guard. Off by default. Once it is on in both Pi and Pi Pocket (Menu → Extensions), it checks every bash, write, and edit call. Risky calls wait for someone in the session to allow or deny them, and the answer is kept across restarts.
  • View-only roles. Viewers can read, react, and chat, but cannot send to Pi, approve, or upload.
  • Artifacts. They open in a sandboxed frame with no access to the app or its cookies.
  • The browser. Its pages run in Chromium on the server, not in your browser, so they cannot reach the app. It reaches what the server reaches, localhost included: using it takes steering rights, and the addresses people open show in the chat.
!

Steering means shell access. Anyone who can steer can make Pi run commands on your machine. Invite only people you trust with that.

Get started

Install.

  1. Sign in with PiRun pi and use /login for your provider, or sign in from the app later.
  2. Start the launcherChoose how your devices connect. Your choice is remembered.
  3. Scan the QR codeYour phone stays signed in for a year. Add Pi Pocket to the home screen to open it in its own window.
# Requires Node.js 22.19 or newer
$ git clone https://github.com/TannerMidd/pi-pocket.git
$ cd pi-pocket
$ npm install
$ npm start
Options, remote access, and Termux notes are in the README.