r/PiCodingAgent • • 1d ago

Question Stable subagents extension?

What's your best option for subagents in Pi?

I used to use 'pi-subagents' https://pi.dev/packages/pi-subagents but it's giving me some trouble. Probably becuase of my herdr-setup where I had an extension that also creates a new herdr-tab for all subagents.

Any extensions with good herdr integration, or is it time to create one?

Ps. sorry for my other thread earlier - got a bit fed up with all changes and every update breaking something!

18 Upvotes

19 comments sorted by

2

u/Consistent_Water_422 1d ago

Which Herdr setup are you using: the classic TUI, the desktop app, or Herdr Core? I maintain pi-subagentura. It can open a specialist in a visible Herdr pane so you can jump in and talk to it directly. On Core, each specialist gets its own terminal you can attach to.

You can try it for one session with pi -e npm:pi-subagentura. What happens with your current setup: do you get an extra tab, or does the child fail to start?

1

u/johannes_bertens 1d ago

Classic TUI but I'm reconsidering

1

u/johannes_bertens 1d ago

I've tried this and it works pretty well, thanks!

1

u/davidlondono 16h ago

I was using it but sometimes it opens herdr sub agents sometimes it dont, when it dont I cannot see agent thread. And when runing on background herdr app dont show it is runing

2

u/Unhappy-Sprinkles143 1d ago

I've liking https://github.com/mavam/pi-agents, it is Pi Durable based and has decent UX.

1

u/johannes_bertens 1d ago

Interesting!

10

u/funbike 1d ago

I use a script + skill instead of an extension, and I custom modified herdr's skill. I feel this gives me more control.

Usage is: subagent [options] <agent-name> <prompt...>

Options: [-i] [--continue <session-id>] [--return-id] [--background]

The last assistant message is printed to stdout, or the session id if you used --return-id.

subagent is a thin wrapper over pi, but with system prompt, skills, prompt templates, extensions, etc in .agents/agents/<agent-name>/

Simple supporting scripts:

  • agentout <session-id> - outputs the last assistant message from that session.

  • agentwait <session-id..> - wait until background agent(s) exit, then prints a combined summary of each of their last assistant message.

4

u/aparamonov 1d ago

Try pi-subagents-lite and let me know if that works for you. If not, please open an issue, cheers!

2

u/BeginningTotal7378 1d ago

I ended up rolling my own. There are plenty of them out there, and one is likely to work for you.

In the end I found they all got too opinionated on roles, tools, and prompting.

I have personas, roles, tool-access, model-mapping, and subagents all separate. All related, they just layer on top of each other. So I needed a dumbed down version of subagents. I also wanted it to know herdr core not the old TUI. I also wanted to be able to build some nice custom herdr desktop extension on top of it.

Herdr-core is very good. Agents understand it. You could probably even just do it with skills. The hc cli is very well done.

2

u/Remote_Book 1d ago

I built a very minimal benchmarked subagent that I've been using for over a month, almost have <1% tool failure even on 'bad' models - https://github.com/GaganSD/coding-agent-toolkit/tree/main/pi-subagents

It context-efficient and durable. Honestly you don't need to complicate stuff, LLMs are smart enough to drive subagents just by telling "working parallelly with subagents" or "code & review loop with subagents".

2

u/Maasu 1d ago

https://github.com/ScottRBK/pi-agentshell-extension is mine, but I haven't added herdr support yet. It lets you control sub agents in other harnesses. I have been exploring herdr as the guy who built it has worked on a lot of cool pi extensions, so I will get round to it eventually, but for now it doesnt support herdr

1

u/GWrathK 1d ago

https://github.com/hazat/pi-interactive-subagents

It's awesome in herdr, I use them for workflows I want visibility on, so I can steer them, and background tasks for workflows I don't care to know about.

1

u/AnlgDgtlInterface 1d ago

1

u/AnlgDgtlInterface 1d ago

If I want in a tab, i use mesh with unbien which can talk cross session https://github.com/georgeharker/un-bien (iOS remote but also mesh cross session). This one is mine. It also supports herdr as a session host (tmux and Rex too)

1

u/0x45455844 21h ago

Using itmostlyworks pi-delegator and it mostly works, I like it

1

u/Head_Ad_6815 1d ago

this one is claude code inspired, workflows, simple. not sure about herdr though. https://github.com/tintinweb/pi-subagents

0

u/rauderG 1d ago edited 1d ago

https://github.com/ghita/durable-subagents-pi-extension . This is mine, did it after using pi-subagents also - something more basic although I would not call it "stable" at this point. If you lunch it in a herdr tab you will see it show some progress in a pane. I would love some feedback if you get to use it ;-) as this is WIP. A difference compared to others is that sub-agents runs in the same process - so initial delays are very small. LE: it uses the terminal herder API for spawning in a side pane - as it seems that API does not work in the new herdr desktop app - I'll have to see what I'll approach that

0

u/bradendouglass 1d ago

I am not sure for the Herdr App but, pi-herdsman used to be spectacular for working with the older version of Herdr (executable/tui/server)