aider icon indicating copy to clipboard operation
aider copied to clipboard

how to add a multi-agent flow ?

Open kirilligum opened this issue 1 year ago • 2 comments

  1. what is the plan of aider.chat regarding multi-agent coding? there are two papers https://arxiv.org/pdf/2405.11403v1 and https://arxiv.org/pdf/2402.16906v6 that use multiple llm calls (and debugger for one of them) do very very well on benchmarks https://paperswithcode.com/sota/code-generation-on-humaneval
  2. i'm happy to help to implement. is there a guidelines? should be multiple prompts with usage of interpreter (/run) that already exists. in the past i used a scratchpad.md file to keep track of multiple llm calls but maybe there are ideas for a more efficient way

kirilligum avatar Sep 30 '24 14:09 kirilligum

@kirilligum There is a new blog post about splitting tasks into an architect and editing prompt: https://aider.chat/2024/09/26/architect.html

Maybe this answers your first question?

RobYed avatar Oct 01 '24 06:10 RobYed

it does answer the question of breaking down into 2 prompts. I'd love to know the overview of how it was made or which branches can I diff to see what files where changed to add the architect mode.

but I'd like to be able things like reflection to be automatic. I want to define /reflection command for example or /mapcoder that breaks down into a few tasks like in the paper. or add using breakpoints like the other paper.

On Tue, Oct 1, 2024, 02:03 Robert Dey @.***> wrote:

@kirilligum https://github.com/kirilligum There is a new blog post about splitting tasks into an architect and editing prompt: https://aider.chat/2024/09/26/architect.html

Maybe this answers your first question?

— Reply to this email directly, view it on GitHub https://github.com/paul-gauthier/aider/issues/1839#issuecomment-2384872232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO2TVLJ7MNWHYNX6Y6HJZDZZI3KPAVCNFSM6AAAAABPDNLTCOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBUHA3TEMRTGI . You are receiving this because you were mentioned.Message ID: @.***>

kirilligum avatar Oct 01 '24 12:10 kirilligum

Thanks for trying aider and filing this issue.

Aider is currently intended to be an interactive tool. Agentic behavior is often slow, expensive and prone to going down rat holes which don't solve the user's problem.

paul-gauthier avatar Oct 07 '24 20:10 paul-gauthier

Also interested in this concept of having multiple agents (possibly using different models) with their various use cases (debugging/commit message/pr review/documentation) as has been started with the architect and editor. Looking at things like openai/swarm this seems feasible? Going down rat holes is something an interactive user can prevent, which is where aider has a headstart

ikriz avatar Oct 16 '24 11:10 ikriz

@paul-gauthier makes sense, interactive workflow is different then working with agents. furthermore, research on agents is very fast and top agents change every couple of months.

I was thinking more of it as a plugin rather than a core feature. for that we would just need an example, maybe something like an overview of how architect works to get started. Specifically, which .py files to look at and how architect interacts with the rest of aider.

kirilligum avatar Oct 19 '24 21:10 kirilligum

This issue has been labelled stale because it has been open for 2 weeks with no activity. Remove stale label or add a comment to keep this issue open. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Nov 03 '24 02:11 github-actions[bot]

I'm closing this issue because it has been stalled for 3 weeks with no activity. Feel free to add a comment here and we can re-open it. Or feel free to file a new issue at any time.

paul-gauthier avatar Nov 11 '24 16:11 paul-gauthier

First off - Thank you Paul and all the contributors of this amazing tool!

Now that there are popular agentic tools like Cursor agent and Windsor in the market, I think there is an appetite for an agentic mode with in Aider tool.

r4ravi2008 avatar Dec 05 '24 06:12 r4ravi2008

Thanks for trying aider and filing this issue.

Aider is currently intended to be an interactive tool. Agentic behavior is often slow, expensive and prone to going down rat holes which don't solve the user's problem.

Hi Paul,

Given the recent changes, are you still following this approach? Do you think we are still not there ?

Thanks,

acsezen avatar Feb 06 '25 19:02 acsezen

@paul-gauthier @RobYed i have a suggestion of not-so-intrusive way to implement it. may be you can help.

I gave it a quick shot with aider.chat and failed. maybe someone who has a better idea of the code can put the prompt into aider and do it 10x faster then me? or tell me what to look into

here is the task:

 Task: Add a `/agent` command to aider that lets me run custom Python scripts to automate tasks or add features.

 Goal:  Create a new `/agent <python_file>` command in aider. This command will run the given Python script, providing it wi
 the current chat history. The script's output will be fed back into aider as if I typed it in.

 Example Agent:  A simple Python script `check_if_done.py` that, when run via `/agent check_if_done.py`, checks if the AI ha
 recently made a code edit. If so, it will print "check your code, are you done with the changes?" in the aider chat,
 reminding me to review the edits.

 Outcome: After these changes, I can use the `/agent` command followed by a Python script to extend aider's functionality wi
 custom agents.

(this task is aider's summary a long conversation with aider https://github.com/kirilligum/aider/blob/custom_agent_check_if_done/custom_agent_build_history_gemini-haiku.txt . the diff that i got to https://github.com/Aider-AI/aider/compare/main...kirilligum:aider:custom_agent_check_if_done)

ps. i found gemini-2-thinking to be a bit better planner and much quicker to iterate then o3-mini-high

kirilligum avatar Feb 18 '25 22:02 kirilligum

this is a simple example.. as the next step, i want check it done loop until there are no edits or till it ran 10 times

kirilligum avatar Feb 18 '25 22:02 kirilligum

@kirilligum Hi. I was wondering if you could share how things are going?

baramofme avatar Apr 29 '25 07:04 baramofme

I build an API gateway using litellm that does a few LLM calls. it's not interacting with the code so it can't get errors but can do test time compute . I'll try to upload the code

kirilligum avatar Apr 29 '25 07:04 kirilligum