pi-workflow engine

Multi-agent workflows for pi

Open source · MIT · on npm

When a task benefits from independent review, competing hypotheses, or separate verification, pi-workflow-engine fans it out to subagents and synthesizes one result.

A lead agent coordinating subagents

Quick start

$ pi install npm:pi-workflow-engine

> dynamax investigate why typecheck started failing on this branch
> /workflow code-review
> /workflow refactor-scout src/
> /workflow diagnose "the schema migration broke typecheck"

Requires pi 1.0.0 or newer. Run a built-in workflow, or add dynamax to a prompt so pi can compose a one-off workflow for the task. Built-in workflows inspect and report by default; they do not edit your working tree.

Workflow features

  • Independent analysis

    Give correctness, testing, performance, or other concerns to separate agents instead of asking one agent to cover everything.

  • Verified results

    Workflows can check and rank findings before presenting a single synthesis.

  • Live visibility

    Follow phases and agents in the TUI, with usage and cost totals when the provider reports them.

  • Controlled execution

    Concurrency, timeouts, agent counts, and token budgets keep fan-out bounded.

  • Safe follow-up

    Advisory runs leave the checkout alone, while selected review fixes can return isolated patch previews.

Built-in workflows

code-review PRs, branch diffs, ref ranges, or focused targets
refactor-scout Small, defensible refactors without broad rewrites
diagnose Competing explanations for bugs or failing commands
perf-review Measured bottlenecks rather than performance guesses
research Cited external evidence with independent claim verification
Next Pokeviewer