Abstract
Software agents have emerged as promising tools for addressing complex software engineering tasks. Existing works, on the other hand, frequently oversimplify software development workflows, despite the fact that such workflows are typically more complex in the real world. Thus, we propose AgileCoder, a multi-agent system that integrates Agile Methodology (AM) into the framework. This system assigns specific AM roles—such as Product Manager, Developer, and Tester—to different agents, who then collaboratively develop software based on user inputs. AgileCoder enhances development efficiency by organizing work into sprints, focusing on incrementally developing software. Additionally, we introduce the Dynamic Code Graph Generator, a module that creates a Code Dependency Graph dynamically as updates are made to the codebase. This allows agents to better comprehend the codebase, leading to more precise code generation and modifications. AgileCoder surpasses existing benchmarks, like ChatDev and MetaGPT, establishing a new standard and showcasing the capabilities of multi-agent systems in advanced software engineering environments.
Introduction
While Large Language Models (LLMs) excel at generating isolated code snippets, building comprehensive software systems remains a significant challenge. Most existing multi-agent frameworks, such as ChatDev and MetaGPT, follow a linear "Waterfall" process: design, code, test, and finish. However, real-world software development is inherently iterative, requiring constant refinement and adaptation.
Furthermore, LLMs often struggle with "repository-level" understanding. As a codebase grows, the dependencies between files and classes can exceed an LLM's context window, leading to "hallucinations" or code that breaks existing imports. AgileCoder addresses these issues by combining the flexibility of Agile sprints with the precision of graph-based context retrieval.
The AgileCoder Framework
AgileCoder introduces two primary innovations to the multi-agent development paradigm: an Agile-inspired workflow and a Dynamic Code Graph Generator (DCGG).
Agile-Inspired Workflow
Instead of a single-pass execution, AgileCoder organizes work into Sprints. Each sprint follows a structured four-phase cycle:
- Planning: The Product Manager (PM) and Scrum Master (SM) select and prioritize tasks from a backlog.
- Development: A Developer (Dev) writes the code. This is followed by a rigorous review from a Senior Developer (SD) using a three-step static review process that checks for basic syntax, backlog compliance, and potential bugs.
- Testing: A Tester generates and executes test suites in a sandbox, providing feedback for iterative fixes.
- Review: The PM evaluates the deliverables. If requirements are unmet, tasks are carried over to the next sprint backlog.
Dynamic Code Graph Generator (DCGG)
To manage the context window problem, AgileCoder maintains a Code Dependency Graph (CDG). This graph maps the relationships between all files in the repository. When an agent modifies a file, the DCGG retrieves only the relevant "ancestor" nodes (dependencies). This ensures the agent has the necessary context to maintain system integrity without being overwhelmed by irrelevant data.
Experimental Evaluation
The researchers evaluated AgileCoder across three benchmarks:
- HumanEval & MBPP: Standard industry benchmarks for isolated Python programming tasks.
- ProjectDev: A new benchmark introduced by the authors containing 14 complex, multi-file software requirements, such as mini-games (Snake, Flappy Bird) and CRUD management systems. These tasks require managing complex logic across interconnected files.
Key Results
AgileCoder significantly outperformed its predecessors, particularly in complex, multi-file environments. On the standard HumanEval and MBPP benchmarks, AgileCoder (using GPT-3.5 Turbo) achieved 70.53% and 80.92% pass@1 scores, respectively, outperforming MetaGPT by approximately 6-7%.
On the more challenging ProjectDev benchmark, the performance gap widened. AgileCoder achieved an executability rate of 57.79%, while ChatDev reached 32.79% and MetaGPT struggled at 7.73%. Notably, AgileCoder produced zero runtime errors in its final deliverables for these tasks, whereas MetaGPT averaged 32 errors per project.
Efficiency metrics also favored the Agile approach. The system completed complex projects in an average of just 1.64 sprints, demonstrating that iterative refinement does not necessarily lead to excessive overhead.
Conclusion and Future Work
AgileCoder demonstrates that integrating Agile principles and graph-based context management can drastically improve the reliability of AI-driven software development. By allowing for "iterative inheritance"—where context and incomplete tasks are carried across sprints—the system mimics the adaptive nature of human engineering teams.
Future work will focus on scaling the Code Dependency Graph for enterprise-level repositories and integrating more advanced practices such as Pair Programming and automated CI/CD pipelines. While the system's intelligence remains tied to the underlying LLM, the AgileCoder framework provides a robust architecture for the next generation of autonomous software agents.
Summary updated