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.

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 > Project Settings > Quality profiles. Under each supported language, select the Sonar way for agentic AI quality profile.

Assign quality profile globally

Set quality profile as default

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.

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

  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

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?