Quickstart for Review Agents
Create a Depot Review Agent to review a code change for correctness, then inspect the results.
Prerequisites
- The owner role in a Depot organization.
- A GitHub repository with at least one commit and permission to install the Depot Code Access app.
Already have a connected Depot Code or Origin repository? Skip the GitHub connection step and select that repository instead.
Connect your GitHub repository
Review agents use the Depot Code Access app to read GitHub repositories. If you already use Depot CI with this GitHub repository, the app is already installed.
- Go to Organization Settings and click Connections.
- In the GitHub Code Access section, click Connect to GitHub.
- Install the app on the account or organization that owns your repository.
Create your first agent
-
Go to Review Agents.
-
Use the form under Create a review agent. If your organization already has agents, open Agents and click New agent.
-
Enter
Correctness reviewin Name. -
Paste these instructions into Prompt:
Review the change for correctness. Trace the changed code and its callers. Report concrete bugs introduced by the change, with the affected file and line. Explain the conditions that cause each bug and its effect on users. Ignore style preferences and unrelated existing issues. Fail only when a correctness bug means the change should not merge as-is. Otherwise, pass with advisory findings if needed. -
Keep Model set to Default.
-
Keep Reasoning effort set to Default.
-
Select your repository under Repositories.
-
Clear every event under Run automatically on to start with manual reviews only.
-
Click Create agent.
Your agent is ready to review the selected repository. Clearing the events lets you evaluate the agent before enabling automatic runs.
Run a review
- Click Run a review.
- Select your repository.
- Under Reviewers, select Correctness review.
- Clear any other selected agents.
- Leave the revision fields empty to review the changes introduced by the latest commit on the default branch.
- Click Run review.
The new review appears in Reviews, first as Queued, then Running. For a repository's first commit, the review compares the commit against an empty tree.
Read the result
- Select the review in Reviews.
- Read the status and Summary.
- Inspect any findings and their file locations.
- Expand Transcript, when available, to inspect the agent's session.
Results:
- Passed means the agent completed the review without findings.
- Passed with findings means the agent has advice but does not reject the change.
- Needs changes means the agent decided the change should not merge as-is.
- Couldn't finish means execution failed before the agent completed its review.
Publish review agent results to GitHub (optional)
Optionally, publish review results as GitHub checks. Connect the Depot Checks app to enable GitHub reporting. The Depot Code Access app lets agents read your code but does not enable GitHub reporting.
- Open Connections in Organization Settings.
- Under GitHub Checks, connect the offered Depot Checks app for your GitHub account.
- Grant the app access to your repository.
Enable automatic reviews
- Open Agents and select Correctness review.
- Under Edit agent, choose when the agent runs in Run automatically on. For this GitHub example, select the pull request events.
- Click Save changes.
The agent runs on the selected events in the selected repository. For example, New PR commits pushed starts a review when you push commits to an open pull request. Automatic pull request reviews skip drafts, closed pull requests, and GitHub pull requests from forks. See Automatic events for the full event list.