
Building a PR Review Agent: My Transition from Learning Scripts to Real Tools (Phase 3)
In Phase 1, I just tried to understand the mental model of what an agent actually is. In Phase 2, I built a basic toy agent from scratch using raw Python to figure out how the LLM tool-calling loop actually works under the hood. That was great for learning, but writing manual orchestrations for every tool quickly became a bottleneck. So for Phase 3, I forced myself to build something I could actually use, using a real framework. Here is what I built, and more importantly, what building it taught me. What I Built: A PR Review Agent Instead of an abstract "code analyzer," I built a dedicated AI workflow that: Takes a public GitHub Pull Request URL. Fetches the raw .diff . Analyzes the changes (lines added/removed, functions touched, nesting depth). Fetches the target repository's CONTRIBUTING.md guidelines. Generates a PR title and description matching the repo's rules. Because this evolved from a "learning script" into a standalone tool, I extracted it into its own repository: 🔗 GitHub
Continue reading on Dev.to Python
Opens in a new tab



