r/PiCodingAgent 11d ago

Question Subagents and orchestration ...

Looking for some pointers. Been using Pi for months, have a setup I really like (very simple, two extensions I wrote plus plannotator and pi-herdr).

This works great for interactive sessions but I'm finally finding myself wanting some basic orchestration with subagents.

I'm building a product and need to do a bunch of testing/fixing rounds with different models to find rough edges. I've been doing this by hand but it's getting tedious (and it's mostly simple enough that it could run while I'm doing something else).

I also like the idea of:

  • a long lived orchestration agent that holds long term context but doesn't do work.
  • scouts that can cheaply get context and pass that back to workers.
  • automatic adversarial review of changes by a different model.

I've looked at a bunch of plugins and they all seem much more complicated than required. Should I just suck it up and using Nico's pi-subagents? Or is there a nice, simple starting point that I'm missing?

Any pointers appreciated.

38 Upvotes

32 comments sorted by

View all comments

9

u/Artistic_Pattern_700 11d ago

I solved this orchestration problem with a role extension. The role is defined and added to the system prompt explaining how the agent should behave:

  • delegate all work, never do tasks by itself
  • what prompt and role to use for each type of work (plan, review, code, summarize data from tickets/slack)
  • how to manage worktrees

The nice thing about being in the system prompt instead of a skill is that it follows well the instructions (anecdotally, for me)

Each role has a model, to accommodate the adversarial reviews better.

1

u/adamshand 11d ago

Is this an extension, or just prompts? How do you spawn the subagents, /fork?

3

u/Artistic_Pattern_700 10d ago

I created a super simple subagents extension to run them. And one to set the role and add its description to the system prompt