> ## 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.

# Configuration file

<Warning>
  **Git Integration (formerly Qodo Merge)** – AI code review agents for pull requests. This documentation describes the Qodo v1 experience. For the Qodo v2 documentation, click [here.](/code-review)
</Warning>

**The configuration file** allows you to adjust the various [tools and sub-tools](/v1/tools/tools-list) used by Qodo.

**Configuration file example:**

An example configuration file can be found in our GitHub repository.

**Avoid copying the entire configuration file**. **Only use the configurations you need.**

<CardGroup>
  <Card icon="gitHub" href="https://github.com/qodo-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml" cta="GitHub" title="pr-agent/pr_agent/settings/configuration.toml at main · qodo-ai/pr-agent" />
</CardGroup>

<Tip>
  **Tip: edit only what you need.**

  Keep your configuration file **minimal** by only editing the relevant settings.

  **Avoid copying the entire configuration.** This could cause issues when defaults change over time.
</Tip>

## Use the configuration file

The configuration file is a file named `.pr_agent.toml`, which can reside in several locations (see below).

Each [Qodo tool](/v1/tools/tools-list) has its own specific configuration settings.

For example, the [review tool](/v1/tools/tools-list/review) uses parameters from [`the pr_reviewer section of the configuration file`](https://github.com/qodo-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L72):

```bash theme={null}
...
[pr_reviewer] # /review #
# enable/disable features
require_score_review=false
require_tests_review=true
require_estimate_effort_to_review=true
...
```

If you set in `.pr_agent.toml`:

```bash theme={null}
[pr_reviewer]
extra_instructions="""\
- instruction a
- instruction b
...
"""
```

Then you can give a list of extra instructions to the `review` tool, which it will follow when it runs.

See the [Tools Guide](https://qodo-merge-docs.qodo.ai/tools/) for a detailed description of the different tools and their configurations.

<Note>
  **Show relevant configurations:**

  Set `config.output_relevant_configurations=true` to display the relevant configurations for each tool.

  This can help with debugging or give you a better understanding of different configuration options.
</Note>

## Possible locations of configuration files

The possible locations of where can one place configuration files are ordered below by precedence (wiki being the highest precedence); if the same setting is defined in configuration files at two locations, the one with the higher precedence will **overwrite** the setting in the lower precedence.

### Wiki configuration file

<Note>
  <Tooltip>*Platforms supported: GitHub, GitLab, Bitbucket*</Tooltip> Cloud, Azure DevOps
</Note>

#### Create a wiki configuration file

<Steps>
  <Step>
    Enable wiki page (see [here](/v1/configuration/enabling-a-wiki) for instructions)
  </Step>

  <Step>
    Edit a new page called `.pr_agent.toml`. and make sure it begins with three "\`" followed by: "toml"
  </Step>

  <Step>
    Add any configuration parameters you'd like.
  </Step>

  <Step>
    Save the page. Configuration takes effect immediately.
  </Step>
</Steps>

### Local configuration file

<Note>
  <Tooltip>*Platforms supported: GitHub, GitLab, Bitbucket*</Tooltip>, Azure DevOps
</Note>

#### Create a local configuration file

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

  <Step>
    Edit any configuration parameter you'd like.
  </Step>

  <Step>
    Upload the file to the root of the default branch in your repository.
  </Step>

  <Step>
    The configuration will take effect after being merged into your repository.
  </Step>
</Steps>

### Global configuration file

<Note>
  <Tooltip>*Platforms supported: GitHub, GitLab Cloud, Bitbucket*</Tooltip> Cloud
</Note>

#### Create a global configuration file

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

  <Step>
    In the repository `pr-agent-settings`, create a file called `.pr_agent.toml`.
  </Step>

  <Step>
    Edit any configuration parameter you'd like.
  </Step>

  <Step>
    Upload the file to the root of the default branch in the repository.
  </Step>

  <Step>
    The configuration will take effect after being merged into your repository.
  </Step>
</Steps>

The `.pr_agent.toml` file in this repository will be used as the global configuration for all other repositories in the organization. Local configurations will always override global ones.

### Project/group level configuration file

<Note>
  Platforms supported: GitLab, Bitbucket Data Center, Azure DevOps
</Note>

#### Create a project/group configuration file

<Steps>
  <Step>
    Create a repository named `pr-agent-settings` within a specific project (Bitbucket, Azure DevOps) or a group/subgroup (Gitlab).
  </Step>

  <Step>
    In the repository `pr-agent-settings`, create a file called `.pr_agent.toml`.
  </Step>

  <Step>
    Edit any configuration parameter you'd like.
  </Step>

  <Step>
    Upload the file to the root of the default branch in the repository.
  </Step>

  <Step>
    The configuration will take effect after being merged into your repository.
  </Step>
</Steps>

The configuration file in this repository will apply to all repositories directly under the same project/group/subgroup.

<Note>
  For Gitlab, in case of a repository nested in several sub groups, the lookup for a pr-agent-settings repo will be only on one level above such repository.
</Note>

### Organization level configuration file

<Note>
  Platforms supported: Bitbucket Data Center, Azure DevOps
</Note>

#### Create an organization configuration file

**Setting up organization-level global configuration:**

<Steps>
  <Step>
    For Bitbucket: Create a new **project** named `PR_AGENT_SETTINGS` with **project key** `PR_AGENT_SETTINGS` . For Azure DevOps: Create a new project named `pr-agent-settings`
  </Step>

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

  <Step>
    Add a `.pr_agent.toml` configuration file to the repository (similar to the global configuration described above).
  </Step>

  <Step>
    Optionally, you can add an organizational-level global best practices file.
  </Step>
</Steps>

All repositories across your organization will inherit configurations from this file.

<Note>
  **Note:**

  If both organization-level and project-level settings are defined, the project-level settings take precedence.

  A repository’s local `.pr_agent.toml` file will always override both global configurations.
</Note>
