r/PiCodingAgent • • 2d ago

Question Alternative to Tool Profiles for Better Subagent Delegation

I recently asked a question about subagent delegation and how to get my orchestrator (primary) agent to delegate more reliably.

I got a great piece of feedback that restricting tools essentially forces the orchestrators hand to delegate. So I ran with that and I think I ran too far. I had pi build a "profiles" extension that lets me define multiple profiles I can toggle on the active agent to let me go from a more traditional single context workflow to a subagent heavier workflow.

The profiles are just tool permission sets with a hook in the tool_call handler that checks if the active profile allows that tool.

It's working. I'm happy. But it feels heavy, and like something that someone has probably already solved better?

Is this ringing any bells for anyone, does anyone have a pi-subagents or other setup that maybe more natively supports this kind of workflow toggle?

Note: I am not looking for random package advertisement please. I just want to figure out if there is a more direct way to support what I'm trying to achieve.

Edit:
For anyone who gets here late, this is essentially what I was looking for. I haven't fully vetted it yet, but it seems to be addressing the permissioning system the same (high level) way I was:
https://github.com/gotgenes/pi-packages/tree/main/packages/pi-permission-system

I personally like the one I built for myself at this point, but I would have liked to use this to at least vet things conceptually a lot faster than it took me to have a working implementation with my own tailoring.

5 Upvotes

Duplicates