> 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/overview.md).

# Set your AI standards

Sonar’s AI Code Assurance helps you ensure security and code quality within projects containing AI-generated code. By utilizing project labels and marking, the *Sonar way for agentic AI* quality gate and *Sonar agentic AI* quality profiles, and dynamic project badge publishing, you can maintain high standards and confidently assure the quality of your AI projects.

## Quality gate and quality profiles for agent centric development

Traditional quality profiles and quality gates like *Sonar way* were tuned for human developers. Holding agentic AI code to the same standards can introduce potential risks, because AI often does better where humans fail but fails in areas that humans tend to do well. The *Sonar way for agentic AI* quality gate and *Sonar agentic AI* quality profiles are recommended for agent centric development. See [Quality gate for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-gate-for-agentic-ai.md) and [Quality profiles for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-profiles-for-agentic-ai.md) for more information.

## Assuring your AI code <a href="#assuring-your-ai-code" id="assuring-your-ai-code"></a>

SonarQube’s AI Code Assurance features bring confidence that your AI-generated code is being reviewed to avoid any accountability crisis.

These objectives are achieved with three features that allow Quality Standard administrators to qualify projects as AI Code Assured:

1. [#label-projects-with-ai-code](#label-projects-with-ai-code "mention")
2. [#apply-a-quality-gate-for-ai-code-assurance](#apply-a-quality-gate-for-ai-code-assurance "mention")
3. Publish an AI Code Assurance badge externally to your websites to [#monitor-projects-containing-ai-code](#monitor-projects-containing-ai-code "mention").

### Label projects with AI code <a href="#label-projects-with-ai-code" id="label-projects-with-ai-code"></a>

The first step to achieving AI Code Assurance is to mark your project as containing AI code.

Go to *Your Project* > **Administration** > **AI Code Assurance** and select **This project contains AI-generated code**. Projects marked in this way will have the ![$contains-ai-code](/files/iwZbXVzdyHjM2lcq7TaV) label shown on the Summary page of your project.

### Apply a quality gate for AI Code Assurance <a href="#apply-a-quality-gate-for-ai-code-assurance" id="apply-a-quality-gate-for-ai-code-assurance"></a>

Step 2 in achieving AI Code Assurance requires that an AI-qualified quality gate be applied to your project. While you are in *Your Project* > **Administration** > **AI Code Assurance**, select a qualified quality gate from the list. See [Quality gate for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-gate-for-agentic-ai.md) for more information.

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 profiles for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-profiles-for-agentic-ai.md) for language support.

## Monitor projects containing AI code <a href="#monitor-projects-containing-ai-code" id="monitor-projects-containing-ai-code"></a>

Projects marked with the ![$contains-ai-code](/files/iwZbXVzdyHjM2lcq7TaV) label and using a quality gate qualified for AI Code are eligible to publish the ![$in-shield-on](/files/0bWB93MbQPZ4CLq68g7k) badge on your external websites. For information about using the AI Code Assurance badges, see [Monitor projects with AI code](/sonarqube-cloud/standards/ai-code-assurance/monitor-projects-with-ai-code.md).

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

* [Quality gate for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-gate-for-agentic-ai.md)
* [Quality profiles for agentic AI](/sonarqube-cloud/standards/ai-code-assurance/quality-profiles-for-agentic-ai.md)
* [Monitor projects with AI code](/sonarqube-cloud/standards/ai-code-assurance/monitor-projects-with-ai-code.md)
* SonarQube Cloud's [AI capabilities](/sonarqube-cloud/ai-capabilities.md)
* Guide to setting up [AI features](/sonarqube-cloud/administering-sonarcloud/ai-features.md) at the organization level
  * Quickly [Enable AI CodeFix](/sonarqube-cloud/administering-sonarcloud/ai-features/enable-ai-codefix.md) to get AI-generated fix suggestions


---

# 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:

```
GET https://docs.sonarsource.com/sonarqube-cloud/standards/ai-code-assurance/overview.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.
