Overview
pi-subagents is a powerful extension for Pi that empowers you to delegate complex tasks to specialized child agents. This enables Pi to perform a wide range of operations, from in-depth code reviews and meticulous audits to background job execution and the creation of reusable workflows. By leveraging focused subagents, you can significantly enhance efficiency and harness the collective intelligence of AI models for more sophisticated problem-solving.
Key Features
- Async Subagent Delegation: Offload tasks to child agents that run asynchronously, allowing Pi to continue its work without interruption.
- Truncation & Artifacts: Manage the scope and output of subagent tasks, ensuring relevant information is captured and processed efficiently.
- Session Sharing: Facilitates seamless communication and context sharing between parent and child agent sessions for coordinated operations.
- Built-in Specialized Agents: Comes pre-equipped with a suite of focused agents like
scout,reviewer,planner,worker, andoracle, each designed for specific domains. - Plain Language Prompting: Initiate subagent actions using natural language commands, making delegation intuitive and accessible.
- Customizable Agent Overrides: Tailor the behavior of builtin agents, including model selection, thinking parameters, and fallback models, without modifying core files.
- Parallel and Chained Operations: Execute multiple subagents concurrently or in sequence to tackle complex workflows efficiently.
- Background Execution & Status Tracking: Run tasks in the background and monitor their progress through a dedicated UI and status commands.
- Optional
pi-intercomIntegration: Enable richer communication channels for child agents to request decisions or provide updates to the parent session.
Typical Use Cases
- Code Review & Quality Assurance: Delegate code reviews to
revieweragents, focusing on correctness, tests, and complexity. Run parallel reviewers for comprehensive analysis. - Implementation & Refactoring: Utilize
workeragents for implementing plans andplanneragents for generating detailed implementation strategies. - Problem Solving & Diagnosis: Employ
oracleagents for a second opinion on complex issues, bug investigations, and challenging decisions before making edits. - Codebase Understanding: Use
scoutagents for rapid local codebase reconnaissance, identifying relevant files, entry points, and potential risks. - Research & Information Gathering: Leverage
researcheragents for in-depth web and documentation research, complete with sources and concise briefs. - Workflow Automation: Define and execute saved workflows (chains) for repeatable tasks, such as running a review loop until a codebase is clean or gathering context for planning.
- Background Processing: Offload long-running tasks, like initial audits or extensive data processing, to run in the background without blocking the main session.
- Strategic Planning: Use
context-builderandplanneragents to construct robust implementation plans based on thorough code and external context analysis.
