# Quality profiles for agentic AI

## Sonar way for agentic AI quality profile <a href="#sonar-way-for-agentic-ai-quality-profile" id="sonar-way-for-agentic-ai-quality-profile"></a>

The *Sonar way for agentic AI* quality profile is a built-in profile that recalibrates Sonar's rules concentrating on six evidence-backed risk categories where agentic AI code actually tends to fail:

* Security boundaries and access control
* Error-handling depth
* Hallucinated APIs and supply-chain risks
* Code duplication and structural drift
* Concurrency correctness
* Performance patterns

The quality profile is recommended for projects where AI agents generate or contribute significant amounts of Java, JavaScript/TypeScript, or Python code. It activates the security and reliability rules most relevant to AI-generated code, while reducing noise from maintainability rules and minor hotspots that are less critical in agentic workflows. Sonar maintains and updates this profile as AI coding patterns and risks evolve.

## Supported languages <a href="#supported-languages" id="supported-languages"></a>

The *Sonar way for agentic AI* quality profile is currently available for Java, JavaScript/TypeScript, and Python languages.

## Assign quality profile to a project <a href="#assign-quality-profile-to-a-project" id="assign-quality-profile-to-a-project"></a>

To assign the *Sonar way for agentic AI* quality profile at a project level, navigate to *Your project* > **Project Settings** > **Quality profiles**. Under each supported language, select the *Sonar way for agentic AI* quality profile.

## Assign quality profile globally <a href="#assign-quality-profile-globally" id="assign-quality-profile-globally"></a>

### Set quality profile as default <a href="#set-quality-profile-as-default" id="set-quality-profile-as-default"></a>

You can set the *Sonar way for agentic AI* quality profile as the default at the instance level, which means that all projects on the instance will automatically use the profile.

1. Select **Quality Profiles** from the top menu.
2. Filter the quality profiles page by language, see [Supported languages](#supported-languages).
3. From the action menu for the *Sonar way for agentic AI* quality profile, select **Set as default**.

### Assign quality profile to multiple projects <a href="#assign-quality-profile-to-multiple-projects" id="assign-quality-profile-to-multiple-projects"></a>

If the *Sonar way for agentic AI* quality profile is not the default one for a given language, you can still assign it to multiple projects.

1. Select **Quality Profiles** from the top menu.
2. Filter the quality profiles page by language, see [Supported languages](#supported-languages).
3. Select the *Sonar way for agentic AI* quality profile to view its details.
4. In the **Projects** section, select **Change projects**.
5. In the Projects dialog, use the **With**, **Without**, or **All** tabs to select the projects you want to assign the quality profile to.
6. Select **Close**.

## Customizing a quality profile <a href="#customizing-a-quality-profile" id="customizing-a-quality-profile"></a>

Any derivative of the *Sonar way for agentic AI* quality profile can be extended to cover more rules. See [Creating a quality profile](/sonarqube-server/quality-standards-administration/managing-quality-profiles/creating-a-quality-profile.md) for complete details.

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Managing quality profiles](/sonarqube-server/quality-standards-administration/managing-quality-profiles.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/quality-standards-administration/standards-for-agent-centric-development/quality-profiles-for-agentic-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
