Pi Workflows

A durable, composable multi-step workflow engine plus live terminal viewers for the Pi coding agent.

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

At a glance

How it runs
Agent plugin / skillCLILibrary / SDK
Works with
Platform-specific
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Pi coding agentNode.jsRust toolchain (optional, for the piw TUI)Shell / CLINetwork accessLocal filesystem
Typical use
Developers who want a repeatable plan → implement → verify → review → fix loop and would rather reuse the bundled autoplan and autoimplement workflows than script it themselves.
Not a fit if
  • Teams not using the Pi coding agent; the extension has no other host runtime.
  • Users who want a click-to-build graphical workflow designer instead of TypeScript.
  • Teams that cannot run a local background server or add a Rust toolchain.
Maintenance
Commits in the last 6 monthslast commit 2026-10-08
Source review
72/100 · Some gaps

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

pi-workflows is an extension for the Pi coding agent (pi.dev) that lets you define multi-step agent workflows as TypeScript graphs and trigger them anywhere in a Pi conversation with /workflow. Agent steps run inside the current Pi conversation, so the model keeps everything already discussed; a step either returns structured output through the JSON workflow tool or, with expectedOutput: assistantMessage(), contributes its exact visible assistant text as the node output. A package-owned global server persists runs, decisions, queues, managed resources, notifications and session capture in ~/.pi/agent/workflows/state.sqlite, so compute, action and shell nodes keep going after Pi closes. Companion pieces include a local CLI (pi-workflows view, runs, server), a Rust terminal UI named piw, an in-editor node-status widget, and a Herdr plugin. Workflows are ordinary importable TypeScript modules, so one workflow can include another with includeWorkflow() and route on the child's named exits. The project is MIT licensed.

You drop hand-written workflow files into .pi/workflows/ (project) or ~/.pi/agent/workflows/ (global), declaring startAt, nodes and edges with defineWorkflow(). Node types are agent (sends a prompt into the origin Pi conversation as a workflow step message and awaits structured output through the workflow tool, or a normal assistant response when configured with assistantMessage()), compute (a pure TypeScript function), notify (a durable message to the session that started the run), action/shell (which must declare an idempotentEffect(...) or manualEffect(...) recovery contract before touching a side effect), checkpoint (parks the run in a waiting state), plus the decision helper and decisionEdge router on top of agent. Edges pick the next node, and includes/includeWorkflow() wires a child's named exits into the parent, with nested children sharing one run, trace, pause state and cancellation state; controlLoop() handles controllers that loop back to the same observation point. All lifecycle mutations go to the package-owned server, which writes runs, decisions, queues, resource specs, notifications and channel transport state into ~/.pi/agent/workflows/state.sqlite, parks runs that reach an interactive step, and saves the request for the origin session so it is presented once. Resource managers are declared with defineResourceManager() in *.resource-manager.ts, applied and inspected through /resource-manager apply|get|reconcile, and reconciled in supervised resource runners. Inspection is covered by pi-workflows view (interactive picker, live updates, ←/→ step replay), pi-workflows view --once, pi-workflows runs, and the Rust piw UI with themes, trace and conversation inspection, temporal replay and reconnecting remote viewing.

  1. Developers who want a repeatable plan → implement → verify → review → fix loop and would rather reuse the bundled autoplan and autoimplement workflows than script it themselves.
  2. Teams watching long-running external state, e.g. monitor polling a PR every 30 minutes, reporting only requested states and stopping when merged or closed.
  3. Anyone who has already had a long discussion in Pi and wants a structured pass over that same context; /workflow autoplan builds on what the model already knows.
  4. Automations that must pause for a person: a checkpoint or protected human decision parks the run until someone answers with /workflow answer.
  5. Platform teams keeping automation aligned with live external state by writing *.resource-manager.ts files with declarative spec and conditions.
  6. Herdr users who want the exact server-owned run view in a split, tab or new workspace via Ctrl+Shift+R piw or /piw.

Key setup facts

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

Install / run
  • cargo install pi-workflows
  • npm install && npm run build && npm link
  • npx tsx src/viewer/cli.ts

How do you install or deploy this agent?

Install through Pi's package manager; this brings the extension plus six optional skills (pi-workflows, monitor, autoplan, autodoc, autoimplement, sanity-check):

pi install npm:@osolmaz/pi-workflows

You can also install straight from GitHub, or run the npm package without installing it:

pi install git:github.com/osolmaz/pi-workflows
pi -e npm:@osolmaz/pi-workflows

The full interactive terminal UI is a separate Rust crate on crates.io and installs the piw command:

cargo install pi-workflows
piw

To keep the extension but disable one bundled skill, edit the Pi settings entry:

{
  "packages": [
    {
      "source": "npm:@osolmaz/pi-workflows",
      "skills": ["-skills/monitor"]
    }
  ]
}

"skills": [] disables every bundled skill while keeping the extension, and "extensions": [] keeps the skills without loading the extension. To link the simpler snapshot viewer shipped in the npm package from a clone, run npm install && npm run build && npm link, or execute it in place with npx tsx src/viewer/cli.ts. No extra API key is needed for the extension or viewers; workflow runs use whatever model the Pi session already uses.

How do you use this agent?

Start by writing a workflow file into .pi/workflows/ (project) or ~/.pi/agent/workflows/ (global):

// .pi/workflows/echo.workflow.ts
import { agent, defineWorkflow } from "@osolmaz/pi-workflows";

export default defineWorkflow({
  name: "echo",
  startAt: "reply",
  nodes: {
    reply: agent({
      prompt: ({ input }) => `Answer concisely: ${(input as { task?: string }).task}`,
      expectedOutput: `{ "reply": "your concise answer" }`,
    }),
  },
  edges: [],
});

Then trigger it from any Pi conversation. Trailing text becomes { task: "..." }, and --input-json passes arbitrary input (answer, cancel, list, pause, resume and status are reserved and rejected as workflow names):

/workflow echo summarize this repository
/workflow --input-json {"key": "value"} echo

Run control and human answers happen in the same session:

/workflow
/workflow pause
/workflow resume
/workflow cancel
/workflow cancel <run-id>
/workflow answer <json-or-text>

Protected human decisions always appear in Pi; to add a private Telegram channel, set it up and inspect it from inside Pi:

/workflow-channel setup
/workflow-channel status
/workflow-channel reload
/workflow-channel recover <message-id> confirm|retry

Inspect runs from a terminal, or manage the on-demand global server:

pi-workflows view
pi-workflows view <runId>
pi-workflows view --once
pi-workflows runs
pi-workflows server start
pi-workflows server status
pi-workflows server stop

For Herdr, sync the bundled plugin first (and again after each pi-workflows update); Ctrl+Shift+R piw or /piw opens the current run and the placement subcommands pick a location:

pi-workflows herdr sync
/piw
/piw right
piw --help

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.

FARS trust-control audit

Verified present in source (3/3)
  • confirmation before acting
  • disclosed external effects

What are this agent's strengths and limitations?

Pros
  • Durable execution: the package-owned server keeps compute, action and shell nodes running after Pi closes, parks runs at interactive steps and resumes safe work from committed state.
  • Typed composition: includeWorkflow() checks child input and exit names in TypeScript, and nested children share one run, trace, pause state and cancellation state without copying nodes.
  • Explicit side-effect contracts: action and shell nodes must declare idempotentEffect(...) or manualEffect(...), and protected human decisions can only be answered by a person via /workflow answer.
  • Several inspection surfaces: a boxed live graph with ←/→ step replay, a --once snapshot for scripts, the Rust piw TUI with themes and temporal replay, and an in-Pi per-node widget.
  • Declarative resource managers (spec, conditions, status, deduplicated reconcile keys) sit on top of workflows, with read-only CLI views.
  • Bundled monitor, autoplan, autoimplement and autoresearch examples, and same-named project or global files can replace a built-in workflow.
Limitations
  • Locked to the Pi coding agent: the /workflow command, the workflow tool and extension loading exist only inside Pi, so the engine cannot be moved to another agent runtime.
  • Authoring is TypeScript-only with no visual builder; graphs, edges and effect contracts are written by hand.
  • The full terminal UI is a separate crates.io Rust crate, and the resolved piw version must equal the package version or the pane refuses to open.
  • One server process owns the whole per-user ~/.pi/agent/workflows/state.sqlite; no per-project isolation is documented, and no OS service is installed, so the server must be started on demand.
  • Reserved command names and breaking renames (autoplan replaced autodevise, with the old command and export dropped) require maintenance across versions.

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
Pi Workflows This agent 72 · Some gaps Agent plugin / skillFree + model costs ★ 368 1mo ago TypeScript —
Smithers Codebase Maintainer 36 · Major gaps Hosted serviceFreemium ★ 451 today TypeScript —
Pi Agent Harness 65 · Some gaps CLIFree + model costs ★ 124k today TypeScript OpenAI API · Claude API
opencode-rust 50 · Major gaps — ★ 15 28d ago Rust OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
72/ 100 5-point scale 3.6 / 5
Trust 21/29
Reliability 8/14
Adaptability 15/18
Convention 12/18
Effectiveness 12/13
Verifiability 4/8
Why each dimension lost points
Trust21 / 29 · 3.6/5

least_privilege: agent nodes support an allowedTools allowlist validated in tests, but it is not the default; shell/action nodes require effect contracts. user_confirmation: protected human decisions, checkpoints, and plan approval policies are implemented. data_flow_transparency: README explains the local SQLite state, server, and client protocol, but does not fully describe data sent to model providers. sensitive_data_handling: Telegram token file verification and private config exist, but there is no general secret-handling policy. dependency_security: dependencies are declared and CI uses npm ci, but there is no audit or lockfile evidence. external_effects: side-effect nodes must declare idempotentEffect/manualEffect, monitor is observation-only by default, and merge/release default to false. rollback: pause/resume/cancel, idempotent effects, and recovery behavior exist, but there is no true rollback/undo mechanism. source_attribution: README credits openclaw/acpx and the MIT license retains copyright. Deductions: broad default permissions, insufficient dependency-security evidence, and limited rollback.

Reliability8 / 14 · 2.9/5

self_consistency: README says monitor input supports checkTimeoutMinutes, while skills/monitor/SKILL.md explicitly says that field is invalid, a direct contradiction. dependency_availability: dependencies are public npm and crates.io packages, but better-sqlite3 is a native module and no lockfile is provided. failure_messages: parse errors, unenforceable allowlists, and server version mismatches produce clear error messages. Deduction: the monitor input-field contradiction is a substantive inconsistency.

Adaptability15 / 18 · 4.2/5

audience_and_scenarios: README covers installation, quick start, examples, skills, viewers, Herdr, resource managers, and always-on workflows. capability_boundaries: node types, agent tool allowlists, monitor observation-only default, scope/authority constraints in skills, and the alpha policy are explicit. trigger_precision: skills require an explicit user request for autodoc/autoimplement/autoplan, while monitor triggers are broader. environment_fit: requires Node >=22, the pi runtime, Rust TUI, and SQLite, making environment fit specific. Deductions: monitor triggering may be broad and environment dependencies are numerous.

Convention12 / 18 · 3.3/5

information_architecture: README is well structured, and the docs directory and skills are well organized. install_notes: multiple install paths are provided via npm, git, pi -e, cargo install, and npm link. naming_stability: the alpha policy explicitly does not preserve backward compatibility, autoplan replaces autodevise and the old command is not retained, so naming stability is low. examples_and_faq: examples/workflows contains several complete examples, but there is no FAQ. known_limitations: docs mention alpha status, monitor occupying one active workflow slot, and possible Telegram retry duplication. license: the MIT LICENSE file is complete. versioning_changelog: version 0.17.7 exists, but there is no CHANGELOG. maintenance_responsibility: author and repository information exist, but the publisher is unverified and there is no governance or support commitment. Deductions: naming stability, changelog, and maintenance responsibility are insufficiently evidenced.

Effectiveness12 / 13 · 4.6/5

output_usability: workflows produce structured results, assistant messages, terminal viewers, CLI snapshots, and JSON tool output, giving good usability. marginal_value: adds a multi-step workflow engine, control flow, live viewer, resource managers, and skills to pi, a significant marginal value. cost_benefit: the system is complex with many dependencies, a long-running server, SQLite, and a Rust TUI, so cost is high; no performance or cost analysis is provided. Deduction: cost-benefit lacks quantitative evidence.

Verifiability4 / 8 · 2.5/5

claim_traceability: most README claims are backed by docs and code, but the monitor input-field claim contradicts the skill. cross_source_corroboration: README, docs, skills, and tests mostly corroborate each other, but the monitor field contradiction weakens cross-source verification. fact_inference_separation: plan documents separate observed failure, goals, and selected change, so fact and inference are reasonably separated. Deduction: the monitor input-field contradiction affects verifiability.

Risks and how to mitigate them
  • Monitor input fields contradict between README and SKILL.md; verify against actual code/skill before use.
  • Default agent steps are unrestricted; shell/action nodes can cause external effects, relying on effect contracts and user authorization.
  • No dependency audit or lockfile evidence; better-sqlite3 is a native module.
  • Alpha policy explicitly does not guarantee naming or backward compatibility; upgrades may break old state.
  • Publisher identity is unverified; maintenance responsibility and support channels are unclear.
Evidence confidence: Low Reviewed Nov 27, 2026 Reviewed revision 2cb8ab3a9c2e
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/pi-workflows.svg)](https://followagents.com/en/agents/pi-workflows)
<a href="https://followagents.com/en/agents/pi-workflows"><img src="https://followagents.com/badge/pi-workflows.svg" alt="FARS review"></a>

FAQ

Does a workflow keep running after I close Pi?
Yes, as long as the package-owned global server is running; the extension starts it on demand. Compute, action and shell nodes survive closing Pi, while reaching an interactive agent, assistant-message or human-decision step parks the run and saves a request that is presented once when the origin session reopens.
Can the model answer approval requests on my behalf?
No. Through the workflow tool the model can list, start, inspect, pause, resume, cancel and answer ordinary checkpoints, but a protected human decision must be answered by a person with /workflow answer in the origin Pi session, and that step does not start a model turn.
Where does state live, and is it shared across projects?
Runs, decisions, queues, claims, managed resources, session capture, notifications, channel transport state, effects and large text values all live in ~/.pi/agent/workflows/state.sqlite. The package-owned server is the only production process that opens it, while the extension, CLI, Herdr adapter and piw use the same versioned local client protocol; server start|status|stop manage one server for the whole user database, not one per project.
What happens if a side effect has an uncertain result?
action and shell nodes cannot perform side effects until they declare an idempotentEffect(...) or manualEffect(...) recovery contract. For an uncertain external send, check Telegram first and then use /workflow-channel recover <message-id> confirm|retry; a retry can duplicate the message when Telegram cannot prove the first result.
Is extra setup needed to open the viewer inside Herdr?
Install piw, then run pi-workflows herdr sync (and again after updating pi-workflows). The plugin uses Herdr's public pane APIs with no service or polling loop, and panes receive PIW_BIN, PIW_SOCKET and PIW_NO_AUTOSTART=1, so a pane never starts a server of its own.
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