AutoDev: Automated AI-Driven Development

Michele Tufano, Anisha Agarwal, Jinu Jang, Roshanak Zilouchian Moghaddam, Neel SundaresanarXiv 2024 · DOI

Introduction

The landscape of AI-assisted software engineering is evolving from simple code completion to fully autonomous development. While current tools like GitHub Copilot offer "chat-and-suggest" capabilities, they often lack the ability to verify, test, or integrate their suggestions. This leaves the "heavy lifting"—building, testing, and debugging—to the human developer. AutoDev addresses this gap by introducing a framework where AI agents operate within a secure, feedback-driven environment, shifting the AI's role from a mere suggester to an autonomous developer.

System Architecture

AutoDev is designed as a multi-agent framework that bridges the gap between AI suggestion and execution. It consists of four core components that facilitate an autonomous development loop:

  1. Conversation Manager: Tracks interaction history and utilizes a Parser to extract commands from AI responses, while an Output Organizer formats environment feedback.
  2. Tools Library: Provides agents with a suite of capabilities including file editing (write/edit), retrieval (grep/find), build execution, and Git operations.
  3. Agent Scheduler: Orchestrates collaboration between different agent roles, such as "Developer" and "Reviewer," using algorithms like Round Robin scheduling.
  4. Evaluation Environment: A secure, sandboxed Docker container where all agent actions are executed, ensuring safety and isolation from the user's local system.
The AutoDev architecture, illustrating the flow between the Conversation Manager, Tools Library, Multi-Agent scheduler, and the sandboxed Evaluation Environment.

The workflow is inherently iterative: an agent proposes an action (e.g., "run this test"), the environment executes it, and the resulting logs—including compiler errors or test failures—are fed back to the agent. This allows the AI to perform self-correction, mimicking the actual workflow of a human engineer.

Methodology and Evaluation

The framework was evaluated using the HumanEval dataset, a standard benchmark of 164 Python programming problems. The researchers tested AutoDev on two primary fronts:

  • Code Generation: Writing functional code from docstrings.
  • Test Generation: Creating unit tests for hidden solutions, measured by coverage and correctness.

Unlike many competitors that require specialized fine-tuning, AutoDev operates in a zero-shot manner. It relies purely on the iterative feedback loop provided by the environment to achieve high performance.

Performance and Benchmarking

AutoDev demonstrates state-of-the-art performance on the HumanEval benchmark. By utilizing the iterative feedback loop, it achieved a 91.5% Pass@1 score using GPT-4. This significantly outperforms the zero-shot GPT-4 baseline of 67% and rivals specialized methods that use extra training.

Comparison of AutoDev against other leading approaches on the HumanEval benchmark, showing its superior performance without extra training.

In addition to code generation, AutoDev excels at test generation, achieving an 87.8% Pass@1 with a staggering 99.3% code coverage on successful attempts. Efficiency metrics show that tasks are typically completed in 5.5 to 6.5 steps, indicating that the autonomous loop is concise and effective at avoiding "hallucination" loops.

Conclusion and Future Work

AutoDev represents a significant step toward autonomous software engineering. By providing AI agents with the tools to execute and verify their own code within a secure environment, the framework achieves high accuracy without the need for extra training. While currently tested on isolated functions, future work will focus on scaling these capabilities to complex, multi-file repositories and integrating AutoDev directly into IDEs and CI/CD pipelines to automate PR reviews and bug fixing.

Summary updated

BibTeX
@misc{tufano2024autodev,
  author = {Michele Tufano and Anisha Agarwal and Jinu Jang and Roshanak Zilouchian Moghaddam and Neel Sundaresan},
  title = {{AutoDev: Automated AI-Driven Development}},
  year = {2024},
  eprint = {2403.08299},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.08299},
}
Figure