> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelcode.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PR Agent

> Get answers and fixes by commenting on milestone pull requests

**PR Agent** answers comments and reviews on the pull requests the Morph Platform opens for your milestones. Use it to ask why a change was made, or to request a fix, without leaving your Git provider.

## What PR Agent Does

When you comment on or review a milestone pull request, PR Agent reads the pull request, the milestone and project specs, the project wiki, and the code diff. It then replies in the thread. When you explicitly ask for a change, it also pushes a commit to the pull request branch.

PR Agent only handles pull requests that the Morph Platform created for a milestone. Other pull requests in the same repository are ignored.

## Supported Providers

| Provider | What starts a run | Progress signal |
| - | - | - |
| GitHub | A new comment, or a submitted review | 👀 on your comment, replaced by 👍 when the run finishes |
| GitLab (including self-managed) | A new merge request comment, or a merge request approval | 👀 on your comment, replaced by 👍 when the run finishes |
| Azure DevOps | A new pull request comment, or an approval vote | None — watch the thread for a reply |

There is nothing extra to configure. PR Agent uses the same connection as your Git integration: see [GitHub](/setup/github-integration), [GitLab](/setup/gitlab-integration), or [Azure DevOps](/setup/azure-devops-integration). For self-managed GitLab, your instance must be able to deliver webhooks to the Morph Platform — see the [network requirements](/setup/gitlab-self-managed#network-requirements).

## How to Use It

1. Open the milestone pull request from the **Code Review** drawer (see [Opening a Milestone PR](/migration/pull-requests#opening-a-milestone-pr)).
2. Leave a comment, an inline comment on a line of the diff, or a review. No keyword or @mention is needed — any new comment or review starts a run.
3. On GitHub and GitLab, a 👀 reaction appears on your comment when PR Agent picks it up.
4. Read the reply in the thread. If you asked for a change, the new commit appears on the pull request.
5. On GitHub and GitLab, the 👀 is replaced by 👍 to mark the comment as handled.

## How PR Agent Responds

| You write | PR Agent |
| - | - |
| A question about the code | Replies with an answer |
| An explicit change request | Pushes one commit to the pull request branch and replies explaining what changed |
| A suggestion or critique without a request | Asks whether you want the change made |
| A vague request | Asks for clarification |
| A vague question | Answers and states the assumptions it made |
| A comment addressed to a teammate | Does not reply |

When a review has several inline comments, PR Agent decides which of them need a reply.

For example, a reviewer leaves this inline comment on a service class:

> Please inject the HTTP client through the constructor instead of creating it inside the method.

PR Agent changes the class, pushes a commit, and replies in the same thread:

> @reviewer I moved the HTTP client to a constructor parameter and updated the two call sites and the unit tests to pass it in. The change is in the latest commit on this branch.

## Good to Know

* Replies are plain text and mention the person who commented.
* Commits follow the Conventional Commits format, with a body that explains what changed and why.
* Comments posted close together are handled in one run, and each one gets its own answer.
* Only one run is active per pull request at a time.
* Comments that already have a reply or a 👍 are skipped.
* PR Agent's own comments never start a run.
* On GitHub and GitLab, edits to existing comments and activity on closed or merged pull requests are ignored.
* In multi-repo projects, PR Agent may change another repository in the project. When it does, its reply lists which repositories changed.

## When to Use Code Review Chat Instead

PR Agent works one pull request at a time. To triage review issues across the whole milestone or re-run the review, use [Code Review chat](/migration/code-review-chat). For larger changes, create an [ad hoc milestone](/migration/adhoc-milestones).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.