explaingit

kmmuntasir/pi-nested-subagents

Analysis updated 2026-05-18

0Audience · developerComplexity · 4/5Setup · moderate

TLDR

A pi editor plugin that adds Claude Code-style nested subagents: parallel agent hierarchies up to 5 levels deep, a live status UI, mid-run steering, and scheduled agents.

Mindmap

mindmap
  root((pi Nested Subagents))
    Agent System
      Hierarchical Nesting
      Parallel Execution
      Configurable Depth
    UI Features
      Live Widget
      FleetView Panel
      Conversation Viewer
    Agent Config
      Custom Types
      System Prompts
      Tool Restrictions
    Advanced
      Scheduled Agents
      Git Worktree Isolation
      Mid-run Steering
      Skill Preloading
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Delegate complex coding tasks to parallel AI sub-agents inside the pi editor, with one orchestrator coordinating many workers.

USE CASE 2

Monitor all running agents in real time via a live widget showing spinners, token counts, and status icons.

USE CASE 3

Define custom agent types with specific system prompts and tool restrictions for specialized tasks.

USE CASE 4

Schedule AI agents to run on a cron schedule or after a delay, with results delivered as notifications.

What is it built with?

TypeScriptpi (pi.dev)

How does it compare?

kmmuntasir/pi-nested-subagents0xhassaan/nn-from-scratch0xzgbot/hermes-comfyui-skills
Stars000
LanguagePython
Setup difficultymoderatemoderateeasy
Complexity4/54/51/5
Audiencedeveloperdeveloperdesigner

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires the pi editor environment, install with `pi install npm:@kmmuntasir/pi-nested-subagents`.

In plain English

This is a plugin for a coding environment called pi that adds the ability to run multiple AI agents working in parallel or in a hierarchy, with one agent able to delegate tasks to other agents below it. The design is inspired by how Claude Code handles subagents, so the tool names, calling conventions, and interface patterns feel familiar to anyone who has used that system. The core idea is that you can have an orchestrating agent that breaks down a large task and assigns parts of it to specialized sub-agents. Those sub-agents can, in turn, spawn their own sub-agents up to a configurable depth limit (the default is five levels deep). This makes it possible to build workflows like orchestrator, then task planner, then leaf workers, all operating at the same time, with results flowing back up the tree in the correct order. The plugin adds a live status widget inside the editor showing animated spinners, token usage, and colored status icons for every running agent. A FleetView panel lists all active agents and lets you navigate into any one to see its conversation in real time, send it a message to redirect its work, or stop it early. Agent types can be customized by creating a Markdown file with a YAML header that defines the system prompt, model choice, and which tools the agent is allowed to use. Other features include git worktree isolation so each agent works in its own copy of the repo, skill preloading to inject reusable instruction sets into agents, scheduled agents using cron expressions or relative time offsets, and an event bus that lets other extensions react to agent lifecycle events. This is a fork of an earlier project, adding safe deep nesting and a built-in verification tool for auditing the agent tree. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
I'm building a multi-agent workflow in pi where an orchestrator breaks a task into subtasks. Help me write the Agent() call to spawn a background Explore subagent that finds all authentication-related files.
Prompt 2
I want to create a custom agent type in pi with a specific system prompt and only read-only tools. Show me the YAML frontmatter format for a .pi/agents/researcher.md file.
Prompt 3
How do I schedule an AI agent in pi to run every Monday morning at 9am and summarize the week's commits? Show me the 6-field cron syntax and how to pass it in the schedule field.
Prompt 4
Explain how git worktree isolation works for subagents: what happens to the changes an agent makes, and how do they get committed and returned to the parent?

Frequently asked questions

What is pi-nested-subagents?

A pi editor plugin that adds Claude Code-style nested subagents: parallel agent hierarchies up to 5 levels deep, a live status UI, mid-run steering, and scheduled agents.

How hard is pi-nested-subagents to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pi-nested-subagents for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub kmmuntasir on gitmyhub

Verify against the repo before relying on details.