Quality profiles for agentic AI
Managing Sonar agentic AI quality profile.
Sonar agentic AI quality profile
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 for more information.
Supported languages
The Sonar agentic AI quality profile is currently available for Java, JavaScript/TypeScript, and Python languages.
Assign quality profile to a project
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
Set quality profile as default for the organization
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.
Go to Your organization > Quality profiles.
Filter the quality profiles page by language, see Supported languages.
From the action menu for the Sonar agentic AI quality profile, select Set as default.
Assign quality profile to multiple projects
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.
Go to Your organization > Quality profiles.
Filter the quality profiles page by language, see Supported languages.
Select the Sonar agentic AI quality profile to view its details.
Select Change projects.
In the Projects modal, use With, Without, or All tabs to select the projects you want to assign the quality profile to.
Select Close.
Customizing a quality profile
Any derivative of the Sonar agentic AI quality profile can be extended to cover more rules. See Creating a quality profile for complete details.
Related pages
Last updated
Was this helpful?

