r/LocalLLM • • 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

29 comments sorted by

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?

2

u/whowhaohok 10h ago

It was actually pretty smooth. I think they coordinated with each other for the app would communicate with the server. They guided me on the cloudflare tunnel and security policy setup. Really painless

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

40

u/krayon_kylie 11h ago

halcyon fucking hates lux

13

u/createthiscom 6h ago

this is the craziest shit I've read all day

1

u/mavadavialcul 1h ago

And this is a single hobbyist working on consumer hardware. Imagine what companies with hundreds of world level experts working together and datacenters worth billions of dollars are doing.

7

u/jangle_bo_jingles 6h ago

Wow - this reads like something from a Iain M Banks novel

11

u/HomicidalHam 10h ago

This is giving me a "the future is now" moment. Any idea why the poetic talk? 😅

17

u/krayon_kylie 10h ago

no lol. the 4bs personality parameters are basically you check the logs, be blunt and speak on hard facts. prefer to verify in multiple ways over assume.

i do describe her as "the lighthouse thats always on" but shes really taking to too far

8

u/eurydice1727 7h ago

Check temperature settings

8

u/krayon_kylie 6h ago

good call, 'lux' is just a standard qwen3 4b

but i could tune it, though i like the crazyness for now lol

5

u/createthiscom 6h ago

I guess LLM's get tired of passing butter after all.

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/oShievy 13h ago

Yeah more detail would be really cool here. How do you ensure that they don’t overwrite each other’s work?

7

u/PizzaUltra 13h ago

That’s what version control is for. The modern solution is git (released 2005), but SVN or even  Mercurial will do fine. 

1

u/oShievy 7h ago

I’ve used git simply for version tracking and archiving purposes, but now I’ve uncovered how to make this workflow possible and it’s very cool. Seeing the two agents communicate w one another live is wild. Using git worktrees in paseo

2

u/krayon_kylie 11h ago

git checkpoints and a hierarchy of command

2

u/RuxConk 10h ago

Use git. Selfhost something like vikunja for tickets, kanban/board and then have a workflow defined for them to follow (usually in agents.md or as a skill). Tell them to work on tickets and review tickets.

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?

1

u/whowhaohok 9h ago

One noticed it was overwriting the other and rolled back and then added afterwards without overwriting the other agent

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.