Skip to content

neevparikh/pi-subagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-subagent

Subagent extension for pi — delegate well-scoped subtasks to specialized agents running in isolated pi processes.

Spawns a separate pi process per invocation so the child has its own context window. Supports three call modes:

  • single{ agent, task }
  • parallel{ tasks: [{agent, task}, ...] } (max 8, up to 4 concurrent)
  • chain{ chain: [{agent, task}, ...] } with {previous} substituted into each step's task

Available agents are discovered from:

  • ~/.pi/agent/agents/*.md (user scope, default)
  • <repo>/.pi/agents/*.md (project scope, opt-in via agentScope: "both")

Each agent is a Markdown file with YAML frontmatter (name, description, optional tools, model) plus a body used as the agent's system prompt.

Install

pi install ~/repos/pi-subagent

For project-local install:

pi install -l ~/repos/pi-subagent

After installing, reload pi resources with /reload (or restart pi).

Development

npm install
npm run typecheck

Package manifest

This repo is a pi package via package.json:

  • pi.extensions: ./src/index.ts

Entrypoint:

  • src/index.ts — tool registration, process spawning, rendering
  • src/agents.ts — agent discovery (user + project scopes)

About

Subagent extension for pi - delegate tasks to specialized agents running in isolated pi processes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors