- Home
- Skills
- Agents & Orchestration
- pi-workflow-engine
pi Workflow Engine
A dependency-free JavaScript workflow engine for resumable, multi-agent pipelines with adversarial verification.
$5
Works with the AI Agents you already use
pi-workflow-engine
Example session with this skill installed
I need to run a code review workflow on the current directory. Use 'claude-cli' as the host. Give me the command to start it and a summary of how it handles crashes.
- Read your context and instructions
- Compiled the pi-workflow-engine
To start the workflow using your local claude-cli as the host, execute the following command in your terminal:
WF_CMD="claude-cli" node /path/to/wf-cli/wf.mjs run ./review-workflow.js --args '{"target":"."}'
The engine manages crashes via a
durable journal. Every time an agent settles, its result is appended to .wf/runs/<runId>/journal.jsonl. If the process terminates, you simply run wf resume <runId>. The engine recomputes hash chains for each agent() call; if the prompt and options match the journal, it replays the stored result instantly without calling claude-cli, saving both time and tokens.
Workflow Execution Summary
| Component | Responsibility |
|---|---|
wf-core | Compiles your JS, manages the sandbox, and handles the journal. |
journal.jsonl | An append-only log of every agent result and its v2 hash key. |
WF_CMD | The seam where the engine pipes prompts to your claude-cli. |
snapshot.json | A periodic state capture used by the dashboard for monitoring. |
Next steps
- Verify your
claude-cliaccepts a prompt on stdin and returns a clean string on stdout. - Check
.wf/runs/after the first few calls to see the journal entries appearing in real-time. - Use
wf listto find therunIdif you need to resume after a disconnection.
Connects securely to your tools. The creator never sees your data.
About this skill
Stop paying for agent runs that already finished before a crash. This skill pack provides a dependency-free JavaScript workflow engine designed for complex multi-agent orchestration where reliability and cost-control are primary requirements. It replaces fragile, custom scripts with a deterministic system that handles parallel execution, structured output, and stateful recovery.
What it does
- Resumable execution uses a journal-based system to skip previously completed agent calls after a failure.
- Parallel fan-out manages concurrent subagent runs with configurable limits to prevent rate-limiting or budget overruns.
- Adversarial verification implements three-skeptic panels and quorum logic to refute claims before acting on them.
- Snapshot monitoring generates read-only JSON artifacts for observing live or finished runs without a runner process.
- Environment isolation provides optional worktree isolation to prevent agents from colliding in the same file space.
How it works
- Define a workflow in a single JavaScript file using top-level
awaitand the providedagent()function. - Set the host command by naming any CLI tool (via
WF_CMD) that reads a prompt on stdin and writes JSON to stdout. - Execute the run using the
wfCLI to compile the script, manage the journal, and produce artifacts in a.wf/directory. - Inspect or resume by pointing the dashboard at the run directory or using the
resumecommand to replay from the last stable checkpoint.
Frameworks & tools
Built with Node.js (version 20+). Uses standard Unix streams (stdin/stdout) for agent communication. No external npm dependencies are required for the core engine or dashboard.
Why this beats prompting it yourself
Manual prompts cannot handle stateful recovery or deterministic branching across dozens of agents. This engine enforces a strict hash-chain for cache keys, ensuring that a one-line prompt edit only re-runs the affected tail of a pipeline rather than the entire expensive process.
Use cases
- Run a 40-agent repository review and resume instantly if the network or process drops.
- Verify security findings with independent skeptics to filter out hallucinations before human review.
- Compare multiple generated design candidates using a judge panel with an explicit rubric.
- Monitor complex, long-running agentic tasks through a web browser on a local network.
Known limitations
Requires Node.js 20 or higher. Does not include a default agent CLI; you must provide a command that handles stdin/stdout. Replays are invalidated if the sequential call order in a script changes.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Requires Node 20+. No default host command provided. Script logic changes invalidate the resume journal from the point of change. Sequential call order determines cache keys.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 20 days ago
- Software
Git