Experiential Co-Learning of Software-Developing Agents (2024)

Abstract: Recent advancements in large language models (LLMs) have brought significant changes to various domains, especially through LLMdriven autonomous agents. A representative scenario is in software development, where LLM agents demonstrate efficient collaboration, task division, and assurance of software quality, markedly reducing the need for manual involvement. However, these agents frequently perform a variety of tasks independently, without benefiting from past experiences, which leads to repeated mistakes and inefficient attempts in multi-step task execution. To this end, we introduce Experiential CoLearning, a novel LLM-agent learning framework in which instructor and assistant agents gather shortcut-oriented experiences from their historical trajectories and use these past experiences for future task execution. The extensive experiments demonstrate that the framework enables agents to tackle unseen softwaredeveloping tasks more effectively. We anticipate that our insights will guide LLM agents towards enhanced autonomy and contribute to their evolutionary growth in cooperative learning. The code and data are available at https://github.com/OpenBMB/ChatDev.

heading: 1 Introduction
text: In the ever-evolving field of artificial intelligence, large language models (LLMs) have marked a transformative shift across numerous domains (Vaswani et al., 2017; Brown et al., 2020; Bubeck et al., 2023). Despite their impressive abilities, when dealing with complex situations that extend beyond mere chatting, these models show certain limitations inherent in their standalone capabilities (Richards, 2023). Recent research in autonomous agents has significantly advanced LLMs
†Equal Contribution. BCorresponding Author.
by integrating sophisticated features like contextsensitive memory (Park et al., 2023), multi-step planning (Wei et al., 2022b), and strategic tool use (Schick et al., 2023). This enhancement has expanded their capacity to effectively manage a broader spectrum of complex tasks, including social simulation (Park et al., 2023; Wang et al., 2023f; Hua et al., 2023), software development (Osika, 2023; Qian et al., 2023), game playing (Wang et al., 2023a; Zhu et al., 2023; Wang et al., 2023d; Gong et al., 2023), and scientific research (Huang et al., 2023; Liang et al., 2023). In order to study the cooperative dynamics of autonomous agents more pertinently, we choose software development (Mills, 1976) as an representative scenario, due to its complexity that demands a blend of natural and programming language skills (Mills, 1976), the processuality that often requires an in-depth understanding of coding and continuous alterations (Barki et al., 1993), and the objectivity of code that can provide quantifiable feedback (Compton and Hauck, 2002).
With the development of autonomous-agent technology, a successful breakthrough has been the integration of communication among multiple agents (Park et al., 2023; Li et al., 2023a; Qian et al., 2023). Representative methods epitomize this methodology by segmenting task execution into distinct subtasks. Through engaging in cooperative communication, agents participate in instructive or responsive conversations, collaboratively contributing to the achievement of a cohesive and automated solution for task execution. For example, in ChatDev (Qian et al., 2023), a recent agent-communication framework for software development, a reviewer agent in charge of an external compiler iteratively provides instructions for software optimization (e.g., completing unimplemented code, making functional changes, and debugging programs), to which a programmer agent then reacts to these instructions by appropriately up-
5628
dating the source code. The development of a more adaptive and proactive approach to task-solving by these agents marks a significant leap in autonomy, going beyond the typical prompt-guided dynamic in human-computer communications (Yang et al., 2024) and substantially reducing dependence on human involvement (Li et al., 2023a; Qian et al., 2023; Wu et al., 2023).
However, when confronted with a diverse range of task types, current multi-agent collaboration methods tend to handle each task independently, which largely stems from the absence of a methodology that can effectively incorporate the experiences accumulated from previously completed tasks (Qian et al., 2023; Chen et al., 2024; Park et al., 2023; Hong et al., 2024). Consequently, the inexperience nature frequently results in repetitive errors or unnecessary trial-and-error processes through multi-step task execution, ultimately necessitating additional human involvement especially when these methods are applied to real-world scenarios.
How do we design, gather, and apply useful experiences to enhance multi-agent collaboration? In this paper, we propose Experiential Co-Learning, a novel multi-agent learning paradigm designed to boost agents’ software-developing abilities through the utilization of experiences gathered from their historical communications. The method regards agents into two functional roles—instructor and assistant, involving three core modules: 1) the co-tracking module promotes communicative rehearsals between the agents, fostering cooperative exploration and the creation of procedural trajectories for various training tasks; 2) the co-memorizing module heuristically mines "shortcuts"1 from historical trajectories using external environment feedback, which are then preserved in their experience pools in an interleaved manner; 3) the co-reasoning module encourages agents to enhance their instructions and solutions by utilizing their collective experience pools when facing unseen tasks. The comprehensive assessment of collaborative processes between autonomous agents in diverse software development tasks reveals that the proposed framework significantly boosts collaborative efficiency and reduces the need for extra human involvement.
In summary, our main contributions include:
1The term "shortcut" is used positively to denote a more efficient pathway, unlike in some papers where it implies a superficial correlation (Geirhos et al., 2020).
• To our knowledge, this study is the first to integrate past experiences into the LLM-powered multi-agent collaboration. Through co-tracking, co-memorizing, and co-reasoning, this framework facilitates cooperative learning among two distinct agent types (instructor and assistant) by leveraging heuristical experiences extracted from their historical task execution trajectories.
• We propose to construct task execution graphs based on procedural trajectories, in which "shortcuts" linking non-adjacent nodes are extracted as experiences, which can effectively motivate agents to engage in shortcut thinking during reasoning.
• We conducted extensive experiments from multiple perspectives to validate the effectiveness of our framework. The findings highlight the enhanced quality and efficiency of agents’ collaborative behavior in software development.

heading: 2 Related Work
text: Trained on vast datasets to comprehend and manipulate billions of parameters, LLMs have become pivotal in natural language processing (Brown et al., 2020; Bubeck et al., 2023; Vaswani et al., 2017; Radford et al., 2019; Touvron et al., 2023; Wei et al., 2022a; Shanahan et al., 2023; Chen et al., 2021; Brants et al., 2007; Chen et al., 2021; Ouyang et al., 2022; Yang et al., 2024; Qin et al., 2023; Kaplan et al., 2020). Recent progress, particularly in the filed of autonomous agents (Zhou et al., 2024; Wang et al., 2023a; Park et al., 2023; Wang et al., 2023f; Richards, 2023; Osika, 2023; Wang et al., 2024), is largely attributed to the foundational advances in LLMs. These agents utilize the robust capabilities of LLMs, displaying remarkable skills in memory (Park et al., 2023; Sumers et al., 2024), planning (Osika, 2023; Chen et al., 2024; Liu et al., 2023) and tool use (Schick et al., 2023; Cai et al., 2024; Qin et al., 2024; Ruan et al., 2023; Yang et al., 2023), enabling them to operate independently in complex, real-world scenarios (Zhao et al., 2024; Zhou et al., 2024; Ma et al., 2023; Zhang et al., 2023; Wang et al., 2023b; Ding et al., 2023; Weng, 2023). Since agents like Reflexion (Shinn et al., 2023) showcase feedback-based improvement yet often lack cross-task experience, to enable an autonomous agent to improve through trial and error across various training tasks, ExpeL (Zhao et al., 2024) innovatively defines experience as a history
of successful task trajectories and utilizes these experiences for in-context reasoning.
Parallel to these attempts, the autonomous communication among multiple agents is now a promising paradigm, signaling a shift towards multi-agent collaboration paradigm (Park et al., 2023; Zhou et al., 2023; Chen et al., 2024; Chan et al., 2024; Chen et al., 2023; Cohen et al., 2023; Li et al., 2023b; Hua et al., 2023; Guo et al., 2024). Among them, software-developing agents facilitate the breakdown of complex tasks into more manageable, finer-grained subtasks (Hong et al., 2024; Qian et al., 2023). An instructor issues directional instructions, and an assistant provides relevant solutions, facilitating a streamlined workflow for task execution. This approach not only boosts productivity but also exhibits a degree of quality that surpasses the traditional prompt-guided paradigm in human-computer communications, reducing the need for manual involvement (Li et al., 2023a; Chen et al., 2024).

heading: 3 Experiential Co-Learning
text: Traditional multi-agent collaboration methods often neglect to accumulate experience from past tasks, leading to repetitive errors or unnecessary trial-and-error processes in similar future tasks (Qian et al., 2023). To remedy this, we propose Experiential Co-Learning, illustrated in Figure 1, powered by two distinct autonomous agents
and comprising three essential modules: 1) the co-tracking module establishes a rehearsal collaboration between an instructor and an assistant, focusing on tracking their cooperative "procedural trajectories" for various training tasks, showcasing clear strategies in their communicative collaboration; 2) the co-memorizing module heuristically extracts "shortcuts" from the trajectories under external supervision, integrating these heuristic shortcuts into their collective experience pools; 3) the co-reasoning module combines the two agents’ collective experience pools to foster an communication of augmented instructions and solutions, improving their ability to collaboratively solve unseen tasks.

heading: 3.1 Co-Tracking
text: The co-tracking module sets up a collaborative task execution between an instructor and an assistant, with the goal of tracking procedural trajectories for various training tasks (Qin et al., 2024). Each trajectory captures the dynamic progression of a specific task, detailing the evolving roadmap and clearly illustrating the interacted solutions throughout the task execution process.
Formally, in the set of training tasks T , each task t ∈ T fosters a functional interplay of communications between agents, streamlined towards the effective execution of the task. During this procedure, the instructor gives a series of instructions (I = {i1, i2, · · · , in}), to which the assistant
responds with a matching sequence of solutions (S = {s1, s2, · · · , sn}), where each solution represents an intact software code. This communicative dynamic can be naturally modeled as a directed chain G = (N , E):
N ={sj |sj ∈ S}∪{s0} E={(sj , ij+1, sj+1)|sj , sj+1∈S, ij+1∈I}
where N represents the nodes corresponding to the solutions (with s0 denoting the initial, typically empty solution), and E denotes the edges corresponding to the instructions. Each edge (sj , ij+1, sj+1) illustrates the transition from one solution sj to the modified one sj+1, guided by the instruction ij+1.

heading: 3.2 Co-Memorizing
text: We observed that not all progressions in the chain (i.e., a single round of software optimization) lead to better solutions. This includes solution backtracking, where optimization loops back to earlier content, and correct-to-failure degeneration, where functioning software is inadvertently changed into a unexecutive solution. These scenarios suggest some steps in the process are redundant or ineffective, indicating that solely memorizing complete historical trajectories may be insufficient for designing agents’ experiences. Thus, we convert the chain into a task execution graph to map nodes with the same content in the chain to a shared node in a redefined (←) graph:
N←{ϕ(sj)|sj∈N} E←{(ϕ(sj), ij+1, ϕ(sj+1))|(sj , ij+1, sj+1)∈E}
where ϕ is a mapping rule using a hash function (Sasaki and Aoki, 2009). This approach efficiently groups identical solutions and highlights repetitions, serving as a "state transition graph" throughout the task execution process, as visualized in Figure 1.
Furthermore, in a task execution process, each edge linking two adjacent nodes signifies one round of autonomous solution optimization by the agents, indicating that the agents have already possessed the corresponding decision-making capability for each existing edge. Hence, relying solely on existing edges might not suffice for the design of agents’ past experiences. For this purpose, the co-memorizing module is devised to heuristically identify shortcuts linking non-adjacent nodes on
the graph. These form the basis of the agents’ experience pools in practical reasoning, with the goal of accelerating future task execution.
Node Estimation Firstly, the score of each node sj in N is estimated using an external feedback signal, calculated in a pairwise manner:
ω(sj)=sim(sj , task)×sim(sj , s|N |)×[[sj ]]
where sim(·, ·) calculates the similarity between a node with another node or a task requirement, achieved through the use of an external code embedder and a text embedder, while [[·]] indicates a binary signal indicating whether compilation is successful via an external compiler. The heuristic scoring rule assigns high evaluations to solutions that meet the task requirements, resemble the final solution, and are validated by an external tool.
Shortcut Extraction To discover informative shortcuts, we selectively identify shortcuts linking non-adjacent nodes that exceed an information gain threshold ϵ:
S={(si, 99K sisj , sj)|si, sj∈N̄ ∧(si, ·, sj) /∈E ∧[[si→sj ]]∧ω(sj)−ω(si)≥ϵ}
where N̄ represents the nodes on the shortest path between the source node s0 (i.e., empty solution) and the sink node s|N | (i.e., final solution) in N , [[si → sj ]] indicates that sj is reachable from si. Since the instruction of each shortcut edge does not inherently exist in the trajectory, for the two nonadjacent nodes connected by the shortcut, we create a pseudo instruction 99K sisj that effectively links the two non-adjacent nodes using a standard selfinstruction mechanism (Wang et al., 2023e). This involves creating an instruction by comparing two distinct codes. This mechanism only extracts informative shortcuts on the shortest path and integrates compilation signals, naturally mitigating redundant solution backtracking and unexpected correct-tofailure degeneration.
Experience Gathering To leverage the heuristically-discovered shortcuts identified from historical trajectories as past experiences, the agents accumulate their own experience pools with key-value pairs for the future reasoning:
SI= ⋃
∀t∈T {(si,
99K sisj)|(si, 99K sisj , sj)∈St}
SA= ⋃
∀t∈T {( 99Ksisj , sj)|(si, 99K sisj , sj)∈St}
where St denotes the shortcut set extracted from a task t and T is the whole training set. This signifies that the instructor retains solution-to-instruction experiences to refine its instructional capabilities, while the assistant preserves instruction-to-solution experiences to enhance solution generation.
The design of shortcuts-as-experiences allows for an escape from the solution optimization capabilities that agents have already possessed in each step of their historical execution process, providing the possibility for more efficient shortcut-driven "accelerated" reasoning.

heading: 3.3 Co-Reasoning
text: The co-reasoning module is designed to combine the collective experience pools of agents, enabling communication through augmented instructions and solutions. By leveraging their respective experiential knowledge, these agents access and generate more refined answers, enhancing their collaborative task-solving abilities on unseen tasks.
The process begins with the instructor, armed with a solution-to-instruction memory SI , encountering the current task solution sj . It starts by using a retrieval tool to access experiential instructions that closely match the latent meaning of the query (Lewis et al., 2020). These instructions serve as few-shot examples (Zhao et al., 2024; Rubin et al., 2022; Min et al., 2022), guiding the instructor’s reasoning to produce i∗j+1, which is then shared with the assistant. The assistant, equipped with an instruction-to-solution memory SA, retrieves optimal solutions based on the received instruction. These solutions form the foundation for the assistant’s few-shot examples, culminating in the formulation of a new solution s∗j+1. This entire procedure can be represented as:
i∗j+1=I(sj , k(sj ,SI)) s∗j+1=A(sj ,k(i∗j+1, SA))
where k(q, s) denotes the retrieval of top-k matched results using q as a query in a key-value database s, I and A are the in-context reasoning functions of the instructor and assistant, respectively, utilizing few-shot examples.
In each communication, the solution obtained is used as the next step in the agents’ ongoing communication. This process for each task is represented as a sequence of pairs {(i∗1, s∗1), (i∗2, s∗2), · · · }, where each pair includes an experience-enhanced instruction and the corresponding solution.
4 Evaluation
Baselines We chose different types of LLMdriven software development paradigms as our baselines, which include both single-agent and multi-agent methodologies. GPT-Engineer (Osika, 2023) is a foundational single-agent approach in the evolving domain of LLM-powered software agents; its standout feature is its exceptional proficiency in accurately comprehending input task requirements and employing one-step reasoning, which significantly enhances its efficiency in producing comprehensive software solutions at the repository level. MetaGPT (Hong et al., 2024) is an innovative framework that assigns diverse roles to various LLM-powered agents and incorporates standardized operating procedures to facilitate agent collaboration in software development; within each substep, solutions are generated through a single-step solution by agents with varying capabilities. ChatDev (Qian et al., 2023) is an LLM-powered agent collaborative software development framework that organizes the entire software development process into waterfall-style phases (e.g., code completion, code review, and system testing); within this framework, software agents engage in task-oriented and multi-turn communications that play a pivotal role in enhancing software development quality by iteratively providing instructions and solutions during their communications.
Datasets We leveraged the SRDD dataset (Qian et al., 2023), which contains various software requirement descriptions. This dataset, reflecting categories from major software store platforms, was crafted to minimize redundancy while enhancing originality and diversity. It consists of 1,200 software requirements, systematically arranged into 5 primary categories ( Education, Work, Life, Game, and Creation). These main categories are segmented into 40 distinct subcategories, with each subcategory containing 30 unique tasks.
Metrics Evaluating software is a challenging task, especially when trying to assess it on a holistic level. Traditional metrics like function-level code evaluation (e.g., pass@k) cannot seamlessly transfer to a comprehensive evaluation of entire software systems. This is primarily because it’s often impractical to create manual or automated test cases for much of the software, particularly when dealing with complex interfaces, frequent communications, or non-deterministic feedback. As a solution, we use three quantifiable and objective dimensions to assess specific aspects of the software, and then
( ) and multi-agent ( ) paradigms. Performance metrics are averaged across all tasks in the test set. The highest scores are formatted in bold, while the second-highest scores are underlined.
combine these dimensions into a comprehensive metric for a more holistic evaluation:
• Completeness measures the software’s ability to fulfill code completion in software development, quantified as the percentage of software without any "TODO" code snippets. A higher score indicates a higher probability of automated execution.
• Executability assesses the software’s ability to run correctly within a compilation environment, quantified as the percentage of software that compiles successfully and can run directly. A higher score indicates a higher probability of successful execution.
• Consistency evaluates the alignment between the generated software and the original natural language requirements. It is quantified as the cosine distance between the embeddings of the text requirements and the source code. A higher score indicates a greater degree of compliance with the requirements.
• Quality is a comprehensive metric that integrates the aspects of completeness, executability, and consistency to assess the overall quality of software.2 A higher quality score suggests a higher overall quality of the software generated, implying a lower need for further manual intervention.
Implementation Details Our system explicitly encompasses essential phases such as code complete, code review, and system testing. In the co-tracking phase, we integrate GPT-3.5-Turbo as the foundational model, limiting communication rounds between agents to a maximum of 5
2To prevent over-complication, the quality metric is defined through the multiplication of completeness, executability, and consistency. Employing a simple average sum would produce similar results and conclusions.
ChatDev
MetaGPT
GPT-Engineer
50%
Win Rate (%)
Co-Learning
77.25%21.00% 91.41%8.59%
94.39%5.61%
59.00%41.00%
60.60%34.50%
50.00%42.00%
Co-Learning Wins Baseline Wins Draw Human Evaluation LLM Evaluation
0% 0%
1.75%
4.90%
8.00%
Figure 2: GPT-4 and human as the evaluators for pairwise comparisons of the solutions generated.
per phase. For co-memorizing, we select textembedding-ada-002 as the semantic embedder due to its exceptional performance in both text and code embeddings. We utilize MD5 as our hashing function, and Python-3.11.4 is employed to provide environment feedback. Agents have access to relevant tools like code checkers and compilers. Additionally, it applies an information gain threshold of 0.90 to retain informative shortcuts. In the co-reasoning module, this approach selects the highest-ranked result from code and text experience pools as the incontext example for reasoning. Besides, we divided the dataset into training, validation, and testing sets in a 4:1:1 ratio, using random hierarchical sampling to maintain a balanced category split. The training set is utilized for co-tracking and co-memorizing to gather experiences, the validation set for choosing hyperparameters, and the test set for co-reasoning. To maintain comparability in experimental results, all baseline models use identical parameters and environment settings.

heading: 4.1 Quality Analysis
text: According to Table 1, our method, abbreviated as Co-Learning, significantly outperforms all three established baseline models in terms of quality. The comparison with ChatDev, a powerful multi-agent framework, is particularly striking, as Co-Learning significantly boosts the comprehensive metric from
0.4267 to 0.7304, highlighting the effectiveness of utilizing agents’ past experiences in addressing unseen tasks. The efficacy of our method primarily stems from the agents’ proficiency in recalling and applying high-quality shortcuts from past trajectories, leading to notable enhancements in key performance metrics like completeness and executability for unseen tasks.
Moreover, Co-Learning outperforms GPTEngineer, illustrating the superiority of the multiagent approach in segmenting task-solving into discrete subtasks, in contrast to a single-step strategy. Through active communication, each agent contributes to a dynamic collaboration, steering towards cohesive and automated solutions for task execution. The effectiveness of this approach in task decomposition is further validated by contemporary studies (Wei et al., 2022b). Additionally, although Co-Learning requires more time compared to single-agent methods, it proves to be more timeefficient than other multi-agent approaches, suggesting that while multi-agent communications inherently take longer, the strategic use of "shortcut" patterns from past experiences effectively reduces reasoning time, striking a balance between performance and duration.
Upon closer examination, while Co-Learning exhibits notable strengths in the areas of completeness and executability, it demonstrates only a slight enhancement in the aspect of consistency. This result could likely stem from the embedding models’ broad-grained semantic representation capabilities for text and code, which might not be adequately sensitive to discern extremely nuanced inconsisten-
cies. This discovery presents an exciting research opportunity to develop advanced criteria and metrics for assessing software’s consistency with its text requirements, emphasizing the need for more refined evaluation methodologies.
To further validate the efficacy of our method from an alternative perspective, we drew inspiration from previous work (Li et al., 2023a), which adopts both GPT-4 and human participants for pairwise comparisons of the solutions producted by agents.3 Figure 2 illustrates that our Co-Learning method consistently surpasses other baseline methods, as evidenced by its higher average win rates in both evaluations involving GPT-4 and human participants. The results also reveal that ChatDev consistently demonstrates a notably high win rate compared to other baseline methods, indicating its strength as a robust baseline. This success is largely due to ChatDev’s approach of performing detailed task decomposition and software optimization via multi-round agent communications, effectively addressing potential shortcomings. The Co-Learning approach, akin to a ChatDev variant emphasizing experiential agents, highlights the importance of agent experience accumulation.

heading: 4.2 Efficiency Analysis
text: Recall that we explicitly construct a task execution graph in which shortcuts are heuristically extracted as agents’ experiences. In this section, we delve
3For each task, GPT-4 evaluation compares solutions from both methods, avoiding positional bias (Wang et al., 2023c). In the human evaluation, thirty computer science researchers assessed the software, with solutions from both methods randomly presented for their preference-based selection.
deeper into the graph analysis to uncover fundamental patterns in the task execution process by agents. For comparison purposes, we selected ChatDev as it represents the strongest baseline currently available. Figure 3 shows that, compared to ChatDev, Co-Learning trends towards fewer numbers in terms of the number of edges, nodes, and the length of the shortest path. This suggests a decrease in the number of iterations required for software development and a simplification of the solution space during software optimization. The enhancement in efficiency can be largely credited to the strategic utilization of shortcuts linking non-adjacent nodes in the graph, which enables agents to leverage previous task execution experiences while simultaneously boosting their future task-solving skills more effectively through the adoption of "shortcut thinking". In conjunction with Table 1 and Figure 2, this evidence demonstrates that the Co-Learning method streamlines the software development process by decreasing unnecessary iterations, thereby not only boosting overall efficiency but also delivering higher quality solutions with fewer agent communication.

heading: 4.3 Effectiveness Analysis
text: In this part, we delve into the distinct roles of instructors and assistants within the agentcollaboration framework, focusing on scenarios where either one agent alone has past experiences or both agents are inexperienced. As illustrated in Table 2, relying solely on a single agent leads to a marked decline in overall performance, manifesting in an increase in execution communications and a decrease in the quality. Furthermore, it is notable that systems with an experienced instructor perform worse than those with an experienced assistant (0.5305 vs. 0.6840), indicating the greater significance of the assistant’s role in task execution, despite both roles being essential. In situations where neither agent type has experience, the system reverts to its traditional technological capabilities, resulting in the least effective performance solutions. These findings highlight the necessity for both instructors and assistants to be experienced; systems lacking this or relying on only one experienced agent demonstrate diminished execution efficiency and quality.
To further confirm the effectiveness of the key mechanisms employed in our framework, we conduct experiments using three different configurations and the results are presented in Table 2, con-
sistently exhibiting a decline in performance. The adjacent-execution variant adopts the experiences of adjacent nodes from the original trajectories (after successfully compilation) rather than utilizing shortcuts, equivalent to ExpeL (Zhao et al., 2024). This approach leads to a significant increase in the number of experiences, ultimately resulting in a decrease in the quality of experiences. This, in turn, validates the effectiveness of the proposed "shortcuts-as-experiences" scheme. The longest-shortcut-only variant discards all intermediate shortcuts and exclusively relying on the "longest" shortcut that directly connects the start and end nodes. It reveals the underlying models’ limitations and its inability to handle new tasks using only single-step historical experiences, indicating an overstretch of the agent’s contextual reasoning ability. The graph-unconstructed variant extracts shortcuts directly from the original trajectory without constructing graphs. The obtained solution also reveals that over-dependence on past experience fails to achieve optimal performance, as it creates many shortcuts for possible graph nodes, leading to unnecessary repetition in the test set and decreasing task execution efficiency. This result confirms our observation that the progression of arbitrary adjacent nodes does not necessarily lead to continuously improved solutions. This emphasizes the significance of using heuristic shortcuts in deduplicated graphs to strike a balance between quantity and quality.

heading: 4.4 Sensitivity Analysis
text: In this section, we explores the effects of two key parameters in the co-reasoning process: k (the number of matched results in retrieval) and θ (the semantic similarity threshold utilized in retrieval). The results obtained from retrieval come in two forms: text and code, so the number of matched
results are denoted as ktext and kcode, ranging from 1 to 5, and the semantic similarity thresholds are denoted as θtext and θcode, ranging from 0.0 to 1.0 in increments of 0.20.
Figure 4 shows that the best retrieval performance is achieved under the configuration (kcode = 1, ktext = 2), surpassing the default setting (kcode = 1, ktext = 1). This indicates that although the proposed framework has already achieved success under its default setting, there is still potential for further improvement through hyperparameter optimization. Additionally, Figure 4 suggest that optimizing hyperparameters related with code yields superior outcomes than optimizing hyperparameters related with text, aligning well with the conclusions from our previous experiments. Figure 5 illustrates that the θ parameter has a limited impact on the results, which is attributed to the consistently high semantic similarity between the current query and the retrieval result, often surpassing 0.85.

heading: 5 Conclusion
text: Recognizing the absence of a mechanism for integrating cumulative experiences from past tasks in agent collaboration, we have proposed Experiential Co-Learning, a framework that encourages collaboration between autonomous agents. Through cotracking, co-memorizing, and co-reasoning, this approach enables agents to efficiently handle unseen software development tasks by drawing on past experiences and providing mutual support. The quantitative analysis effectively showcased significant improvements in quality, leading to reduced execution times, decreased repetitive errors, and a decreased reliance on additional human interven-
tion. We anticipate that our insights will initiate a paradigm shift in shaping the design of multi-agent collaboration, propelling agents towards achieving greater autonomy and contributing to their evolutionary growth in cooperative learning.

heading: 6 Limitations
text: Our study has explored the capabilities of cooperative autonomous agents, yet both researchers and practitioners should be mindful of certain limitations and risks. Firstly, the ability of autonomous agents to produce software might be overestimated. In co-learning, autonomous agents still tend to implement the simplest logic in absence of necessary and clear requirements, indicating that these technologies are more suitable for prototype systems rather than real-world applications. Secondly, unlike traditional function-level code generation approach, automating the evaluation of general-purpose software is exceptionally challenging. Though recent efforts aimed to employ Human Revision Cost (Hong et al., 2024), manual verification is still impractical. This paper instead focuses on three objective and crucial dimensions and a comprehensive quality. Future research need take additional dimensions like robustness into consideration.

heading: Acknowledgments
text: The work was supported by the National Key R&D Program of China (No.2022ZD0116312), the Postdoctoral Fellowship Program of CPSF under Grant Number GZB20230348, and Tencent Rhino-Bird Focused Research Program.

heading: Future Work
text: Future research need take additional dimensions like robustness into consideration