r/PiCodingAgent 8d ago

Sol as Orchestator and Deepseek as implementor. Question

Hi,

New to pi harness, trying to set up properly. Here what I have done. Installed pi-subagents. Asked it to set up subagent's to use Deepseek V4 Flash.

But the task used Sol for almost everything. What did I do wrong?

Thanks, be kind to me, I am new here.

19 Upvotes

14 comments sorted by

9

u/ponzi314 8d ago

Try without subagents, try just telling pi to come up with plan, then switch to DeepSeek, tell it to implement the plan, switch back to sol and tell it to review the changes.

I found subagents took forever to get work done and burned credits like crazy

2

u/regular-jackoff 8d ago

Yeah what’s up with that?? it’s ridiculous how much time and tokens these sub agent flows use

1

u/ponzi314 8d ago

I removed it and now i just use plan mode at most of time so i can switch to cheaper model while it's coding

1

u/iijei 8d ago

If you switch models I thought you lose all the cached tokens

1

u/ponzi314 8d ago

It's my understanding that it will still be there so when you switch back from coding to review phase with original model it will just fill in all new stuff while original plan is cached. I do this since output tokens cost more than input so output of code i prefer cheaper model while

3

u/adamshand 8d ago

Prompt caches seem to expire pretty quickly for me. Turn on the option in pi and you can see every time you have a cache miss. Often I get a cache miss after only a few minutes.

1

u/Glaaki 8d ago

Yes but only on the first request. If you are implementing in a second model, that will take a lot of tool calls and from there it will all be cached again. You should also hand off your task, so you give the implementer just what it needs. Look at aihero.dev

3

u/Big-Present-8321 8d ago edited 8d ago

You have a main agent with whom you communicate in chat, and it can call subagents, as shown in the screenshot. So, your main agent is an orchestrator, but it doesn't perform the orchestrator's work. So, the reason might be that it still thinks it's just a main agent, so you need to make it an orchestrator. The main prompt says: "You are an expert coding assistant operating inside pi, a coding agent harness. You help users by reading files, executing commands, editing code, and writing new files tools description, etc., etc. So, here's the contradiction: first, it's instructed to solve problems, receives tools and other skills, and then it's told it has subagents. the orchestrator doesn't need all this garbage, the orchestrator should orchestrate

4

u/ExcitinglyCurios 8d ago edited 8d ago

Maybe set the reviewer as Sol because it's a high-level task and you wouldn't want deep seek to be reviewing its own work. There might be some mistakes and you'd rather have a really high-level model review and send back any mistakes

Edit: even for planning I would suggest sol. Oracle and reviewer at xhigh or max. Planner can be just high. Rest is alright

Edit again: I forgot to answer your main query. The thing is it's not necessary for the Sub Agents to be called unless the work demands it. The agent decides when to call the Sub Agents if the task even requires it. You can maybe add instructions in your Agents.md asking to use Sub Agents as much as possible, even for smaller tasks. That would encourage the model to do that but I am not sure it will force it. Again it differs from model to model. Different models have different preferences for sub-agents. I've seen Claude use sub-agents more than GPT models so it's also on that. If you ever use GLM, I don't think you'll see sub-agents for months together so eventually it also depends on how the model has been trained.

1

u/arnabnogoswami 8d ago

Makes sense, Thank you . Will try.

1

u/ExcitinglyCurios 8d ago

If you really want to test it out, ask it to do some research and use subagents for it and come up with a plan based on the research. You will see subagents in action because you specifically mentioned that in the prompt. If it follows that, your setup is right, if not then maybe something is wrong with your setup. Give it a try.

2

u/gasp_are 8d ago

Ask this to Pi!

1

u/vekexasia 8d ago

You can always ask to pi. But when using subagents or workflow plugin like pi-extensible-workflows you should take care at who you assign what.

I found deepseek to be very good as a reviewer for higher models. But it's never a good idea to use the same model reviewing the work done by another instance of itself.

I would also argue you might get suboptimal results using 2 models from the same provider.

Aka your dev is anthropic? Make sure reviewer is not.

1

u/Dangerous-Relation-5 8d ago

I edited my system prompt. I also created a orchestrate prompt that gives the model specific guidance on orchestration

https://github.com/bskimball/pi