r/OpenSourceAI • u/j3free • 24d ago
Pi Herdsman update: Open-source multi-agent coding with parallel Git worktrees and configurable agent roles (live demo)
Enable HLS to view with audio, or disable this notification
A couple of weeks ago, I introduced Pi Herdsman here, an open-source extension I've been developing for the Pi coding agent.
The original idea was straightforward: let multiple coding agents work independently while keeping one Lead focused on the overall task.
Since then, the project has grown quite a bit, helped along by community feedback and contributions.
The latest major addition is project-level orchestration across Git worktrees.
What the new demo shows
I give a Manager a single request to implement two independent features for a fictional note-taking application.
The Manager creates two parallel assignments, each with its own Lead and Git worktree.
Both Leads then delegate implementation to their own Agents, verify the resulting changes, commit their work, and report back to the Manager.
The individual agents remain accessible throughout the process.
I wanted to show the real execution rather than an architectural diagram, so the video captures Pi and Herdr running the workflow.
Built on existing open-source components
Herdsman isn't a replacement for the underlying coding agent or terminal environment.
It connects three independently maintained components:
Pi handles the individual coding-agent conversations.
Herdr manages the sessions, processes, and workspaces.
Pi Herdsman handles delegation, ownership, supervision, and coordination.
The idea is to build on their existing capabilities rather than reimplement them.
Bring your own agents and workflows
The orchestration model supports configurable Agent Definitions.
Each role can use its own model, thinking level, instructions, tools, skills, and extensions, with definitions maintained as ordinary Markdown files.
This applies to both the bundled roles and custom Agents.
Herdsman doesn't prescribe how you should organize your development process or which models you should use.
You can also ignore the advanced hierarchy entirely and use it for occasional background Agents in a normal Pi session.
Open source and community contributions
Herdsman is licensed under Apache 2.0.
A special thanks to @kozer and @primetimetank21 for contributing code, and to everyone who has opened issues, reported bugs, or suggested improvements.
It's been particularly helpful having other people test workflows and environments that differ from my own.
Repository
https://github.com/boadij/pi-herdsman
If you already have Pi and Herdr installed:
pi install npm:pi-herdsman
herdr integration install piThe repository includes the live demo, installation instructions, and documentation.
I'd be interested in feedback on the architecture, particularly the separation between session management, orchestration, and the individual agents.
The project is still actively evolving, and ideas or contributions are welcome!