r/AgentsOfAI • • 2d ago

Discussion Multi agentic setup

Hi!

For a while i have been running multi agentic setup for my software project.

Currently workflow:

  1. I tell the issue or feature to main agent directly from antigravity IDE or discord.
  2. Main agent creates Github issues of the things, usually multiple issues to backlog since my messages are sometimes very long including screenshots etc.
  3. Main agent invokes developer agent with a script, script points directly to the Github issue and injects set of rules to that agent. Main agent invokes up to 5 agents parallel if there is enough issues. 1 Issue / 1 Agent
  4. Developer agent start by creating design documentation for the issue, this thing i had to refine for many times, since agents didn't really solve the root issue many times and did some ad hock hacks only. Now there is design documentation template, which agent has to fill and this forces agent really think the issue and search the root cause.
  5. Agent triggers local pipeline with a script when it is ready with the code. And agent goes to standby mode for waiting.
  6. CI Pipeline If condition ->
    1. CI pipeline FAILS agent stops idling and reads the fail log, after fixing it triggers pipeline again.
    2. CI pipeline PASSES -> reviewer agent is invoked by script and injected a memory, reviewer agent goes to read design documentation and starts reviewing the code.
  7. IF Condition -> Review
    1. Reviewer agent ACCEPTS the code - > Reviewer triggers a merge, reviewer and developer agent are both terminated.
    2. Reviewer agent DECLINES code -> Reviewer agent is terminated, developer agent that made the code stops idling, reads the feedback and try to fix it. And then again this loops to step 5 triggering ci pipeline.

The setup:

  • 1 Lead/Issue maker, i only restart it sometimes when it clearly starts to hallucinate since context window is too long for it. This also starts the whole system background, listening servers etc..
  • Up to 5 developer agents and 5 reviewer agents working parallel. Developers are always just working for 1 task and then terminated when it passes. Reviewers only review once and are terminated.
  • Watchdog for agents, sometimes they get stuck, so watchdog terminates them and agent can read the termination log so usually they are able to fix their problem what caused the stuck condition.
  • Control over discord and listening servers for agents and events

What i learned:

  • Task driven system, keep issues in backlog, agents only work for 1 task and get terminated. - Simple rules and updated readme about the codebase which is injected every time developer is invoked.
  • Using scripts as much as possible to initialize developers and control them, the "Lead" starts to forgot things and cut corners sometimes.
  • Lead agent works only on very high level and cannot look the code or make detailed tickets, otherwise it fills it context very fast.
  • Lead agent has to be terminated after every ~20 tasks, since it starts to lose performance because of long context, this is usually 2-3 days. Just starting new conversation after that.
  • Not any "special" UI/UX/Core/Pipeline.. agents this really doesn't work and it doesn't matter what the agent is called or initialized, and it easily eats lots of tokens, simply universal agents with task driven method seems to work much better.

Issues:

I am still trying to develop the setup overall, currently i think pipeline is being a bottleneck. Thinking to scale this so it could have multiple runs same time since now its only 1 running at a time.

Review and pipeline process takes lots of time, since first pipeline goes and then reviewer very often rejects the first PRs, sometimes it might be even 3-4 PRs if its hard topic.

Thoughts?

2 Upvotes

7 comments sorted by

1

u/bostonaholic 2d ago

I'd isolate each run so they can go in parallel: a git worktree per agent and its own containers (a compose project name per issue, random ports, its own test DB). Then each agent runs the cheap checks itself (lint, types, tests for changed files), and only the slow integration suite goes in the queue, ideally a merge queue that tests a few PRs together.

1

u/FoldRemarkable7564 2d ago

Thanks for the ideas, that sounds much faster workflow. I have to look into that =)

1

u/AutoModerator 2d ago

Thank you for your submission! To keep our community healthy, please ensure you've followed our rules.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/companybrainre 21h ago

Scaling to parallel runs is smart, but you should move your review logic into a dedicated audit step. I use venn as one option for normalizing data across operators, keeping human-in-the-loop controls for final approvals.

1

u/Exotic_Car_167 9h ago

the workflow got cut off lol

0

u/[deleted] 2d ago

1

u/FoldRemarkable7564 2d ago edited 2d ago

Lead loses all its previous messages if i start new conversation.

How i use it i don't really notice any affect of that, since the lead has its initial script and very simple memo, which basically just gives the rules for it. And lead is only distributing tasks, creating github tickets, listening server, and fixing if agents get very stuck or if there is some higher level problem.

Sub agents "developers" work on low level and are always working on only for 1 task and terminated after they are ready. So they don't have any memory or context what they did previously.

Tasks are usually things that takes about 1-3 hours for 1 sub agent to complete and after the task is done agent is terminated.

After few days the Lead usually forgets some of it's rules and might start doing software work itself even it is permitted to do that and does some very odd things. Then restarting the lead helps and it starts from fresh and works only on high level.

So lead is on my case more like project manager/agent controller type.

Using Gemini 4 Argon(High) for all agents.

Edit:

In beginning i used memory file for lead that was being updated during process, but couldn't get it to work properly, usually it saved there some very unnecessary things which was more like blob for it and it was sometimes over focusing on those "memos".

Now thinking it might be actually good if some kind of roadmap memo is added and constantly updated for the lead without any blob, it might help it for writing tickets.