Skip to main content
| A knowledge repository is a Git repository of documents, such as a handbook, runbooks, or architecture notes. CodeRabbit uses it as reference knowledge across your organization, so reviews and scans follow the conventions your team has already written down.

Requirements and limits

Knowledge repositories are available on the Team plan and higher. The number of repositories you can connect depends on your plan; see Plans and pricing.
  • The repository must already have CodeRabbit installed in the same organization.
  • CodeRabbit reads only Markdown files with the .md or .mdx extension from the default branch, for example main or master. Files with the .markdown extension appear on the summary page, but reviews don’t read them, so rename them to .md.
  • Each review or agent task reads up to 96 files and 96 KB from a knowledge repository, and up to 24 KB from a single file. Keep the documents you rely on most short and focused.
  • A public knowledge repository is used for every repository in your organization. A private or internal knowledge repository is used only for other private and internal repositories.

Connect a repository

To connect, re-index, or disconnect repositories, you need the admin role or a custom role with Read and Write access to the Knowledge Base resource. Members, and custom roles with Read only access, can view the list.
  1. In the CodeRabbit app, open Knowledge base in the sidebar and go to Knowledge repositories.
  2. Open Choose a repository, search for the repository, and select it. The list shows only repositories that have CodeRabbit installed.
  3. Click Connect. CodeRabbit confirms with Repository connected and queues the first index.
The repository appears in the list with Re-index and Disconnect buttons. Indexing starts about two minutes after you connect and usually finishes within a few minutes; large repositories take longer. If the repository picker is missing, your role can’t manage knowledge repositories. If CodeRabbit says your plan’s limit is reached, disconnect a repository or upgrade your plan.

Feature support

  • Pull Request Reviews: CodeRabbit checks changes against your documented conventions and guidelines.
  • Chat on pull requests and issues: CodeRabbit answers questions with your docs as context.
  • Deep Scan and PR security reviews: security agents get your architecture and threat notes.
  • : on GitHub.com, CodeRabbit clones connected repositories into the agent’s workspace so tasks can read your docs while they run.

Manage a connected repository

Manage connected repositories from Knowledge base → Knowledge repositories:
  • Update the content: push to the default branch, and CodeRabbit re-indexes the repository automatically.
  • Force a refresh: click Re-index on the repository’s row.
  • View the summary page: select the repository’s name in the list. Summary pages aren’t available to every organization during the private preview.
  • Stop using a repository: click Disconnect and confirm. CodeRabbit removes its summary page and stops using it.
  • Stop a single repository from using connected knowledge: turn on the Knowledge Base opt-out for that repository, in its settings or in .coderabbit.yaml. Later reviews, scans, and agent tasks for that repository ignore connected repositories.
The Knowledge Base opt-out also turns off the other context sources that retain data, such as Learnings. When it’s set in .coderabbit.yaml or your central configuration, CodeRabbit permanently deletes that repository’s stored Knowledge Base data the next time a pull request merges into its default branch. See Opt out of data retention.

What’s next

Knowledge Base overview

See every context source CodeRabbit uses in reviews and which ones need setup

Multi-Repo Analysis

Link related code repositories so reviews catch breaking changes across repository boundaries

CodeRabbit Security

Run Deep Scan and PR security reviews that draw on your architecture and threat notes