Inspiration

Modern software teams spend a significant amount of time reviewing Merge Requests to ensure code quality, security, and maintainability. Manual reviews are often repetitive, time-consuming, and prone to overlooking vulnerabilities, performance issues, or missing test coverage. We wanted to build a solution that helps developers receive instant, actionable feedback directly within their GitLab workflow while reducing the burden on reviewers.

The GitLab Orbit Hackathon provided the perfect opportunity to create an AI-powered agent that integrates seamlessly with GitLab and demonstrates how AI can improve developer productivity and software quality.

What it does

Orbit AI Merge Review Agent automatically reviews GitLab Merge Requests using AI.

When a Merge Request is created or updated, the agent:

  • Receives GitLab webhook events.
  • Fetches Merge Request details and code changes using GitLab APIs.
  • Analyzes code using Llama 3.3 70B through Groq.
  • Detects potential security vulnerabilities.
  • Identifies code quality and maintainability concerns.
  • Highlights testing gaps and missing edge cases.
  • Generates a structured review report with recommendations.
  • Posts feedback directly back into the Merge Request.
  • Stores review history and findings for future analysis.
  • Exposes analytics endpoints for engineering insights.

The system is designed as reusable Orbit Skills and Flows, making it suitable for publishing to the AI Catalog.

How we built it

We built Orbit AI Merge Review Agent using a modern, production-oriented architecture:

Backend

  • FastAPI
  • Python 3.12
  • Async SQLAlchemy
  • PostgreSQL

AI Layer

  • Groq API
  • Llama 3.3 70B Versatile

GitLab Integration

  • GitLab REST APIs
  • GitLab Webhooks

Infrastructure

  • Docker
  • Docker Compose
  • Alembic Migrations

Orbit Components

  • Analyze Merge Request Skill
  • Analyze Issue Skill
  • Security Review Skill
  • Merge Review Flow
  • Issue Analysis Flow
  • Security Review Flow

The application includes structured logging, correlation IDs, middleware-based monitoring, automated testing, analytics endpoints, and a modular service-oriented architecture.

Challenges we ran into

Several challenges emerged during development:

  • Designing a scalable architecture while keeping the project hackathon-friendly.
  • Parsing and analyzing large Merge Request diffs efficiently.
  • Creating reliable AI prompts that generate useful and consistent review outputs.
  • Handling asynchronous GitLab API interactions and webhook processing.
  • Structuring reusable Orbit Skills and Flows.
  • Maintaining high test coverage across multiple services and integrations.
  • Simulating external services during testing without relying on live APIs.

Overcoming these challenges helped us create a much more robust solution than a typical hackathon prototype.

Accomplishments that we're proud of

  • Built a complete end-to-end GitLab AI review workflow.
  • Successfully integrated GitLab APIs, Webhooks, Orbit Skills, and AI services.
  • Implemented automated security and testing gap analysis.
  • Created a reusable Orbit architecture ready for AI Catalog publication.
  • Achieved 91% automated test coverage.
  • Developed 40 passing unit and integration tests.
  • Designed a production-ready FastAPI backend with structured logging and middleware.
  • Created analytics capabilities to track review quality and findings.
  • Delivered a fully containerized deployment environment.

What we learned

Through this project we gained hands-on experience with:

  • GitLab API integrations and webhook workflows.
  • Orbit Skills and Flow architecture.
  • Building AI-assisted developer productivity tools.
  • Prompt engineering for code review use cases.
  • FastAPI and asynchronous backend development.
  • SQLAlchemy 2.0 async patterns.
  • Automated testing and coverage optimization.
  • Designing scalable service-oriented applications.
  • Secure webhook validation and API integrations.

Most importantly, we learned how AI can augment software engineering workflows rather than replace them, helping teams review code faster and more consistently.

What's next for Orbit AI Merge Review Agent

Our roadmap includes several exciting enhancements:

  • Inline code suggestions directly on changed lines.
  • Automatic code fix generation for detected issues.
  • Multi-language code review support.
  • Advanced vulnerability detection with severity scoring.
  • Review trend dashboards and team quality metrics.
  • Historical repository intelligence and learning.
  • Slack, Microsoft Teams, and Discord integrations.
  • Automated test generation for changed code.
  • Support for self-hosted GitLab Enterprise environments.
  • Publication to the GitLab AI Catalog as a reusable Orbit Agent.

Our long-term vision is to evolve Orbit AI Merge Review Agent into a comprehensive AI-powered engineering assistant that helps teams ship secure, reliable, and high-quality software faster.

Built With

Share this project:

Updates