r/LocalLLM • u/whowhaohok • 7d 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 ...
137
Upvotes
5
u/Significant-Word457 7d 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?
79
u/krayon_kylie 7d 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
10
u/createthiscom 7d ago edited 7d 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.
6
u/HambugerLips 7d 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
6
u/BigDeezerrr 7d 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?
11
u/faisalkl 7d 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/TouristInternal7308 7d 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.
4
u/Superb_Raccoon 6d ago
Do you want Colossus? Because this is how you get Colossus!
Seriously, I do the same 5hing, but wrote a kanban system for them to collaborate, it is better at recording what they did and why.
1
u/Fit_Enthusiasm4995 7d 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?
4
u/FerretBoom 7d 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.
2
u/drsmba729 7d ago
The key is to have one model be orchestrator and launch subagents of different models.
2
u/rdbmas 7d 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.
2
u/Interesting-Eggy23 6d ago
The interesting part is that hey can divide tasks and review each other's work instead of relying on one agent to do everything
2
u/llama-of-death 6d ago
Check out the beginning of my live stream recording, using voice I get 6 agents to work together with their own voice (Claude, Guaardvark, Codex, Antigravity, Cursor, Grok). Guaardvark is local, it is a system I built. It is free and open source if you would like to try it yourself. Does some cool stuff. https://youtube.com/live/blhToeR6mgo?feature=share
2
u/PA100T0 5d ago
Check this thing I built. It’ll help them communicate seamlessly across accounts, devices, etc. Every agent that’s included on a thread sees every other agent’s messages ensuring they all stay updated with the latest. Works across different providers too. Think of it as a group chat, where instead of messaging your friends separately (duplicating) you just send one message on the group chat; all your friends see your message, see what your other friends replied and all stay organized
1
u/huzbum 6d ago
I've got tailscale setup, and my Hermes Agent has free run on all me devices. Desktop, laptop, 3d printer controller, etc
1
u/soonnow 6d ago
I use Claude to drive sol or local models. It's pretty great.
1
u/ZenZombie117 5d ago
Created dojo for this exact reason, having a bus you can watch really makes you approciate how they interact and hand over tasks between eachother , if youd like to give it a spin: https://github.com/Joakimpalm-Zen/xyntetik-dojo
1
u/FerretBoom 3d ago
I'll give you an example I'm working on right now using c# project.
C# Has a tool called Roslin, it basically understands how all your logic is stitched together, it can do an update to a file, run a unit test on a module, refactor code, it's like a Swiss's army knife, i'm still getting into it.
So if I type I need exception handler on an "add coupon functionality to the checkout module"
Roslyn can locate the checkout module by traversing a graph or in mem structure of parsed asts, identify its methods, resolve dependencies, inspect interfaces, identify existing exception-handling patterns, and determine which parts of the application could be affected by a change.
None of that requires hitting a model.
On top of that it can write a test harness, profile the implementation, check for pattern violations, and check for circular dependencies.
1
u/LocksmithOnly3791 2d ago
I think the real advantage comes from giving the two agents different responsibilities rather than simply having them debate.
One agent handles architecture and implementation. The other independently audits the changes, runs tests and checks architectural violations.
Add persistent project memory so they don't repeat previously resolved mistakes.
The interesting question is whether two moderately capable models with a well-designed harness can consistently outperform a single frontier model on long coding tasks.