pi-advisor plugin
A plugin for the Pi agent: a fast model executes while a stronger one gives a second opinion before big decisions and at the end.
- 65 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Parts of the conversation and repository context go to a second model, possibly from another provider.
- Automatic gates can stop an action or a session.
Install
Manual install
pi install npm:pi-advisor-flowPi 1.0.0 or newer is required. After installing, reload Pi and run `/advisor`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Parts of the conversation and repository context go to a second model, possibly from another provider.
- Automatic gates can stop an action or a session.
This is third-party code. Review the repository files before installing.
What it does
pi-advisor splits the work of the Pi agent into two roles. The Executor runs the task on a fast model and keeps ownership. The Advisor, a stronger model, joins for consequential decisions, stalled work and the final review: it challenges assumptions, names risks and suggests verification steps but runs nothing itself. Advice can be requested with the `ask_advisor` tool or the `/advisor-manual` command. Configurable review gates switch on before a plan, after repeated failures and before declaring completion. A loop detector tracks repeated tool calls and requires a decision: proceed, revise or stop. Executor and Advisor models, reasoning level and a fallback model are set separately. Token use and cost are counted in `/cost`, and `/advisor-stats` shows how often advice was adopted.
Who it is for. Pi users who keep a cheap fast model for routine work and want to bring in an expensive one only at decisive steps.
Good fit when
- Implementation runs on a fast model while an architecture decision deserves a check from a strong one.
- The agent breaks the same step several times in a row and goes in circles.
- Before claiming the work is done, an independent review of the result is needed.
- The advisor's opinion should account for a screenshot or an image from a tool result.
- You want to know how many tokens and how much money went into advice and how often it was adopted.
Not a fit when
- You do not work in Pi: the plugin targets that agent version 1.0.0 or newer.
- Executor and Advisor are the same model: such consultations are skipped by default.
- Tasks are short and unambiguous while every consultation costs tokens and time.
Example request
/advisor executor=openai-codex/gpt-5.6-luna advisor=openai-codex/gpt-5.6-solLimitations
Pi version 1.0.0 or newer is required. Regular consultations never block work, but automatic loop gates can stop an action or session by the configured policy. The `draft` and `question` text goes to the Advisor explicitly and does not inherit tool exclusions, so secrets and private files must not be copied into it. A follow-up lives five minutes and allows up to three chained clarifications. The outcomes ledger is capped at 1 MiB. The plugin is not affiliated with the Pi or Claude teams and is inspired by a paper on advisor models and the Advisor feature in Claude.
How to disable. Turn the flow off with `/advisor` and remove the plugin with Pi tools, then reload Pi. The `advisor.json` settings file is deleted by hand.
FAQ
How do I install pi-advisor?
Run `pi install npm:pi-advisor-flow` and reload Pi. From GitHub use `pi install git:github.com/philipbrembeck/pi-advisor.git`. Then `/advisor` turns the flow on and `/advisor-models` picks the models.
Who is the Executor and who is the Advisor?
The Executor is the model your Pi session runs on, and it owns the work. The Advisor, usually stronger, gives an opinion with risks and checks but calls no tools. The decision stays with the Executor.
How do I request advice manually?
The Executor calls `ask_advisor({})` for a general review, and a `question` or short `draft` narrows it. A person can use the `/advisor-manual` command.
What does the Advisor see of my data?
The relevant part of the conversation and allowed repository context. History, context, `AGENTS.md` rules, tool results and outcome logging are governed by privacy settings, and secrets are redacted.
How do I know whether advice helps?
`/advisor-stats` reads the local ledger and shows trigger counts, the share of adopted advice and validation pass rates for adopted versus rejected advice. If cost data is missing, the plugin does not invent it.
Discussion
No questions or reviews yet.
Related
PluginsPackage for the Pi agent with an ask_user tool: the agent pauses and asks you when a decision cannot be made without a human.
An extension for the Pi agent that sorts models into quick, general and frontier tiers and picks a healthy one per turn, no proxy
A minimal terminal coding agent extended with skills, prompt templates and TypeScript packages
Repeated pi agent steps accumulate as JavaScript programs with a manifest and tests, and pi calls them instead of redoing work.
A Pi extension that turns prompt templates into slash commands that pick the model, the skill and the thinking level on their own
shitty-extensions adds fifteen extensions to the Pi agent: second opinions, plan mode, cost tracking and test loops.
README in short
The author states the idea as using only as much intelligence as you need. A cheap model runs the routine, and an expensive one joins where a decision is costly.