Guide for GitLab (Self-Managed)
Integrate the AI Code Review Agent into your self-hosted GitLab workflow.
Speed up code reviews by configuring the AI Code Review Agent with your GitLab (Self-Managed) server. In this guide, you'll learn how to set up the Agent to receive automated code reviews that trigger whenever you create a merge request, as well as how to manually initiate reviews using available commands.
Video tutorial
coming soon...
Prerequisites
Before proceeding, ensure you've completed all necessary prerequisites.
1. Create a GitLab Personal Access Token:
For GitLab merge request code reviews, a token with api
scope is required. Make sure that the token is created by a GitLab user who has the Maintainer
access role.

2. Authorizing a GitLab Personal Access Token for use with SAML single sign-on:
If your GitLab organization enforces SAML Single Sign-On (SSO), you must authorize your Personal Access Token through your Identity Provider (IdP); otherwise, Bito's AI Code Review Agent won't function properly.
For more information, please refer to the following GitLab documentation:
Installation and configuration steps
Follow the step-by-step instructions below to install the AI Code Review Agent using Bito Cloud:
Step 1: Log in to Bito
Log in to Bito Cloud and select a workspace to get started.
Step 2: Open the Code Review Agents setup
Click Repositories under the CODE REVIEW section in the sidebar.

Step 3: Select your Git provider
Bito supports integration with the following Git providers:
GitHub
GitHub (Self-Managed)
GitLab
GitLab (Self-Managed)
Bitbucket
Bitbucket (Self-Managed)
Since we are setting up the Agent for GitLab (Self-Managed) server, select GitLab (Self-Managed) to proceed.

Step 4: Connect Bito to GitLab
To enable merge request reviews, you’ll need to connect your Bito workspace to your GitLab (Self-Managed) server.
You need to enter the details for the below mentioned input fields:
Hosted GitLab URL: This is the domain portion of the URL where you GitLab Enterprise Server is hosted (e.g.,
https://yourcompany.gitlab.com
). Please check with your GitLab administrator for the correct URL.Personal Access Token: Generate a GitLab Personal Access Token with
api
scope in your GitLab (Self-Managed) account and enter it into the Personal Access Token input field. For guidance, refer to the instructions in the Prerequisites section.
Click Validate to ensure the token is functioning properly.

If the token is successfully validated, you can select your GitLab Group from the dropdown menu.
Note: You can select multiple groups after the setup is complete.
Click Connect Bito to GitLab to proceed.

Step 5: Enable AI Code Review Agent on repositories
After connecting Bito to your GitLab self-managed server, you'll see a list of repositories that Bito has access to.
Use the toggles in the Code Review Status column to enable or disable the Agent for each repository.

Step 6: Automated and manual merge request reviews
Once a repository is enabled, you can invoke the AI Code Review Agent in the following ways:
Automated code review: By default, the Agent automatically reviews all new merge requests and provides detailed feedback.
Manually trigger code review: To initiate a manual review, simply type
/review
in the comment box on the merge request and submit it. This action will start the code review process.
The AI-generated code review feedback will be posted as comments directly within your merge request, making it seamless to view and address suggestions right where they matter most.

Step 7: Specialized commands for code reviews
Bito also offers specialized commands that are designed to provide detailed insights into specific areas of your source code, including security, performance, scalability, code structure, and optimization.
/review security
: Analyzes code to identify security vulnerabilities and ensure secure coding practices./review performance
: Evaluates code for performance issues, identifying slow or resource-heavy areas./review scalability
: Assesses the code's ability to handle increased usage and scale effectively./review codeorg
: Scans for readability and maintainability, promoting clear and efficient code organization./review codeoptimize
: Identifies optimization opportunities to enhance code efficiency and reduce resource usage.
By default, the /review
command generates inline comments, meaning that code suggestions are inserted directly beneath the code diffs in each file. This approach provides a clearer view of the exact lines requiring improvement. However, if you prefer a code review in a single post rather than separate inline comments under the diffs, you can include the optional parameter: /review #inline_comment=False
For more details, refer to Available Commands.
Step 8: Chat with AI Code Review Agent
Ask questions directly to the AI Code Review Agent regarding its code review feedback. You can inquire about highlighted issues, request alternative solutions, or seek clarifications on suggested fixes.
To start the conversation, type your question in the comment box within the inline suggestions on your merge request, and then submit it. Typically, Bito AI responses are delivered in about 10 seconds. On GitHub and Bitbucket, you need to manually refresh the page to see the responses, while GitLab updates automatically.
Bito supports over 20 languages—including English, Hindi, Chinese, and Spanish—so you can interact with the AI in the language you’re most comfortable with.

Managing multiple GitLab groups in Bito Cloud
Bito Cloud allows you to connect and manage multiple GitLab groups for GitLab (Self-Managed) integrations. Use the instructions below to add or remove GitLab groups for AI code reviews.
How to add multiple GitLab groups?
You can connect more than one GitLab group to Bito for AI code reviews.
Follow these steps to add additional groups:
Go to the Repositories page.

At the top-center of the page, click the “+” (plus) icon next to the currently selected GitLab group name, then select Add group from the dropdown menu.

A popup will appear. Use the dropdown menu to select a GitLab group you want to add.

Click the Add group button.

Once added, all repositories from that group will be listed and available for AI code reviews under the default agent.
How to remove a GitLab group?
To disconnect a GitLab group from Bito Cloud:
Go to the Repositories page.

At the top-center of the page, click the three dots icon next to the currently selected GitLab group name, then select Manage groups from the dropdown menu.

A popup will appear showing a list of connected groups. Click the “✕” (cross) icon next to the group you want to remove.

Confirm the removal in the prompt.

Once removed, the repositories from that group will no longer appear in Bito or be included in AI code reviews.
How to select one or more GitLab Groups?
When you have multiple GitLab groups connected in Bito Cloud, the group name at the top-center of the Repositories page becomes a dropdown menu.
From this dropdown, you can:
Select a single group
Select multiple groups as needed
Select All groups
The list of repositories displayed below will update automatically based on your selection—showing only the repositories from the selected groups.

Screenshots
Screenshot # 1

Screenshot # 2

Screenshot # 3

Last updated