GitLab Integration

Last updated on Nov 11, 2025

Enable Optibot to analyze your GitLab repositories, automate code reviews, and generate contextual summaries.

Setup time: ~12–15 minutes
Required permissions: Maintainer or Admin on the GitLab group or repository.


Sign Up and Access the Integration Page

  1. Go to the Optimal AI signup page.

  2. Select “Sign Up with GitLab.”

  3. Complete your account details and verify your email address.

  4. After verification, you’ll be redirected to the GitLab Integration Setup page.


Create a GitLab Access Token

Optibot requires a GitLab Access Token from a bot or service account with specific permissions to interact with your repositories.

Steps:

  1. In GitLab, navigate to your group or repository’s Settings → Access Tokens.
    (Group tokens are recommended for multi-repository installations.)

  2. Click “Add new token.”

  3. Enter a Token name, e.g., Optibot-code-review or Optibot Reviewer.

  4. Add a short description, and set the expiration date to the maximum allowed.

  5. Assign the role as Maintainer.

  6. Under Scopes, select all of the following:

    • api — Full API access

    • read_repository — Clone and read repositories

    • write_repository — Create merge request comments

    • read_user — Access user information


Continue your setup on Optimal

  1. If you’re on a self hosted instance replace your URL from gitlab.com to your self hosted domain

  2. Insert your gitlab token in the gitlab token in the field

  3. Grab your Bot/User ID from the Admin page it can be found on the path gitlab.com/admin/users or on your gitlab url /admin/users

  1. Click on “Connect Gitlab”

  2. You will be taken to a screen to select your repos, select the repos you want Optibot installation to be on. This will create webhooks automatically in those repos

  3. Your install of Optibot should be finished and you can manage it from https://agents.getoptimal.ai/dashboard/gitlab-integration


Verify Installation

Once setup completes:

  • Optibot will begin analyzing merge requests automatically.

  • You can confirm installation by checking your GitLab Repository → Settings → Webhooks.
    There should be an entry for agents.getoptimal.ai.


Optibot Features on GitLab

Once integrated, Optibot enables:

  • 🧠 Automated Code Reviews
    Reviews each new merge request and provides detailed feedback directly in GitLab comments.

  • 🧾 AI-Generated Summaries
    Generates structured summaries and line-by-line breakdowns of code changes for every MR.

  • ⚙️ Contextual Recommendations
    Highlights potential issues, security concerns, or missing documentation based on code patterns.

  • 🔗 Cross-Tool Integration
    Works seamlessly with Jira, Bitbucket, and other tools for compliance and reporting.

For additional configuration options, visit the Advanced Configuration page.


Your Optibot GitLab integration is now complete.
From here, you can monitor and manage your integrations anytime at:
🔗 https://agents.getoptimal.ai/dashboard/gitlab-integration