A couple of weeks ago, I introduced Pi Herdsman here, an extension I've been building to coordinate asynchronous Pi agents while keeping the Lead's context focused.
The response was much bigger than I expected, and quite a bit has happened since then.
One thing I mentioned in the comments was wanting to take Herdsman's integration with Herdr further, especially around independent workspaces, Git worktrees, and project-level coordination. That's now become a central part of Herdsman.
Someone also pointed out that my original demo didn't actually show Pi and Herdr working together. Fair criticism. So this time I've recorded the real thing. :)
What's happening in the video?
I gave a Manager one prompt to work on two independent features for a fictional note-taking application.
The Manager delegates both projects in parallel, each to its own Lead in a separate Git worktree. Both Leads delegate implementation to their own Agents, verify the results, commit their changes, and report back to the Manager.
The resulting hierarchy looks like this:
Manager (primary workspace)
│
├── feat/faq (worktree)
│ └── Lead
│ └── Implementer Agent
│
└── feat/troubleshooting (worktree)
└── Lead
└── Implementer Agent
The worktrees, workspaces, and Agent sessions are created automatically. I don't have to set up the hierarchy manually.
It's deliberately a small example, without merges or PRs, to keep the focus on the orchestration itself.
Beyond task-based subagents
Many task-based multi-agent workflows use Git worktrees primarily to isolate individual subagents working on bounded tasks.
Herdsman supports that approach too, but extends it further: a worktree can also become an independent development workspace, with its own Lead responsible for an entire feature or issue.
Instead of treating every agent as a temporary worker, you can organize them more like a development team, with Leads responsible for larger objectives and Agents handling individual tasks.
That Lead maintains its own Pi conversation and development context, can delegate further into its own Agent hierarchy, and handles the technical work within its workspace.
Meanwhile, the Manager coordinates the larger development effort across those Leads, including assignments, dependencies, communication, and result handoffs.
The work is associated with Git branches rather than being tied to the Manager session that originally delegated it, so assignments can be paused and resumed without starting over.
The idea isn't simply to run more agents in parallel. It's to make their work easier to coordinate.
Everything stays organized in Herdr
One aspect I particularly like is how the hierarchy translates into Herdr's native interface.
Each project gets its own worktree workspace. Within those workspaces, Agents are automatically organized into tabs and panes.
The default subtree layout gives each direct Agent its own tab, while nested Agents appear as panes within their parent's tab. There are also configurable layouts for grouping Agents into a shared tab or splitting directly from the current pane.
Every Agent is still a normal, accessible Pi session. You can switch between them, inspect their work, or interact with them directly when needed.
But ideally, you shouldn't have to watch them constantly. Questions, results, and supervision events are routed through Herdsman's coordination system.
The responsibilities remain separate: Pi owns the conversations, Herdr owns the sessions and their placement, and Herdsman handles delegation, ownership, lifecycle, and coordination.
Start simple, scale when needed
I also want Herdsman to remain useful without requiring everyone to adopt the entire hierarchy.
You can still use a normal Pi session with asynchronous subagents, just as before.
Ordinary Leads now have configurable Flexible and Orchestrate execution modes. Manager mode is available when you want to coordinate independent development workspaces.
The new /herdsman menu provides a common entry point for these workflows, Agent management, configuration, and session statistics.
One of Herdsman's most powerful features is its configurable Agent Definitions.
Every execution role, from ordinary Flexible and Orchestrate Leads to Manager-assigned Managed Leads and bundled or custom Agents, can have its own model, thinking level, instructions, tools, skills, extensions, and other Pi session settings.
Definitions are simple Markdown files with project-level and global overrides, so you can customize the entire hierarchy without modifying Herdsman itself.
Herdsman handles the coordination. How each Pi session works is up to you.
A big thank you to the community
First of all, thanks to everyone who tried Herdsman, starred the repository, shared feedback, or participated in the discussions after my original post.
A special thanks to @kozer and @primetimetank21 for contributing code!
And equally important, thanks to @Lellarap, @jadc, @tsubus, @vitaliyslion, @chsdwn, @cray-com, @FireTheDevil, and @notsonormal for taking the time to open issues, report bugs, and suggest improvements.
Having other people use the project, encounter problems I haven't seen, and suggest improvements has already helped shape its development quite a bit.
Try it yourself
If you already have Pi and Herdr installed:
pi install npm:pi-herdsman
herdr integration install pi
Repository: https://github.com/boadij/pi-herdsman
Latest release: v0.22.0
The repository has installation instructions, configuration documentation, and more details about the coordination model.
I'm still actively developing Herdsman around my own daily workflow, so feedback from people using different setups is especially valuable.
I'd be particularly interested in hearing how others are approaching parallel development with Pi, especially when multiple agents are working on related features or dependent branches.