Durable Pi Agent Network

Agents live on the device, not in the client: runs survive closed windows, dropped connections and mid-tool restarts by resuming from checkpoints.

Stars
★ 398
Last updated
1mo ago
FARS reviewed
Nov 27, 2026
License
MIT
Primary language
TypeScript

At a glance

How it runs
Self-hosted serviceCLIWeb app
Works with
Portable with changesOpenAI API (Partial support)
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Node.js 24justzshOPENROUTER_API_KEYSSH (passwordless, for remote devices)exe.dev account (for exe-dev VMs)Shell / CLINetwork accessLocal filesystem
Typical use
Ops teams that want a log event to kick off an agent which investigates and prepares a fix unattended, leaving only the deploy approval for a human.
Not a fit if
  • Users who only need short, supervised single-terminal sessions
  • Teams requiring hard isolation: a device token is effectively a shell
  • Teams unwilling to pay OpenRouter and the third-party Jev API
Maintenance
Commits in the last 6 monthslast commit 2026-10-11
Source review
60/100 · Some gaps

What does this agent do, and when should you use it?

Durable Pi is a multi-device, persistent agent network built on Pi Durable. Every device runs a small server, dpi-backend (port 4780 by default), which owns that device's agents, one agent.sqlite per session, and the tools. Clients connect with a URL plus a bearer token. Three clients share one v1 HTTP API: a web hub that watches every device at once (apps/dpi-playground on 127.0.0.1:4781), a terminal client dpi-tui, and a single curl request. Because the agent belongs to the device rather than to the window that started it, closing the browser, quitting the terminal or restarting the machine mid-tool just resumes from the last checkpoint. The repo also ships apps/proactive-dpi-demo, which watches a mock Cloud Run log stream and, on detecting failing checkouts, opens an incident and starts an agent that investigates, fixes, proves and then waits for your deploy approval. It is MIT licensed, pins pi-durable at 1.0.3, and the upstream project is labelled experimental.

dpi-backend exposes a three-level REST v1 hierarchy of device, session and agent (e.g. /v1/sessions/release-notes/agents/main), streaming state as hello → snapshot → deltas over SSE and making sends idempotent via requestId. Every model call and every tool call is its own durable task; replay-safe tools rerun after a crash while tools that may have partially executed (like bash) come back as an interrupted result for the agent to reason about. All agents and sessions on a device share one App State JSON document through read_state / update_state as single-path atomic operations, with stale full-document saves rejected as 409 conflict. Durable jobs are workflows of named phases, each a checkpoint, invoked via run_durable_job and followed with check_durable_job; three ship as examples (workspace-snapshot, change-watch, release-check). Background compaction starts around 200k tokens and blocks at 250k, stored history keeps every entry, and the search_history tool pages through it. An extension layer adds custom tools, hooks and prompt sections, e.g. jev-damage-control sends each bash command to the Jev API before it runs. The hub keeps a device registry in network.sqlite, a token-injecting proxy and multiplexed SSE, so the browser never sees a token. just net up/status/deploy/rotate drive provisioning across local, ssh, exe-dev and url device kinds.

  1. Ops teams that want a log event to kick off an agent which investigates and prepares a fix unattended, leaving only the deploy approval for a human.
  2. Incident responders who need several engineers to watch and steer one agent from both browser and terminal while some clients disconnect.
  3. Product teams building a support agent that keeps a persistent per-customer session and is observable from any client.
  4. Developers running long tasks who need tool calls to survive a machine restart or a code deploy rather than starting over.
  5. Teams that want to tighten permissions mid-run, e.g. flipping Read only so the 8 write tools leave the agent's next request.
  6. Engineers who want shared facts across many agents in one JSON state document with conflict detection, plus debugging across sessions.
  7. Experimenters who fork an agent at any transcript entry to try another direction without losing accumulated context.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Ports
4781
Environment variables
OPENROUTER_API_KEY
Config files
.env .env.example dpi-network.example.yaml dpi-network.yaml ~/.dpi/backend.env
Runtime
Node.js 24
Install notes cover
macOS

How do you install or deploy this agent?

Prerequisites: Node.js 24 (via nvm), just, zsh (macOS ships it), an OpenRouter API key; remote devices need passwordless ssh and exe.dev VMs need an exe.dev account.

The agentic path is to open the repo in Claude Code or Pi and run the bundled command, which checks the toolchain, confirms OPENROUTER_API_KEY in .env without printing it, installs, writes this machine's device config, builds the web UI, optionally sets up the proactive demo, and finishes with just check. It never starts a server and never touches a device other than local:

/install

Manual installation:

cp .env.example .env                           # set OPENROUTER_API_KEY; copied into each device's backend.env, never sent to clients
cp dpi-network.example.yaml dpi-network.yaml   # your devices; starts with only `local`
just install                                   # npm install for dpi-sdk, dpi-backend, dpi-playground and dpi-tui
just net up local                              # write ~/.dpi/backend.env with a fresh token and register this machine
just hub build                                 # build the web UI the hub serves (once, and after UI changes)
just backend run                               # this machine's device server on :4780
just hub start                                 # web UI on http://localhost:4781 (second terminal)
just tui attach local                          # or attach from the terminal (third terminal)

The proactive demo has its own dependencies:

just proactive install
just proactive build
just proactive take

How do you use this agent?

With dpi-backend and the hub running, open http://localhost:4781. The left column is the network tree (device → session → agent), the middle is the inspector with Session, State, Tasks, Tools and Extend tabs, the right is the transcript. The composer sends a follow-up, a steer (joined after the current tool round) or a reject-if-busy, and / opens slash commands.

Terminal client:

just tui attach <device>                     # pick or create a session on a device
just tui attach <device>:<session>:<agent>   # straight to an agent, by name or id
just tui new <device> <name>                 # create a session in the device's first start dir and attach

Scripts and other agents can skip both clients with one request that waits for the answer:

curl -s "$URL/v1/sessions/oneshot/agents/main/messages" -H "Authorization: Bearer $TOKEN" \
  -H 'content-type: application/json' \
  -d '{"content":"How many files are in this directory? Use bash.","requestId":"oneshot-1","waitMs":120000}'
# {"submissionId":10,"status":"done","answer":{"entryId":17,"text":"The directory is empty. ..."}}

Devices are declared as data in YAML; each device generates its own token and just net register copies it into the hub registry:

just net up <id>         # every step the device's kind supports, in order; idempotent
just net status          # probe every device
just net deploy <id>     # ssh and exe-dev: rsync code, npm ci and restart; data stays
just net logs <id>       # tail the service log
just net restart <id>
just net rotate <id>     # new token on the device, then re-register
just net destroy <id>    # exe-dev only; asks first

Proactive demo:

just proactive take   # prints the URL; the bug deploys at 5 s and the agent asks to deploy at about 30 s
just proactive bug    # deploy the bad commit now instead
just proactive stop   # end the demo

Verification:

just check              # type checks and unit tests, every app (free, no network)
just test ui            # web UI suite against two faux devices (free)
just test device <id>   # UI, agent-feature and browser-close suites on one device (real model)
just test e2e <id>      # TUI + web + restart mid-tool + fork on one device
just test smoke faux    # TUI end to end in tmux against a faux backend

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • The agent belongs to the device, not the client: closing the browser, quitting the terminal or restarting mid-tool resumes from the last checkpoint, and unsafe tools return an interrupted result instead of silently repeating a side effect.
  • One v1 API serves the web hub, dpi-tui and curl, while the web client and TUI feed frames into the same AgentModel reducer and render the same transcript items — one reducer, two renderers.
  • App State uses single-path atomic updates with revision conflict detection (409), so multiple agents can share a document without clobbering each other's fields.
  • The tool set can change between requests because every model and tool call is its own durable task; flipping Read only removes the 8 write tools from the next request with no restart.
  • Devices are YAML data across local, ssh, exe-dev and url kinds with idempotent just net commands for up, deploy, logs and token rotation; the hub stores only URLs and tokens and can disappear at any time.
  • The repo reports concrete self-checks: 28/28 web checks, 18/18 real-model device tests, and an e2e pass with a mid-tool restart, fork and TUI reattach.
Limitations
  • Durable means checkpointed, not exactly-once: external effects (a payment, a page, a deploy) may have already happened before a crash, so effects still need their own idempotency.
  • A device token is effectively a shell as that device's user; start_dirs are not a sandbox, and LAN ssh devices speak plain HTTP so tokens cross the network in cleartext.
  • The hub holds every device token; it binds 127.0.0.1 and checks Host/Origin, but binding it to the LAN exposes every reachable device.
  • Hard dependencies on an OpenRouter API key plus Node.js 24, just and zsh; the proactive demo also needs the third-party Jev API (about $0.00003 per row) and a Sonnet model (about $0.09 per incident).
  • pi-durable is labelled experimental and the repo pins 1.0.3, with no evidence of an upgrade path or long-term compatibility guarantees.
  • The proactive demo has no login and its agents run bash; macOS devices run as a LaunchAgent in the logged-in session, so unattended reboots need auto-login.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Durable Pi Agent Network This agent 60 · Some gaps Self-hosted serviceFree + model costs ★ 398 1mo ago TypeScript —
opencode-rust 50 · Major gaps — ★ 15 27d ago Rust OpenAI API · Claude API
Rovai AI 77 · Good — ★ 284 today Rust Codex · Claude Code
tlbx 73 · Some gaps Self-hosted serviceFree + model costs ★ 120 2d ago C# Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
60/ 100 5-point scale 3.0 / 5
Trust 16/29
Reliability 9/14
Adaptability 10/18
Convention 11/18
Effectiveness 9/13
Verifiability 5/8
Why each dimension lost points
Trust16 / 29 · 2.8/5

least_privilege: /v1 is fully behind bearerAuth, healthz is open, host is configurable (127.0.0.1 or 0.0.0.0), a Read only toggle removes write tools, and the damage-control extension blocks destructive bash — but that extension defaults off and lets commands run if Jev is unreachable, so capped at 2. user_confirmation: deploys wait for human approval, net destroy asks first, decline/interrupt prevents shipping, yet most write tools and bash lack per-call confirmation by default, so 2. data_flow_transparency: README states tokens live in ~/.dpi/backend.env, never reach clients, the hub injects tokens, the browser never sees a token, and the OpenRouter key is copied into backend.env only; clear but no runtime visualization, 2. sensitive_data_handling: per-device generated tokens, kept out of YAML, secrets injected via env_keys, but no evidence of file permissions or log redaction specifics, 2. dependency_security: only npm ci/npm install, no lockfile or audit evidence, 1. external_effects: bash truncated returns interrupted and deploys need approval, but no one-click undo of performed side effects and no default interception, 1. rollback: checkpoints resume, forks exist, deploys need approval, but no rollback command for shipped changes, 1. source_attribution: MIT license, copyright IndyDevDan, credits to Pi durable and exe.dev doc snapshots, 2.

Reliability9 / 14 · 3.2/5

self_consistency: main.ts gates /v1 with bearerAuth, keeps healthz open, and wires 404/error middleware consistently with api.test.ts; requestId idempotency is coherent across README and code, 2. dependency_availability: README lists Node 24, just, zsh, OpenRouter key, ssh, exe.dev and npm-based install for four apps, but no lockfile or pinned versions shown, 2. failure_messages: errorMiddleware, DpiError codes, TUI messages for unauthorized/offline and unknown device are all visible, 2.

Adaptability10 / 18 · 2.8/5

audience_and_scenarios: README has a 'why go durable' table and 'when plain pi is enough', covering product and proactive agent scenarios, but no layered guidance for non-technical users, 2. capability_boundaries: capability tables, tool set, exe.dev 30s/64KB limits and the 'runs if Jev is unreachable' caveat are clearly stated, 2. trigger_precision: the SKILL.md description gives keyword triggers and the demo has a 120s/3-verdict threshold, but that is an example rather than a general trigger contract, 1. environment_fit: macOS launchd, Linux systemd, ssh, exe-dev, local and url kinds are explicitly supported, 2.

Convention11 / 18 · 3.1/5

information_architecture: folder structure, command groups and a separate API.md are clearly organized, 2. install_notes: both agentic /install and manual install, prerequisites, multi-terminal startup order and just commands are very detailed, 3. naming_stability: device:session:agent addressing and a v1 API are stable, but no version-support pledge, 2. examples_and_faq: abundant curl, TUI and just examples, but no explicit FAQ, 2. known_limitations: states when not to use durable, that damage-control is off by default, and that Jev-unreachable lets commands run, but no dedicated known-issues section, 2. license: full MIT license present, 3. versioning_changelog: no CHANGELOG or version tags, 0. maintenance_responsibility: author and MIT exist, but no stated maintainer, support channel or update policy, and the publisher is unverified, 1.

Effectiveness9 / 13 · 3.5/5

output_usability: web/TUI/curl clients, idempotent submissions and markdown transcripts yield directly usable output, 2. marginal_value: a durable multi-device agent network is a meaningful increment over plain Pi, and the README honestly says not every task needs it, 2. cost_benefit: gives $0.00003/row, ~$0.09/incident and free just check guidance, but no system-level cost model, 2.

Verifiability5 / 8 · 3.1/5

claim_traceability: the README 'What has been checked' table maps to api.test.ts, history.test.ts and helpers.ts behavior, 2. cross_source_corroboration: README, main.ts and tests agree on auth, healthz and the faux echo model, 2. fact_inference_separation: checked results are distinguished from demo examples and unverified items are flagged, 2.

Risks and how to mitigate them
  • The Jev damage-control extension is off by default and lets destructive commands run when Jev is unreachable; assess before enabling.
  • Dependencies span Node 24, just, zsh, an OpenRouter key, passwordless ssh and an exe.dev account — a long path — with no lockfile or dependency audit in evidence.
  • No version tags or CHANGELOG; the API is v1 but there is no formal versioning or update-policy commitment, and the publisher is unverified (unknown maintenance continuity, not a safety deduction).
  • Static review cannot confirm the README's stated test passes or persistence behavior; only test source files corroborate them.
Evidence confidence: Low Reviewed Nov 27, 2026 Reviewed revision 37165c619573
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/durable-pi.svg)](https://followagents.com/en/agents/durable-pi)
<a href="https://followagents.com/en/agents/durable-pi"><img src="https://followagents.com/badge/durable-pi.svg" alt="FARS review"></a>

FAQ

How is this different from plain Pi's /resume?
Resume restores a chat transcript; it does not know which tool call was running when the process died, what that call already changed, what input was queued behind it, or what the application believed. Durable Pi commits history, queued input, task checkpoints and application state to SQLite before anything is shown, so reopening storage reveals exactly where each piece of work stopped.
What happens if I restart the machine mid-run?
The run resumes from its last checkpoint. Replay-safe tools rerun; a tool that may have partially executed, such as a bash call cut off by a restart, comes back as an interrupted result so the agent decides what happens next. The e2e test covers this and records 9 tool results with 1 interrupted by the restart.
What does it cost to run?
The software is MIT and free, but you supply an OpenRouter API key and pay per use. The README's reference figures are about $0.00003 per Jev-judged log row and about $0.09 per incident with Sonnet 5.5. just check and just test ui run against faux models, so they cost nothing and need no network.
Where are the security boundaries?
Anyone holding a device token can run commands as that device's user, and start_dirs only set where sessions begin rather than acting as a sandbox. jev-damage-control is a guard, not a sandbox, and commands run when Jev is unreachable. The hub binds 127.0.0.1 and validates Host/Origin headers, but since it holds every token, never bind it to the LAN.
When is plain Pi the better choice?
For short, supervised, single-terminal work, plain pi is fine. Reach for durability only when the work has to outlive the window that started it: event-driven proactive agents, multi-client or multiplayer agents, long runs across restarts, or workflows that wait hours for a human decision.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts