Approve your own agent's actions from your phone.
ColliePWA shows the questions of an agent you built on your phone, beside your terminal agents. You answer with one tap, and the agent gets your answer.
01/Durable agents
Your own agent, on your phone.
A durable agent is one that you build and run yourself, for example with Pi Durable. It talks to your Collie through a small protocol, the wire, and an SDK for Node and Bun speaks it for you. ColliePWA then draws the agent's questions, its conversations and its chat, so you write no UI code.
Experimental. The wire may change in any minor release, or the feature may be removed. Today only the examples in the Collie repository speak it.
02/ColliePWA
What you get
- Approvals, with the time left
- A question from the agent becomes a card on your phone: yes or no, a choice, a line of text or a short form. You answer with one tap, and the card shows how long the question stays open.
- A chat, with history
- Each conversation of the agent opens as a chat. The agent keeps the record, so you can read its closed conversations too.
- Its own section, and push
- The agent gets its own Durable agents section on the phone, and the section moves above your spaces when a question waits. With push turned on, a question also sends a notification.
- Beside your terminal sessions
- Your Herdr, tmux and zellij sessions look and work as before. A durable agent is one more place a session can come from.
03/hello.mjs
Ten lines to the first question
Install the SDK in your agent's folder:
$ npm install @colliepwa/durable-sdk@experimentalSave this agent as hello.mjs, then run it with node hello.mjs or bun hello.mjs. It prints the path of its socket and waits.
import { openCollie } from "@colliepwa/durable-sdk";
const socket = process.env.COLLIE_DURABLE_SOCKET ?? `${process.env.XDG_RUNTIME_DIR}/hello/app.sock`;
const collie = await openCollie({ socket, hostName: "hello", caps: { asks: true } });
const pane = collie.workspace("hello", { title: "Hello" }).tab("main", { title: "Questions" }).pane("deploy", { title: "Deploy", harness: "hello" });
collie.ready();
console.log(`listening ${collie.address}`);
const options = [{ id: "yes", label: "Yes" }, { id: "no", label: "No" }];
const answer = await pane.ask({ kind: "choice", toolCallId: "deploy-1", itemId: "deploy-1", title: "Deploy to staging?", options });
console.log(`answer: ${answer.optionIds[0]}`);
await collie.close();In a second terminal, attach the agent to your Collie with the path it printed. --restart restarts the Collie bridge: your phone reconnects in a few seconds, and your terminal sessions keep running.
$ collie durable attach hello --socket /run/user/1000/hello/app.sock --restart
Open ColliePWA on your phone. A row hello appears in the Durable agents section. Open it, and its one conversation holds the question "Deploy to staging?". Tap Yes or No, and the agent prints your answer and exits.
04/Socket · HTTPS
Where it runs
- On the same machine
- Collie reaches the agent through a private socket, a file that only your user can open.
- Anywhere else
- Collie reaches the agent over HTTPS with a token of 32 random bytes or more, and anyone with the token can answer for you.
- Node or Bun
- The SDK runs on Node 22.18 or later and on Bun 1.4 or later.
05/Docs
Read the docs
The Durable agents page in the docs covers the setup, the two ways to connect, troubleshooting, and what a durable agent can show on the phone.