> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/standards/ai-code-assurance/quality-profiles-for-agentic-ai.md).

# Quality profiles for agentic AI

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

The *Sonar 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 that are less critical in agentic workflows. Sonar maintains and updates this profile as AI coding patterns and risks evolve.

We recommend you use the *Sonar way for agentic AI* quality gate in conjunction with the *Sonar agentic AI* quality profile if you want to optimize the standards for agent centric development. See [Quality gate for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-gate-for-agentic-ai.md) for more information.

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

The *Sonar agentic AI* quality profile is currently available for [Java](/sonarqube-cloud/analyzing-source-code/languages/java.md), [JavaScript/TypeScript](/sonarqube-cloud/analyzing-source-code/languages/javascript-typescript-css.md), and [Python](/sonarqube-cloud/analyzing-source-code/languages/python.md) 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 agentic AI* quality profile at a project level, navigate to *Your project* > **Administration** > **Quality profiles**. Under each supported language, select the *Sonar agentic AI* quality profile.

## Assign quality profile at the organization level <a href="#assign-quality-profile-at-the-organization-level" id="assign-quality-profile-at-the-organization-level"></a>

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

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

1. Go to *Your organization* > **Quality profiles**.
2. Filter the quality profiles page by language, see [Supported languages](#supported-languages).
3. From the action menu for the *Sonar 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 agentic AI* quality profile is not a default one for a given language, you can still assign it to multiple projects that belong to the same organization.

1. Go to *Your organization* > **Quality profiles**.
2. Filter the quality profiles page by language, see [Supported languages](#supported-languages).
3. Select the *Sonar agentic AI* quality profile to view its details.
4. Select **Change projects**.
5. In the Projects modal, use **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 agentic AI* quality profile can be extended to cover more rules. See [Creating a quality profile](/sonarqube-cloud/standards/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-cloud/standards/managing-quality-profiles.md)
* [Quality gate for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-gate-for-agentic-ai.md)
* [Set your AI standards](/sonarqube-cloud/standards/ai-code-assurance/overview.md)
* [Monitor projects with AI code](/sonarqube-cloud/standards/ai-code-assurance/monitor-projects-with-ai-code.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-cloud/standards/ai-code-assurance/quality-profiles-for-agentic-ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
