| .. | ||
| agents.ts | ||
| index.ts | ||
| interactive-tools.ts | ||
| jsonl.ts | ||
| package.json | ||
| README.md | ||
| rpc-runner.ts | ||
| subagent-types.ts | ||
Subagent roles for pi
Installed roles:
reviewer— review changes, bugs, risks, maintainabilitylibrarian— explore and map a codebasedesign-engineer— frontend-aware UI/UX direction, design systems, and implementation-ready recommendationsexecutor— implement ordered coding tasks from a defined todo listplanner— interactive planning specialist that can ask clarifying questions and return an ordered executor-ready todo list
Commands
/subagents— list discovered user-level agents/subagents both— include project-local.pi/agents
Example prompts
Use the subagent tool with reviewer to inspect the auth refactor.Use subagent in parallel: librarian maps the settings flow, design-engineer proposes an improved UX direction, reviewer lists product and implementation risks.Chain librarian -> design-engineer to redesign onboarding. Use {previous} in the second task.Use executor to implement this ordered todo list exactly as written, then summarize what was completed and validated.Use planner to clarify ambiguity only when needed and output an ordered implementation todo list for executor handoff.
Interactive planner + ask_user
planner is marked interactive: true and runs through an RPC-backed child agent path.
- Interactive child agents use a helper extension tool:
ask_user ask_usersupportsinput,confirm, andselectmodes (pluseditor)- Child tool activation is applied on
session_startviaPI_SUBAGENT_TOOLSso custom tools likeask_userare reliably active
Notes
- User agents live in
~/.pi/agent/agents - Project-local agents can live in
.pi/agents - Project agents require
agentScope: "project"or"both" - Parallel mode allows up to 8 tasks and runs up to 4 concurrently
reviewerusesopenai-codex/gpt-5.4:xhighlibrarianusesanthropic/claude-sonnet-4-6design-engineerusesgoogle-antigravity/gemini-3-flashexecutorusesopenai-codex/gpt-5.3-codex:highplannerusesanthropic/claude-sonnet-4-6
Current interactive limitations
- Interactive subagents are currently supported only in single mode (
{ agent, task }) - Interactive subagents are currently rejected in parallel and chain modes
- Interactive subagents require
ctx.hasUI(interactive TUI or RPC mode with extension UI handling)