r/LocalLLM • u/whowhaohok • 14h ago
Other Mind blown. Two coding agents working together
So, i have qwen38fn on my home server. I'm working on a mobile app that has a server side part to it. I have opencode running on my Mac for the mobile client and I have opencode running on the server for the server side stuff, so i thought it would be good for them to work with each other and it guided me to set up a tunnel so they can communicate. And they're collaborating on the same GitHub repo. I'm just, in awe ...
58
Upvotes
5
u/Significant-Word457 14h ago
I can't wait to build my other machine to try just this. How's the quality coming after several iterations can you tell? Because some of the stuff a single agent comes up with can be so far off the mark but I imagine if they bat it back and forth a few times it really sharpens things?
39
u/krayon_kylie 11h ago
i have a 4b as a permanent log watcher and health checker and i have the 27b as my main coding agent
and i have a small laneway where they can communicate with each other, and the sass between them is hilarious
5
u/createthiscom 6h ago edited 6h ago
I'd love to be able to afford a top tier mac studio so I could have one model working on the other machine's inference code, then have them team up when I'm not fucking around with inference code.
EDIT: I can't stand the way qwen38fn talks. I tried it again today for the first time in a few weeks and I immediately turned it off and spun up glm-5.3-flash to disinfect my eyes.
9
u/faisalkl 14h ago
I've got my second local agent up and running so it would be lovely to get a follow up on how you do this.
4
u/HambugerLips 12h ago
I've got small models running on truenas in ram, then strata (flash next) running on the workstation with a 3080ti, and my 16gb Mac mini 2 pro running a hermes-like frontend that helps facilitate what goes where and prompt generation. I've got the code in GitHub but not sure how interested folks would be
1
u/Fit_Enthusiasm4995 11h ago
I've been running two agents on separate local instances with git diff checks every 30s, works better than I expected, especially for catching merge conflicts early. how do you handle race conditions during sync?
3
u/TouristInternal7308 10h ago
id give both agents the same little API change: rename one response field in the server and mobile client. put each on its own branch and make both run the same contract test. if both say done but the combined build fails, that's the useful part. the tunnel got them talking; the test tells you whether they agreed.
3
u/BigDeezerrr 8h ago
Do you use herdr, have them both in the same OpenCode harness with one as a subagent, or are they in completely different harnesses just coordinating through github?
3
u/FerretBoom 8h ago
I skip multimodal setups and switch to graph context, enforcement of hexagonal design pattern, SOLID, especially separation of concerns, so 1 model is split into concurrent contracts but shares the same graph context. Each private thread gets 4k context, which is enough to build a module. I wrap the whole recursive loop with deterministic tools for repetitive tasks extracted from model logs, so sometimes a prompt does not even reach the model. Most patches are done deterministically.
Then I build a proxy that monitors requests and strips data not related to a given task.
1
u/drsmba729 11h ago
The key is to have one model be orchestrator and launch subagents of different models.
1
u/rdbmas 10h ago
My experience is the primary/sub agent relationship,though effective in some workflows. It tends to hallucinate when it's passing data back to the primary agent. Often times it's truncated or not the full story.