Quality profiles for agentic AI

Managing Sonar way for agentic AI quality profile.

Sonar way for agentic AI quality profile

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.

We recommend you use the Sonar way for agentic AI quality gate in conjunction with the Sonar way for 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 way for agentic AI quality profile is currently available for Java, JavaScript/TypeScript, and Python languages.

Assign quality profile to a project

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

Assign quality profile at the organization level

Set quality profile as default for the organization

You can set the Sonar way for 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.

  3. From the action menu for the Sonar way for agentic AI quality profile, select Set as default.

Assign quality profile to multiple projects

If the Sonar way for 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.

  3. Select the Sonar way for 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

Any derivative of the Sonar way for agentic AI quality profile can be extended to cover more rules. See Creating a quality profile for complete details.

Last updated

Was this helpful?