pi-advisor-flow
Advanced Executor/Advisor flow for Pi, fully configurable and extendable.
Package details
Install pi-advisor-flow from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-advisor-flow- Package
pi-advisor-flow- Version
0.5.2- Published
- Sep 5, 2026
- Downloads
- 2,651/mo · 1,121/wk
- Author
- philipbrembeck
- License
- MIT
- Types
- extension
- Size
- 310.6 KB
- Dependencies
- 0 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
],
"image": "https://raw.githubusercontent.com/philipbrembeck/pi-advisor/refs/heads/main/assets/hero.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-advisor

A configurable second-opinion workflow for Pi coding agents, inspired by the "Steering Black-Box LLMs with Advisor Models" paper and Claude's Advisor feature.
pi-advisor-flow keeps one model focused on execution and makes a second, smarter model available for consequential decisions, stalled work, and final reviews. The Executor still owns the work. The Advisor challenges assumptions, exposes risks, and suggests verification steps without taking over or running tools.
Keep implementation on a fast model and borrow frontier reasoning only when decisions matter. Read why this workflow is useful.
How it works
- The Executor works on your task as usual.
- It calls
ask_advisor, or an enabled gate starts a review. - pi-advisor reconstructs the relevant conversation and allowed repository context.
- The Advisor returns an opinion. The Executor decides what to adopt, changes the code, and validates it.
Regular consultations do not block execution. Automatic loop gates are different: they can stop a repeated tool action or session based on your configured failure policy.
Install
Requires Pi 0.84.1 or later.
pi install npm:pi-advisor-flow
You can also install from GitHub:
pi install git:github.com/philipbrembeck/pi-advisor.git
Reload Pi after installing.
Quick start
/advisor # Enable the Advisor Flow
/advisor-models # Choose the Executor and Advisor models
/advisor-settings # Configure behavior, modes, etc.
On first use, or whenever a saved model is unavailable, /advisor opens the same available-model picker as /advisor-models; it never silently chooses an unconfigured model. After activation, /advisor explains that the Advisor reviews the Executor's context without changing files or running tools.
From the Executor, ask_advisor({}) requests a general review. A targeted question or concise draft can focus the review on a particular decision.
In the Settings, enable the Simple Mode for a quick start.

Commands
| Command | What it does |
|---|---|
/advisor |
Enable the flow; choose available models when needed. |
/advisor-manual [focus] |
Ask for an immediate second opinion. |
/advisor-models |
Choose the Executor and Advisor models. |
/advisor-settings |
Configure behavior, context, privacy, and limits. |
/advisor-off |
Disable the flow and persistent activation. |
Experimental Advisor Scout
Advisor Scout is off by default. When enabled, the Executor model first selects relevant conversation history before the Advisor sees it. This adds a model call, latency, and cost. See the configuration guide for details.
Privacy
Advisor requests can include user messages, tool calls, tool results, targeted questions, and repository information. /advisor-settings controls context, tool disclosure, redaction, and explicit file handoff. Secret redaction is off by default; when enabled, credential-shaped values in targeted questions are redacted before the provider request. Tools without an explicit policy use full context. Settings are global, so a project cannot silently change them.
Read Privacy and data handling before using pi-advisor with sensitive work.
