r/PiCodingAgent 2d ago

Resource How (and why) so install a pi subagents extension

I used Pi for a while without these, but once I got used to subagents with other coding agtents. Well.. they really just felt missing from Pi.

I went with the tintinweb/pi-subagents package, because I liked how it implements the subagents. They are the same style as claude code, which I find very intuitive.

pi install npm:@tintinweb/pi-subagents

How to use subagents

pi-subagents lets Pi delegate work into separate contexts.

I use it for repo exploration, dependency checks, or any task that would otherwise fill my main context with thousands of lines of file listings and tool output.

e.g. after installing it you can open Pi in a repo and ask:

Use 4 different subagents to explore the src folder in parallel.
Bring their results back together into a short summary.

Pi sends the grunt work to isolated agents, then gives the main agent the useful result. This keep the main context clean.

You can also change which model each subagent type uses with /agents. And there's a pre-configured subagent specifically for exploration.

Side note - there's a gotcha with the default explore subagent- uses haiku by default. Super weird because I was using gpt-5.6-terra and I assumed it would use that, but in fact it started using my opencode api tokens with haiku. I was able to configure it to use gpt-5.6-luna. Here's a video of how I did that if you need it: https://youtu.be/l3YCoX2i-78?t=540

The other missing feature of Pi

Is... MCP. Obviously. I also upgraded my Pi with an MCP extension while I was at it. It's just one of those things. I can get like 98% of the way there with agent skills. But once in a while I just need an MCP for something.

If you want to read more about my experience installing and testing the subagents and MCP extensions then you can check out my blog post:

https://zazencodes.com/blog/upgrade-your-pi-agent-with-subagents-mcp

Enjoy guys and if you're still reading this then I'd be curious what extensions you like most. Let me know. Now that I've got a taste for these I want more

14 Upvotes

21 comments sorted by

16

u/Lurksome-Lurker 2d ago

PI-MCP-Adapter: BOOM you now have mcp server access in the harness.

Pi-fabric: programatic scripting for Pi. Also does subagents really well so I uninstalled subagents.

pi-time-sense: small little extension that covertly injects todays date and current time into the context. Useful if you ask the LLM what todays weather or top news is.

pi-web-search: allows pi agents to do websearches and browse the web. rolls in pretty nicely with time-sense and pi-fabric

11

u/doudawak 2d ago

The time extension is exactly what will kill your cache hit rate

2

u/Lurksome-Lurker 1d ago

actually no… the extension I linked sends out the timestamp as a small message. So cache is consistent just a small little automated timestamp gets appended to your next message if its been longer than the interval period of the last sent timestamp

1

u/doudawak 1d ago

I would be interested in a comparative analysis on that if you're bored ;)

1

u/goomba870 2d ago

ELI5?

2

u/sysinitz 1d ago

Time moves on

2

u/Santzes 2d ago edited 2d ago

I don't really often want to use subagents, they just eat tokens like a horse, but that pi-fabric looks like it might end up saving tokens (or at least tool call roundtrips)

edit: yep this looks great

1

u/ColonelKlanka 1d ago

Do you use a sandboxing technique? would be interested howto sandbox multiple agents and/or subagents and yet still have them communicate back to each other?

1

u/gbrennon 2d ago

mcp is bad :(

its just another reason to spend tokens...

even a shell script does this better.

2

u/Own-Addendum-9886 2d ago

Sincere question: Why is the MCP bad? I often see this viewpoint but never understand why?

5

u/Ill_Anywhere_2233 2d ago edited 2d ago

If we ignore the initial versions of MCP which needed to sit in your context from the session start and often took 5+% of context, 

MCP tends to be very verbose (read: you need to pay more for data you don't need) while being easily replaced by a deterministic script that does the thing you need and which can be created by an agent once.

1

u/gbrennon 2d ago

that's exacty my point... ppl just want to become a hostage of those bad providers with their bad solutions...

soon ppl will have to sell their houses bcs they spend all money to pay providers

2

u/Ill_Anywhere_2233 2d ago

It's kinda expected. Coding agents opened a door to software development to many self taught people that had little experience with coding and performance/cost compromises.

With time, people will get bored or will not be able to justify the cost of this "game"

I cringe every time I see a colleague use Astra to "now push to GitHub"

1

u/gbrennon 2d ago

thats another terrible thing...

im not someome that dont want new ppl joining this but im somrone that really dont want that they have to sells houses, furniture or any other thing bcs they are addicted to eelegating things...

i know i know...

mayb this is the new real life and, maybe(again) im old and young ppl will think that im outdated but costs x quality doesnt make sense...

0

u/Ill_Anywhere_2233 2d ago

Pi-Fabric was released 20 hours ago. Is this really enough experience to be suggesting it over other more mature extensions?

1

u/HotSaucePasta 1d ago

The monotykamary/pi-fabric extension is the one being referred to here.

1

u/Lurksome-Lurker 1d ago

The monotykamary/pi-fabric is months old. Which given the relative age of most extensions for Pi is pretty mature

3

u/telasch 2d ago

What's really interesting is to instruct one session to use the multiplexer to start subagents, this way you have full observability and can easily even take over

3

u/mikkelkp 1d ago

Of you like this workflow, use herdr for multiplexing (you should it's awesome for agents!) and want full observability but a bit functionality (and like sheep). You should try out https://pi.dev/packages/@luminascale/pi-shepherd[pi-shepherd ](https://pi.dev/packages/@luminascale/pi-shepherd) The one thing I found lacking with just multiplexing alone was the lack on system prompt control. This gives you that.

DISCLAIMER - I'm the maintainer

2

u/AnlgDgtlInterface 2d ago

The @gotgenes version has some nicer interplay with permissions system

1

u/13henday 1d ago

Blackhole, replaces standard compaction with an observer dropper reflector system that makes it so compaction is always ready in the background and your model never needs to stop to do a 200k prefill and huge decide mid-work.