Install/run Using Bito Cloud

Deploy the AI Code Review Agent in Bito Cloud.

Bito Cloud offers a single-click solution for using the AI Code Review Agent, eliminating the need for any downloads on your machine. You can create multiple instances of the Agent, allowing each to be used with a different repository on a Git provider such as GitHub, GitLab, or Bitbucket (coming soon).

We also support GitHub Enterprise (self-hosted) and GitLab (self-hosted).

You need a Bito 10X Developer paid plan to get started. For more information about costs, please visit our Pricing Page.

Get a 1-month FREE trial of Bito's AI Code Review Agent.

Installation and Configuration Steps:

Guide for GitHub: Watch the step-by-step guide for setting up Bito's AI Code Review Agent on GitHub.

Guide for GitLab: Watch the step-by-step guide for setting up Bito's AI Code Review Agent on GitLab.

Follow the step-by-step instructions below to install the AI Code Review Agent using Bito Cloud:

  1. Before proceeding, ensure you've completed all necessary prerequisites for Bito Cloud.

  2. Log in to Bito Cloud with a workspace subscribed to the Bito 10X Developer plan.

  3. From the left sidebar, click on the "Explore Agents" menu to view all available Agents for installation.

Currently, we only offer the AI Code Review Agent. More dev agents are coming soon.

  1. Find the Code Review Agent in the list and click the "Create New Instance" button.

  1. Configure Agent:

    • Select Git Provider: Choose from GitHub.com, GitHub Enterprise (self-hosted), GitLab.com, or GitLab (self-hosted) in the dropdown menu.

      Note: When configuring the Agent for GitHub Enterprise (self-hosted) or GitLab (self-hosted), please whitelist Bito's gateway IP address 18.188.201.104 in your firewall to ensure Bito has access to your self-hosted repository.

    • Enter GitHub/GitLab (self-hosted) URL: If you selected GitHub Enterprise (self-hosted) from the Git provider dropdown mentioned above, you must enter the GitHub Enterprise (self-hosted) URL. Similarly, if you selected GitLab (self-hosted) from the Git provider dropdown, you must enter the GitLab external URL.

      • Note: This input field will only appear for self-hosted GitHub/GitLab.

    • Enter Git Access Token: Generate a Git Access Token from your Git provider (i.e. GitHub or GitLab). For assistance, refer to the guide in the Required Access Tokens section.

    • Agent Actions: This section contains all the actions that the AI Code Review Agent can perform. The Agent can execute these actions as part of a workflow or manually.

      • /review command: Initiate a manual code review by commenting /review on a pull request. It provides separate code suggestions for each detected issue below the code diffs.

      • Additionally, you can pass an optional parameter like /review #inline_comment=False to get code review in a single post.

    • Instance Name: Assign a unique alphanumeric identifier for your instance. You can invoke the agent in supported clients using @<instance_name> command.

    • Instance Description: Provide a brief description of the specific use case or project where this AI Code Review Agent instance will be deployed. This description will help you easily identify and manage it among multiple instances.

    • Save Configuration: Click "Save & view setup instructions" to complete the installation and access detailed instructions on configuring the new Agent instance with your repository using webhook.

  2. Add Webhook:

    • You will be directed to a page that provides a webhook payload URL and a secret key for setting up webhooks in GitHub or GitLab, along with a comprehensive step-by-step guide. Follow that guide to ensure a successful integration of AI Code Review Agent with your repository.

    Additionally, we have provided a step-by-step guide below to help you add a webhook in GitHub and GitLab.

Webhook Setup Guide

GitHub Webhook Setup Guide:

  • Login to your GitHub account.

  • Navigate to the main page of the repository. Under your repository name, click Settings.

  • In the left sidebar, click Webhooks.

  • Click Add webhook.

  • Copy the Payload URL from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitHub, and in Payload URL input field, paste the URL of the webhook endpoint you've just copied. This unique Webhook URL, provided by Bito Cloud, is designed to receive webhook payloads.

  • Select the Content type “application/json” for JSON payloads.

  • Copy the Secret token from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitHub, and in Secret token input field, paste the webhook secret token you've just copied. The Secret token is used to validate payloads.

  • Click on Let me select individual events to select the events that you want to trigger the webhook. For code review select these:

    • Issue comments - To enable Code Review on-demand by issuing a command in the PR comment.

    • Pull requests - To auto-trigger Code Review when a pull request is created.

  • To make the webhook active immediately after adding the configuration, select Active.

  • Click Add webhook.

GitLab Webhook Setup Guide:

  • Login to your GitLab account.

  • Select the repository where the webhook needs to be configured.

  • On the left sidebar, select Settings > Webhooks.

  • Select Add new webhook.

  • Copy the Webhook URL from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitLab, and in URL input field, paste the URL of the webhook endpoint you've just copied. This unique Webhook URL, provided by Bito Cloud, is designed to receive webhook payloads.

  • Copy the Secret token from the Setup Instructions screen on Bito Cloud. Then, navigate to the webhook creation form in GitLab, and in Secret token input field, paste the webhook secret token you've just copied. The Secret token is used to validate payloads.

  • In the Trigger section, select the events to trigger the webhook. For code review select these:

    • Comments - for on-demand code review.

    • Merge request events - for automatic code review when a merge request is created.

  • Select Add webhook.

Using the AI Code Review Agent

After configuring the webhook, you can invoke the AI Code Review Agent in the following ways:

  1. Automated Code Review: If the webhook is configured to be triggered on the Pull requests event (for GitHub) or Merge request event (for GitLab), the agent will automatically review new pull requests as soon as they are created and post the review feedback as a comment within your PR.

  2. Manually Trigger Code Review: To start the process, simply type /review in the comment box on the pull request and submit it. If the webhook is configured to be triggered on the Issue comments event (for GitHub) or Comments event (for GitLab), this action will initiate the code review process. The /review command prompts the agent to review the pull request and post its feedback directly in the PR as a comment.

    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 a new optional parameter: /review #inline_comment=False

It may take a few minutes to get the code review posted as a comment, depending on the size of the pull request.

Clone an Agent Instance

Quickly create a new Agent instance by duplicating the configuration settings of an existing one. Follow the steps below:

  1. Log in to Bito Cloud with a workspace subscribed to the Bito 10X Developer plan.

  2. From the left sidebar, select Configured Agents > Code Review Agent.

  1. A list of AI Code Review Agent instances configured in your workspace will appear. Locate the instance you wish to duplicate and click the "Clone" button.

  1. An edit form will open, pre-populated with the input field values. You can edit these values as necessary and then proceed to follow the installation guide mentioned above to install the new Agent instance.

  1. When you save the configuration, your new agent instance will be added and available on the Configured Agents > Code Review Agent page.

Delete Unused Agent Instances

You can delete an agent instance if you no longer use it. Follow the steps below:

  1. Log in to Bito Cloud with a workspace subscribed to the Bito 10X Developer plan.

  2. From the left sidebar, select Configured Agents > Code Review Agent.

  1. A list of AI Code Review Agent instances configured in your workspace will appear. Locate the instance you wish to delete and click the "Delete" button.

  1. A warning popup will appear; select "Yes" to confirm and proceed with the deletion of the agent instance.

Last updated

Logo

Bito Inc. (c) 2024