pi-moa-subagents
Mixture-of-experts bug diagnosis for Pi
Package details
Install pi-moa-subagents from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-moa-subagents- Package
pi-moa-subagents- Version
0.1.1- Published
- Jun 21, 2026
- Downloads
- not available
- Author
- jdj95
- License
- MIT
- Types
- extension
- Size
- 17.5 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-moa-subagents
Mixture-of-experts bug diagnosis for Pi. Point multiple models at a bug, have each investigate independently, then synthesize findings into an executive summary or an implemented-and-tested fix.
Prerequisites
This extension requires pi-subagents. Install it first:
pi install npm:pi-subagents
pi-moa-subagents does not bundle pi-subagents — it uses its subagent tool as the execution engine. If you try to run /moa-subagents without it, you'll get a clear error with installation instructions.
Installation
pi install npm:pi-moa-subagents
Or install from a local path during development:
pi install /absolute/path/to/pi-moa-subagents
How It Works
- You describe the bug (inline or multi-line editor).
- You select 1+ investigator models (multi-select) — each gets run sequentially via subagent
concurrency: 1to respect single-GPU VRAM limits. Investigators are read-only by instruction (tools:read,grep,find,bash). - You pick a synthesis model (single select) that consolidates findings.
- You choose summary-only or auto-implement-and-test.
Investigators write reports to diagnose/<timestamp>/ as .md files. The synthesis step reads these and either:
- Summary mode: Produces root cause, confidence, evidence per model, and a recommended fix direction. Nothing is changed in the codebase.
- Implement mode: Hands off to the built-in
workeragent with an acceptance contract requiring tests to pass before finishing.
Usage
With inline description
/moa-subagents The login form crashes when a user enters special characters in the email field
With multi-line editor (bare invocation)
/moa-subagents
Opens a text editor for a detailed bug description including steps to reproduce, expected vs. actual behavior, etc.
Architecture Notes
- Sequential model loading. Uses
concurrency: 1on the investigator batch — models run one at a time so only one local model occupies VRAM at once. - Investigators are read-only by instruction. The
investigatoragent hasread,grep,find, andbashtools (noedit/write), plus an explicit system prompt not to modify files. Sincebashis included, a model could technically write via shell redirection if it ignored instructions — this is enforced by convention, not hard sandboxing. - Agent file. The
investigator.mdagent definition ships in the package source and is copied to~/.pi/agent/agents/investigator.md(or$PI_CODING_AGENT_DIR/agents/) on first session start. Existing customizations at that path are never overwritten.
License
MIT