nicobailon/pi-subagents
Pi extension for async subagent delegation with truncation, artifacts, and session sharing
What it solves
Working with an AI assistant often means handling everything in one long conversation. pi-subagents solves this by letting the main Pi session hand off focused jobs to smaller, dedicated child sessions. Instead of doing code review, research, and implementation all in one stream, you can ask for a second opinion, a code review, or a background task, and Pi will spin up a focused subagent to handle it and bring back the result.
How it works
Pi is the parent session. A subagent is a focused child Pi session with its own job. When you ask for a subagent, Pi starts the child, gives it the task, and brings the result back. Foreground children run as sessions inside the parent Pi process and stream in the conversation. Background children run as sessions inside a detached runner process that keeps working and can be checked later.
Installing the extension does not start an automatic reviewer in the background. When the session’s model can take a new tool mid-conversation, fresh parent sessions initially expose a small loader instead of the full subagent schema. When your request or applicable instructions authorize delegation, Pi can call the loader itself; the full subagent tool is available on the next model request. With other models, fresh sessions start with the subagent tool active, because adding a tool later would make the provider miss its prompt cache. The toolActivation setting changes this. Complexity alone does not authorize delegation.
The extension ships with several builtin agents you can use immediately. A rule of thumb: use scout before you understand the code, researcher before you trust external facts, evidence-auditor before you rely on important research, worker to implement, reviewer to check, and oracle when the decision itself feels risky.
Common workflows are driven by natural-language requests. For example, you can ask Pi to "Use reviewer to review this diff," "Run parallel reviewers," or "Run this in the background." Packaged prompt shortcuts like /parallel-review and /review-loop make these patterns repeatable. There is also a /council command and council-mode for debating material decisions.
Running work shows up in the TUI via a persistent FleetView below the editor. /subagents-fleet opens a live inspector where you can browse children, read transcripts, steer a running child, or stop a run. Background runs keep working after control returns to you.
The package includes a /subagents-doctor command to check whether subagents and intercom are set up correctly, and /subagents-guide [topic] provides installed-version help.
Who it’s for
pi-subagents is for users of Pi (the AI assistant) who want to offload focused tasks like code review, research, implementation, parallel audits, saved workflows, and background jobs to dedicated child sessions, without manually managing separate conversations. It is especially useful when you want a second or third set of model eyes on a decision or a piece of work.
Highlights
- Lets Pi delegate work to focused child agents for code review, scouting, implementation, parallel audits, and more
- Works with plain-language requests like "Use reviewer to review this diff" — no agent configuration needed
- Ships with builtin agents: scout, researcher, evidence-auditor, worker, reviewer, oracle, and delegate
- Supports foreground (streaming) and background (detached runner) execution
- Offers a FleetView and /subagents-fleet inspector to browse and control running subagents
- Includes prompt shortcuts like /parallel-review and /review-loop, plus a /council command for debates
- Provides /subagents-doctor for setup checks and /subagents-guide for in-extension help
- Requires Pi 1.2.0 or newer and installs with a single command: pi install npm:pi-subagents
Related
- Project
- Project
- Project
- Project
- Project