@aiwayds/pi-orchestrator0.1.1
Planner/Executor dual-phase orchestrator extension for pi coding agent, inspired by Google Antigravity's Orchestrator.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
@aiwayds/pi-orchestrator
A Planner → Executor orchestration extension for pi that runs a whole task inside one session.
Inspired by Google Antigravity's Orchestrator: a Planner/Executor dual-phase workflow for pi, where a read-only Planner plans and reviews and an Executor carries out the work.
What it does
- Plan, then execute. The Planner explores with read-only tools, writes a short Markdown plan and hands off; the Executor works through the plan with the full toolset.
- Optional review. The Planner reviews the result and can send it back with notes, up to a configurable round limit. Questions that need no change are answered directly, without a plan or a handoff.
- One session, no noise. Tool calls fold to zero lines inside phase cards; a compact one-line Dock above the editor shows the current role and progress.
- Two overlays.
/orchestrator view(orAlt+O) opens the Inspector;/orchestrator configedits model routes and limits. Both stay inside the session. - Public APIs only. Built solely on the public extension APIs of
pi-coding-agentandpi-tui: no fork and no patching of installed pi files.
Requirements
@earendil-works/pi-coding-agent>= 1.5.2- Node.js
>= 22.19 - macOS or Linux with
/usr/bin/envandgit
Installation
pi install npm:@aiwayds/pi-orchestrator
To try it for one session without installing:
pi -e npm:@aiwayds/pi-orchestrator
Usage
- Run
/orchestrator configand set two different physical model routes — typically a high-effort model as Planner and a cheaper one as Executor. Both providers need credentials configured inpi. - Start the loop with
/orchestrator on, or select the virtual model with/model→orchestrator/orchestrator. Activation requires both routes to be valid andorchestrator_handoffto be available; a--tools/--exclude-tools/--no-toolsfilter that removes it blocks activation. - Give it a task. The Planner investigates, writes a Plan and calls
orchestrator_handoff; the Executor works through the Plan; the Planner reviews it and, once done, a compact Completion Banner appears below the native reply.
| Entry | Effect |
|---|---|
/orchestrator |
Show status (the default subcommand) |
/orchestrator on |
Activate the loop and switch to orchestrator/orchestrator |
/orchestrator off |
Deactivate and restore a physical model |
/orchestrator status |
Show role, routes, review round, step counters and config warnings |
/orchestrator view |
Open the three-tab Inspector overlay |
/orchestrator config |
Open the Global / Workspace configuration overlay |
Alt+O |
Open the Inspector (same as /orchestrator view) |
/model → orchestrator/orchestrator |
Select the virtual model; selecting another model leaves orchestration |
The Planner can ask clarifying questions through ask_user_question (interactive in the TUI, with a plain-text fallback elsewhere). During review, a send-back via orchestrator_handoff with notes restarts the Executor at the next round; once maxReviewRounds is reached, the Planner reports the outcome instead.
Configuration
All settings live in ~/.pi/agent/pi-orchestrator.json, or in <PI_CODING_AGENT_DIR>/pi-orchestrator.json when that variable is set. No project files are written. You can also edit the file with /orchestrator config.
| Key | Default | Notes |
|---|---|---|
enabled |
true |
Global on/off switch |
workspaceScoped |
true |
Allow workspaces[cwd] overrides |
planner, executor |
empty | { provider, model, effort }; both must be set, must not be the virtual model, and must differ |
executorStepCap |
30 |
Step guardrail, 5–500 |
toolFailThreshold |
2 |
Consecutive failures before review, 1–20 |
maxReviewRounds |
2 |
Maximum send-back rounds, 1–10 |
workspaces |
{} |
Per-directory overrides of the keys above |
effort is "" (inherit) or one of off, minimal, low, medium, high, xhigh, max. Changes are picked up at the next lifecycle point; no reload is needed.
More docs & Development
- Architecture and Architecture Decision Records.
- From a checkout:
npm run typecheck && npm test.