In this project, you’ll build a multi-agent AI system that taps into GitHub’s API to pull code diffs, test outcomes, and dependency data. It then uses this information to catch obvious mistakes—lint violations, missing tests, and vulnerability flags—and produces a short, clear comment for each pull request. Finally, it posts the review back to GitHub, so reviewers can dedicate their effort to the deeper review tasks.
Code review is a central part of every software development pipeline. It involves examining someone’s code changes by one or more developers other than the author. Reviews typically happen in a pull/merge-request workflow: you open a request with your changes, reviewers check your work, they leave comments, and—once all feedback is addressed—the code is approved and merged.
Code reviews make it easy to catch bugs early, maintain consistency, share knowledge, and improve maintainability. However, since reviews require humans to check the changes and provide comments, it may take a long time before reviewers are available to check the review. To save some time and effort, we can offload some of these routine tasks to an AI agent while allowing human reviewers to do the final checks and merging (if needed).
The agent would be able to perform common code review tasks and provide feedback. These would help catch obvious issues early and provide immediate feedback before human reviewers check the more complex issues. This is a high-level view of the architecture of the system we will be building:
System architecture showing all the agents.
Before we start developing our agent, we need to set up a repository to test it out. This demo repository helps us develop and refine our agent before using it in other code bases. The provided code is for a recipe API application built with Django and the Django Rest Framework to add, view, and manage recipes. You don't need to know Django or how this code works for this project, it is just a demo repository for testing (ideally, the agent should work with any repository given its URL).
You need to create this repository in your GitHub account so that you have full control of it. Go ahead and download the source code and extract it in a different folder from the one containing this project to avoid any conflicts. Once you’ve downloaded it, feel free to follow the instructions in the README.md file to run it locally.