Inspiration
Every developer knows the pain: a bug gets reported in GitLab, and before writing a single line of code, you've spent 30 minutes reading the issue, hunting through the repo, creating a branch, and writing a merge request description. We wanted to build an agent that handles all of that — autonomously, but always with a human in control of the final call.
What it does
PR Pilot is an autonomous GitLab merge-request copilot for small dev teams. You paste a GitLab issue URL, and the agent:
- Reads the issue title and description from GitLab
- Scans the repository file structure to understand the codebase
- Proposes a step-by-step fix plan and identifies the exact file to edit
- Waits for your explicit approval (the Human Approval Gate)
- Generates a code patch, creates a new Git branch, commits the fix, and opens a Merge Request with a professional reviewer summary
How we built it
- Backend: FastAPI (Python) orchestrates a multi-agent pipeline — a Planner Agent, a Patch Agent, and a Summarizer Agent — each powered by the Google Gemini API (gemini-2.0-flash).
- GitLab Integration: The
python-gitlablibrary handles all real repository actions: reading issues, fetching file trees, creating branches, committing patches, and opening MRs. - Frontend: A React + Vite UI styled with TailwindCSS, featuring a dark-mode design with step-by-step status states and a clear approval gate.
Challenges we faced
- Ensuring Gemini returned structured JSON reliably for the planning step required careful prompt engineering.
- Handling GitLab's fine-grained token permission system to allow the agent to write to repositories.
- Keeping the human approval gate front-and-center so the agent never takes irreversible action without consent.
What we learned
Building a true agent (not just a chatbot) means designing around tool use, multi-step reasoning, and real-world side effects. The hardest part is not the AI — it's the "guard rails" that make it trustworthy.
What's next for PR Pilot
- Support for multiple file edits in a single patch
- Slack/Discord notifications when the MR is ready for review
- A task history dashboard so teams can track agent-created MRs over time
Log in or sign up for Devpost to join the conversation.