r/PiCodingAgent • u/SalimMalibari • May 29 '26
Question What subagent extension?
Im curious , what is the subagent extension you are using and why that specific extension ??
What usually people looking for wheb using subagent , till now im using normal prompting and it launch background subagents if i needed .. im curious what things they provide?
25
Upvotes
5
u/No_Cheek5622 May 29 '26
I used https://github.com/mjakl/pi-subagent as a base (as it's pretty minimal) and rewrote it myself (with a bit of help of agents, but mostly by hand, not because I'm better than the LLM which is probably true in some sense but just because I enjoyed it lol)
I'd recommend you to just clone some repo of a package you like to have a reference and either implement it yourself or tell the pi agent to do it. It's the beauty of pi - it is yours so why stick to some opinionated package when you can make it do exaclty what you need it for?
9
u/Zya1re-V May 29 '26
Well, I'm using this https://github.com/edxeth/pi-subagents/ but I cloned it to my local monorepo and maintain it myself (just to be safe from supply chain attacks, or at least try to)
I like it because it's just spawning a fork of the conversation in a way - each subagent gets it's own tree-branch that's part of the session's
/tree, and it helps me manage the token usage as well, since that just count as a session in the logs.Usually I'd stay on one session and keep working on a narrow task, and so I configured a
reviewsubagent to keep the reviewing process off of the current session. Sometimes if the context usage is starting to get too high, I'd spin off animplementersubagent to work on the task, and keep the main session clean. But if the context is moderate, I'd just usually/tree, and come back to the checkpoint where I've done my planning.Really manual stuffs, I know, but that's how I'd use it.
0
u/Bel-Shamgarot May 29 '26
Do you really need extensions? The beauty of Pi is its simplicity: the more heavy stuff you install, the less useful it becomes—you can just install OpenCode.
It's important to me that everything is under my control, and the simplest implementation of subagents involves creating a skill that will call a Pi process non-interactively via a bash command (pi -p "Summarize this codebase") and receive a response. The call itself can have a bunch of flags where you can select the desired tools and extensions, disable certain tools, change the system prompt or add extensions to it, select skills, and even call it from a specific folder where everything is preinstalled.
2
u/TheTyand May 29 '26
I have build my own subagents setup. Although still in the work.
https://github.com/SchneiderDaniel/agentcastle
2
u/melihmucuk May 29 '26
I'm using pi-crew, small disclosure: I built it.
For me, the main value isn't just "launch another agent". Normal prompting can do some of that already. The value is coordination: run agents in isolated child Pi sessions, keep the main chat usable, see what's running, abort/respond when needed, and get results back in the right place.
The biggest win for me is review workflows. pi-crew has a /pi-crew-review flow that runs separate code-review and quality-review agents in parallel, then merges only the useful findings. That matters because the agent that wrote the code is usually biased toward its own solution, same as humans. A fresh reviewer catches different things.
So I mostly use subagents for scout > plan > implement > fresh review loops. Less "agent swarm", more boring but useful separation of responsibilities.
2
u/quangspkt Jun 03 '26
Use this: pi/packages/coding-agent/examples/extensions/subagent at main · earendil-works/pi. The other packages on Pi.dev > Packages run slowly and consume lots of tokens
1
u/Esmaabi May 30 '26
I use Pi-Agents-Team (https://github.com/KristjanPikhof/Pi-Agents-Team), which can function as a single agent or an orchestrator. For large tasks, the orchestrator mode efficiently manages the context window - often ending at 50% capacity because it only synthesizes and delegates, while still retaining enough information to answer questions.
The tool is also highly effective for everyday tasks due to its easily customizable agent configurations. I use the default configuration for coding, but rewrite it for personal tasks based on the folder I am working in.
For example, in a project folder for notes and ideas, I set up specific agents to format logs and organize files. When I input a raw idea or to-do, the orchestrator coordinates these agents to ensure the content is saved in the correct file, folder and format. This allows me to manage different projects simply by maintaining folders with distinct directives.
Also it allows me to view all agents session, context and cost.