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

# Migrate from the Code Review bot to Cosmos

> Move self-serve GitHub Code Review bot reviews to Cosmos and cut over after a verified pilot.

<Note>
  This migration applies to **self-serve Code Review bot customers**. The Enterprise Code Review bot is not part of this self-serve sunset. If you are an Enterprise customer, keep your current setup and contact your Augment account team before making changes.
</Note>

## What Cosmos adds to code review

| Benefit | What it brings to your team |
| - | - |
| **A configurable PR-to-merge workflow** | Combine specialized Experts for line-by-line review, risk triage, human-guided review, repair, and runtime verification. Add PR authoring when you want the workflow to cover more than review. A human always makes the final merge decision. [Explore the code review pipeline](/cosmos/experts-code-review). |
| **Model choice** | Select a supported model when configuring an Expert or starting a session, and change it as your needs evolve. [See available models](/models/available-models). |
| **Team-specific reviews** | Use repository guidance, tune Expert instructions, or create a custom Expert for your workflow. Code Review Memory can carry forward repository conventions and useful feedback. [Configure a custom Expert](/cosmos/experts-configure-custom) · [Code Review Memory](/cosmos/experts-code-review-memory). |
| **Automation that fits your process** | Start reviews from GitHub events or manual commands, filter by repository and event details, and choose a run identity where available. [Configure triggers](/cosmos/config-triggers). |
| **More context and tools** | Extend an Expert with approved MCP servers such as Sentry or Atlassian, alongside Cosmos's direct GitHub integration. [Configure MCP servers](/cosmos/config-mcp). |
| **Visible review activity** | Inspect Expert sessions, run history, findings, and artifacts instead of treating review as a black box. [Review the code review pipeline](/cosmos/experts-code-review) · [Manage automations](/cosmos/manage-automations). |

This guide moves your GitHub pull-request reviews from the Augment Code Review bot to [Cosmos](https://docs.augmentcode.com/cosmos/getting-started). During the migration window, move repositories one at a time or in batches. Every active repository must be migrated before the announced sunset date; the legacy Code Review bot will not be available after that date. Start with one low-risk pilot, verify its Cosmos review, then continue with the remaining repositories.

The existing Augment GitHub App is used by Cosmos too. Keep its installation and repository access in place during the migration.

## Before you start

You will need:

* A Cosmos tenant admin to configure the GitHub integration, the Deep Reviewer expert, and automations.
* A GitHub organization admin if the existing Augment GitHub App installation needs access to additional repositories.
* Access to the legacy Code Review bot settings for the repositories you are migrating.

Choose a low-risk pilot repository. Record tenant-level Code Review bot status and each repository's exact `owner/repository` name, mode (automatic, manual, or disabled), trigger command, prompt mode, author restrictions, connected MCP tools, and custom review guidance.

Keep the Code Review bot's current behavior while preparing Cosmos. At cutover, change only an active automatic legacy trigger to manual-only. Leave disabled repositories disabled and already-manual repositories unchanged.

### What the migration button does

Select [**Migrate to Cosmos**](https://app.augmentcode.com/settings/code-review) in Code Review bot settings. It opens Cosmos Advisor with a draft prompt prefilled from the saved, non-secret settings on the page. Review and send the prompt to start the Cosmos Advisor session. The button does not change Code Review bot settings, create the Cosmos Expert or automations, configure trigger filters, or enable anything. Check the repository list and each repository's effective mode; add anything missing before sending the prompt.

Or start from this [prefilled Cosmos Advisor session](https://cosmos.augmentcode.com/home?expertName=Cosmos+Advisor\&message=Help+me+migrate+my+existing+Augment+Code+Review+setup+to+Cosmos.+Configure+Deep+Reviewer+and+its+automations+to+match+the+current+non-secret+settings+and+custom+review+guidelines+for+one+pilot+repository.+Keep+all+automation+triggers+disabled+until+I+confirm+the+pilot+review.). This link opens a generic draft; it does not load settings from Code Review. Add the recorded settings and custom review guidance, then send the prompt to start the session.

The button's prompt includes MCP server IDs, not connected MCP servers. Configure those MCP servers in Cosmos and grant access separately (see [MCP configuration](/cosmos/config-mcp)). Never paste credentials into Cosmos Advisor.

<Note>
  If the MCP servers you used for Code Review are already connected in Cosmos, you can attach the matching MCP configs to the Deep Reviewer expert. The IDs in the button's migration prompt can help identify them, but the button does not attach them automatically. Before cutover, confirm the expert has MCP access and the identity Cosmos uses to run reviews is authorized to use those servers.
</Note>

## 1. Confirm Cosmos can access the repository

1. Open [GitHub integration settings](https://cosmos.augmentcode.com/integrations/github) and confirm the organization-level GitHub App connection is active.
2. Confirm the existing app installation has access to the pilot repository. Ask your GitHub organization admin to grant access if the repository is missing.
3. Use the organization-level GitHub App integration for review access and posting as Augment. For triggered sessions, choose a dedicated service account under **Run sessions as** when that option is available; otherwise, use an appropriate trigger owner.
4. Keep the legacy Code Review bot settings available for rollback.

For the setup flow, see [Getting Started with Cosmos](/cosmos/getting-started) and [Using GitHub as a Tool or Trigger](/cosmos/connectors/config-github).

## 2. Set up the Deep Reviewer expert for the pilot

To use Cosmos Advisor, use either option above. Review the draft prompt, add any missing settings or custom review guidance, and send it to start the session. Ask Cosmos Advisor to configure the Deep Reviewer expert for the pilot, then review its proposal. Alternatively, configure the expert directly in Cosmos. In either case, keep triggers disabled until cutover. Never paste credentials.

The PR Author expert is **not required to migrate from the Code Review bot**; it is a separate expert for creating and maintaining pull requests.

## 3. Test the Deep Reviewer expert manually

Run the Deep Reviewer expert manually on a test pull request or another PR approved for a test review. You can ask Cosmos Advisor to launch it or start the expert directly in Cosmos. Manual review can post real comments.

Confirm that the expert can read the changed files, produces actionable findings on the correct lines that follow your guidance, and posts comments under the expected Augment identity with a Cosmos session link. Check that it does not post duplicate or diagnostic comments.

If the manual review fails, do not cut over. Use the Cosmos Advisor result and Event Log to identify and resolve the cause, such as GitHub App repository access, the **Run sessions as** identity, or review guidance. Then repeat the manual review. Keep the Code Review bot settings unchanged until the test passes, and resolve issues before sunset.

## 4. Configure triggers, but leave them disabled

Configure the pilot automations with Cosmos Advisor or directly in Cosmos, and leave every trigger **disabled** until cutover. Choose a dedicated service account under **Run sessions as** when available; this sets the session identity, while the organization-level GitHub App controls posting as Augment. Confirm the app can access the target repositories. See [Configuring Triggers](/cosmos/config-triggers) for permissions.

<Info>
  You can ask Cosmos Advisor to create or change automations and trigger filters, or edit them directly in Cosmos. Whichever approach you use, review the filters and test them against real events before enabling triggers.
</Info>

For github.com, configure the behavior you need:

* **Automatic:** pull requests opened or marked ready for review, excluding drafts.
* **Manual:** an approved command, such as `cosmos review`, in an `issue_comment` on a pull request.
* **Inline comments:** add a `pull_request_review_comment` trigger only if your workflow needs it.
* **Author restrictions:** set and test allowlists or denylists. For public repositories, verify the required membership, collaborator, or contributor access check.

While the legacy Code Review bot is active, use a distinct Cosmos command. Remove `augment review` from the Cosmos filters on the trigger until the legacy Code Review bot is disabled; never enable the same phrase in both systems.

See [Configure a Code Review Pipeline](/cosmos/experts-code-review) and [Automations](https://cosmos.augmentcode.com/automations) for more information.

## 5. Check that GitHub events arrive

Create a test pull request and comment. In the [Cosmos Event Log](https://cosmos.augmentcode.com/automations/events), confirm the event fields used by your filters: repository, action, draft state, comment text, PR status, and author/commenter. Inspect a real `pull_request_review_comment` event if needed. See [Managing Automations](/cosmos/manage-automations) for help.

Before cutover, check each trigger's event, exact repository and comment filters, disabled state, and **Run sessions as** identity against real events.

## 6. Cut over the pilot repository

Schedule the pilot change for a low-traffic window and make sure someone can verify the first Cosmos review. The customer-side switch is not atomic: between pausing a legacy automatic trigger and enabling Cosmos, an event may not start either automatic review. Track PRs entering review during that brief interval and start a Cosmos review manually after the Deep Reviewer expert is ready.

1. In [legacy Code Review bot settings](https://app.augmentcode.com/settings/code-review), if the pilot currently uses automatic reviews, change its trigger to **Manual Command**. If it is disabled, leave it disabled; if it is already manual, leave it unchanged. Keep the legacy settings available for rollback.
2. Enable only the triggers that match the pilot's active legacy behavior, using Cosmos Advisor or the automation settings in Cosmos. Use a distinct Cosmos manual command while both systems are available; never enable the same command in both.
3. Verify the pilot's configured mode. For an automatic pilot, open a non-draft test pull request and confirm exactly one Cosmos review starts; a draft must not start one. For a manual-only pilot, opening a pull request must not start a review; post the configured Cosmos command and confirm exactly one review starts. If both trigger types are configured, test each separately.
4. If an expected event fails, disable the Cosmos triggers using Cosmos Advisor or the automation settings in Cosmos. Restore the saved legacy setting in [Code Review bot settings](https://app.augmentcode.com/settings/code-review) before investigating.
5. Once one end-to-end Cosmos review is confirmed, continue with the next repository or batch. The legacy Code Review bot can remain active for repositories not yet moved during the migration window, but all active repositories must be migrated before sunset.

## 7. Migrate additional repositories when ready

Configure or update the automation filters for each repository or batch using Cosmos Advisor or the automation settings in Cosmos. You can run automatic reviews on every eligible PR opened or marked ready across all repositories being migrated, or limit reviews to selected repositories with an exact repository filter. Keep repositories not yet cut over on the legacy Code Review bot during the migration window; preserve disabled and manual-only settings unless an admin chooses otherwise.

For each batch, verify the event and repository filters, pause legacy automatic reviews, then enable the matching Cosmos triggers using either method and confirm the first review for each repository. Use a distinct command if keeping a legacy manual fallback. If a review fails, disable the triggers using Cosmos Advisor or the automation settings in Cosmos, then restore the saved legacy setting in [Code Review bot settings](https://app.augmentcode.com/settings/code-review) before investigating.

Migrate every active repository and turn off the legacy Code Review bot before the announced sunset date. Keep the existing Augment GitHub App installation and repository access for Cosmos. After the legacy bot is off tenant-wide, you may add the former manual command as a Cosmos alias.

## 8. Roll back if the pilot fails

1. Disable the Cosmos triggers for the affected repository using Cosmos Advisor or the automation settings in Cosmos.
2. Restore the saved legacy Code Review bot setting in [Code Review bot settings](https://app.augmentcode.com/settings/code-review) and verify its previous behavior.
3. Leave the Cosmos triggers disabled while you investigate the event payload, filters, **Run sessions as** identity, GitHub App access, or session result. Finish the retry before the announced sunset date.
4. Repeat the manual Deep Reviewer expert test and event checks before trying the cutover again; do not rely on the legacy Code Review bot after sunset.

Do not leave both systems enabled for the same automatic or manual trigger behavior; that can create duplicate reviews.

## Learn about Cosmos

* [Cosmos Advisor](/cosmos/advisor/overview).
* [Configure a Code Review Pipeline](/cosmos/experts-code-review).
* [Automations](https://cosmos.augmentcode.com/automations).
* [Event Log](https://cosmos.augmentcode.com/automations/events).


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