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

# Configure Qodo using the .pr_agent.toml file

> Manage Qodo configuration as code using a .pr_agent.toml file at the repository, project, group, or organization level.

export const AzureIcon = () => <svg className="azure-icon" viewBox="0 0 18 18" width="12" height="12" style={{
  display: "inline",
  verticalAlign: "middle",
  flexShrink: 0,
  background: "transparent"
}}>
    <defs>
      <linearGradient id="azure-gradient" x1="9" y1="16.97" x2="9" y2="1.03" gradientUnits="userSpaceOnUse">
        <stop offset="0" stopColor="currentColor" />
        <stop offset="0.16" stopColor="currentColor" />
        <stop offset="0.53" stopColor="currentColor" />
        <stop offset="0.82" stopColor="currentColor" />
        <stop offset="1" stopColor="currentColor" />
      </linearGradient>
    </defs>
    <path d="M17,4v9.74l-4,3.28-6.2-2.26V17L3.29,12.41l10.23.8V4.44Zm-3.41.49L7.85,1V3.29L2.58,4.84,1,6.87v4.61l2.26,1V6.57Z" fill="url(#azure-gradient)" />
  </svg>;

<Tip>
  It is recommended to configure your code review settings using the [Qodo portal](/install-and-configure/configuration-overview/portal-configuration).
</Tip>

The configuration file enables you to customize how Qodo behaves during code reviews. Learn more about the Qodo configuration mechanisms [here.](/install-and-configure/configuration-overview)

It controls:

* Review behavior
* Feedback presentation
* Automation
* Feature-level settings

Qodo reads configuration from a file named:

```bash theme={null}
.pr_agent.toml
```

The file is organized into sections (TOML tables). Each section controls a specific aspect of Qodo’s behavior during code review.

When a setting is defined in multiple locations, the highest-precedence configuration takes effect.

#### Example configuration

```bash expandable theme={null}
⚠️ Select ONLY ONE section below, the one that matches your git provider.
# Do not include multiple provider sections in the same configuration file.

# GitHub App
[github_app]
pr_commands = [
    "/agentic_describe",
    "/agentic_review"
]

# GitLab
[gitlab]
pr_commands = [
    "/agentic_describe",
    "/agentic_review"
]

# Bitbucket Cloud
[bitbucket_app]
pr_commands = [
    "/agentic_describe",
    "/agentic_review"
]

# Bitbucket Server / Data Center
[bitbucket_server]
pr_commands = [
    "/agentic_describe",
    "/agentic_review"
]

# Azure DevOps
[azure_devops_server]
pr_commands = [
    "/agentic_describe",
    "/agentic_review"
]

[review_agent]
comments_location_policy = "both"

# severity threshold rank for inline comments:
# 3=action_required,
# 2=remediation_recommended,
# 1=informational.
# Only findings with rank >= threshold will be published inline
inline_comments_severity_threshold = 3

# Extra prompt for usecase to be added as instruction for the agent
issues_user_guidelines = ""
compliance_user_guidelines = ""
```

### Configuration using `pr_agent.toml`

File-based configuration can be defined at repository, project/group, or organization levels. Each level may have platform-specific setup patterns.

### Repository level

#### Repository root configuration

<div style={{ display: "flex", alignItems: "center", gap: "6px" }}>
  <Badge color="outline-provider" size="sm" shape="pill" icon="github">GitHub</Badge>
  <Badge color="outline-provider" size="sm" shape="pill" icon="gitlab">GitLab</Badge>
  <Badge color="outline-provider" size="sm" shape="pill" icon="bitbucket">Bitbucket</Badge>
  <Badge color="outline-provider" size="sm" shape="pill"><AzureIcon />Azure DevOps</Badge>
</div>

Create a local configuration file.

<Steps>
  <Step>
    Create a file named `.pr_agent.toml`.
  </Step>

  <Step>
    Add the desired configuration settings.
  </Step>

  <Step>
    Commit the file to the root of the default branch.
  </Step>
</Steps>

The configuration takes effect for pull requests created after the change is merged.

This configuration applies only to this repository.

#### Wiki configuration

<div style={{ display: "flex", alignItems: "center", gap: "6px" }}>
  <Badge color="outline-provider" size="sm" shape="pill" icon="github">GitHub</Badge>
  <Badge color="outline-provider" size="sm" shape="pill" icon="gitlab">GitLab</Badge>
  <Badge color="outline-provider" size="sm" shape="pill" icon="bitbucket">Bitbucket Cloud</Badge>
  <Badge color="outline-provider" size="sm" shape="pill"><AzureIcon />Azure DevOps</Badge>
</div>

Create a wiki configuration.

<Steps>
  <Step>
    Enable the repository wiki. Learn more [here.](/code-review/get-started/configuration-overview/enable-a-repository-wiki-for-configuration)
  </Step>

  <Step>
    Create a new wiki page named `.pr_agent.toml`.
  </Step>

  <Step>
    Ensure the page begins with a fenced TOML block.
  </Step>

  <Step>
    Add any configuration parameters you need.
  </Step>

  <Step>
    Save the page.
  </Step>
</Steps>

Changes take effect immediately and do not require a repository commit.

### Project or group-level configuration

<div style={{ display: "flex", alignItems: "center", gap: "6px" }}>
  <Badge color="outline-provider" size="sm" shape="pill" icon="gitlab">GitLab</Badge>
  <Badge color="outline-provider" size="sm" shape="pill" icon="bitbucket">Bitbucket Data Center</Badge>
  <Badge color="outline-provider" size="sm" shape="pill"><AzureIcon />Azure DevOps</Badge>
</div>

Create a project or group configuration.

<Steps>
  <Step>
    Create a repository named `pr-agent-settings` within:

    * A project (Bitbucket, Azure DevOps), or
    * A group or subgroup (GitLab).
  </Step>

  <Step>
    Add a `.pr_agent.toml` file to the root of the default branch.
  </Step>

  <Step>
    Define the configuration settings.
  </Step>
</Steps>

This configuration applies to all repositories directly under that project or group.

<Note>
  **GitLab:**

  For repositories nested in multiple subgroups, Qodo looks only one level up for a `pr-agent-settings` repository.
</Note>

### Organization-level configuration

#### Cloud platforms

<div style={{ display: "flex", alignItems: "center", gap: "6px" }}>
  <Badge color="outline-provider" size="sm" shape="pill" icon="github">GitHub</Badge>
  <Badge color="outline-provider" size="sm" shape="pill" icon="gitlab">GitLab Cloud</Badge>
  <Badge color="outline-provider" size="sm" shape="pill" icon="bitbucket">Bitbucket Cloud</Badge>
</div>

Create a global configuration file.

<Steps>
  <Step>
    Create a repository named `pr-agent-settings` in your organization.
  </Step>

  <Step>
    Add a `.pr_agent.toml` file to the root of the default branch.
  </Step>

  <Step>
    Define organization-wide defaults.
  </Step>
</Steps>

The configuration:

* Takes effect for pull requests created after the change is merged.
* Applies to all repositories in the organization unless overridden by a local or wiki configuration.

#### Enterprise environments

<div style={{ display: "flex", alignItems: "center", gap: "6px" }}>
  <Badge color="outline-provider" size="sm" shape="pill" icon="bitbucket">Bitbucket Data Center</Badge>
  <Badge color="outline-provider" size="sm" shape="pill"><AzureIcon />Azure DevOps</Badge>
</div>

All repositories in the organization inherit settings from this configuration.

Create organization-level configuration.

<Steps>
  <Step>
    Create a project named:

    * `PR_AGENT_SETTINGS` with project key `PR_AGENT_SETTINGS` (Bitbucket Data Center), or
    * `pr-agent-settings` (Azure DevOps).
  </Step>

  <Step>
    Inside that project, create a repository named `pr-agent-settings`.
  </Step>

  <Step>
    Add a `.pr_agent.toml` file to the repository.
  </Step>
</Steps>

If both organization-level and project-level configurations exist, project-level settings take precedence. A repository’s local configuration always overrides both.

<Note>
  For a full list of configuration options and which TOML section each belongs to, see [Configuration and Command Reference](/code-review/get-started/configuration-overview/configuration-and-command-reference).
</Note>
