# Get AI reviews in pull requests

> **Note:** AI Code Review is currently in alpha. To learn more about the terms & conditions, please see our legal page about features in Early Access

## Requirements

### SonarQube requirements

* You must have a SonarQube Cloud account.
* Your SonarQube Cloud organization must be on the Team or Enterprise plan. See [Plans and pricing](https://www.sonarsource.com/plans-and-pricing/sonarcloud/) for details.
* Each repository you want reviewed must have a corresponding organization and project bound to GitHub in SonarQube Cloud. See [Binding an unbound organization](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/binding-unbound-organization.md) for more details. If this connection doesn’t exist, AI Code Review will skip its review. If the connection exists but the analysis doesn’t succeed due to timeout, network issues, or other issues, then AI Code Review will fall back on the AI-only review.

### DevOps platform requirements

* AI Code Review currently supports GitHub. Support for Azure DevOps, Bitbucket, and GitLab is coming soon.
* Repositories must use pull requests as the code review workflow. AI Code Review triggers on pull request creation, update, and an explicit command through a comment.
* Draft pull requests are not reviewed automatically. Once you convert a draft pull request to a ready for review pull request, AI Code Review is triggered. See [Triggering a review](#triggering-a-review) for more details.

The following are not supported in the current release:

* Bitbucket, Azure DevOps and GitLab.
* SCA (software composition analysis) findings in reviews.
* Architecture findings in reviews.
* On-premises LLM / bring-your-own-LLM support.
* Repositories analyzed with SonarQube Server instead of SonarQube Cloud.

Once you install AI Code Review GitHub App on your organization’s repositories, no additional infrastructure, CI configuration, or external API keys are required. All processing happens within the Sonar platform.

## Setup guide

1. **Fill out the interest form**\
   Fill out the [interest form](https://docs.google.com/forms/d/e/1FAIpQLSdwCxqaIYmxyFeWC40CPID-qfrvIZnUjK06j-zDHKN973j88Q/viewform?usp=sharing\&ouid=103589099946429428731) to provide the information needed to add you to the allow list.
2. **Install the Sonar Review GitHub app**\
   Install the [Sonar Review GitHub app](https://github.com/apps/sonar-review-alpha) on your GitHub organization. Select **All repositories** or **Only select repositories** with read access to issues and metadata, and read and write access to checks, code, and pull requests. Then select **Install**.

## Triggering a review

AI Code Review runs automatically whenever a pull request is opened or updated.

Trigger or extend a review manually, even on a draft pull request:

* Comment `@sonar-review-alpha review` in a pull request comment.
* Tick the **Generate Walkthrough** checkbox in the bot's summary comment to request a step-by-step walkthrough of the changes.
* Tick the **Generate Diagram** checkbox to request an architecture diagram.
* To ask follow-up questions or challenge a finding, reply directly to any of the bot's review comments. AI Code Review responds with additional context and, where appropriate, refines its suggestion.

## Canceling a review

To cancel an ongoing review enter `@sonar-review-alpha cancel` in the PR’s comment.

## Using AI Code Review with agentic IDEs and CLIs

AI Code Review is designed to work with agentic coding tools such as Claude Code, Codex, and Cursor. When you ask your agent to review an open pull request, it reads AI Code Review's findings and acts on them directly.

To use this with your agentic IDE or CLI:

1. Ensure the DevOps platform CLI, for example `gh` for GitHub, or its MCP server is available in your environment.
2. Ask your agent to look at the pull request and fix anything AI Code Review has flagged.

## Troubleshooting

Post a description of the issue on the [Community portal](https://community.sonarsource.com/c/sc/9).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/agent-centric-development-cycle/how-to-guides/verify-your-code/get-ai-reviews-in-pull-requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
