> 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-server/10.7/user-guide/ai-features.md).

# AI features

SonarQube Server 10.7 can create AI-generated fix suggestions for the issues detected in your projects and guarantee the quality of the AI-generated code.

{% hint style="info" %}
**For AI agents:** You're in the SonarQube Server 10.7 documentation. For a list of all 10.7 pages, see the [SonarQube Server 10.7 page index](https://3272878703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI10pmJWeVVXYITlQJllp%2Fuploads%2F3hUYrP7xi1bTWHVJojH6%2Fsonarqube-server-10.7-llms.txt?alt=media). For the whole site, see the [page index](https://docs.sonarsource.com/llms.txt) or the [full text](https://docs.sonarsource.com/llms-full.txt). For another version, replace 10.7 in the URL with that version. The [latest version](https://docs.sonarsource.com/sonarqube-server/) has no version number in its URL.
{% endhint %}

SonarQube Server can create AI-generated fix suggestions for the issues detected in your projects and guarantee the quality of the AI-generated code.

## AI-generated fix suggestions <a href="#ai-generated-fix-suggestions" id="ai-generated-fix-suggestions"></a>

*This feature is available in* [*Early Access*](https://www.sonarsource.com/legal/early-access/?_gl=1*1cnxd7l*_gcl_aw*R0NMLjE3MjYwNjEzMzYuQ2p3S0NBandfNFMzQmhBQUVpd0FfNjRZaHRaajloc0NiVllqSDlWQnBFNThseVJNU3AwRGZJXzFxVUlpVEM5OGNzeWdZTG9lenF1ZU1ob0NyMGtRQXZEX0J3RQ..*_gcl_au*NzgzMTE3MTA4LjE3MjQwNjY1Mjc.*_ga*MjA1OTIwMzU4OS4xNzI0MDY2NTI3*_ga_9JZ0GZ5TC6*MTcyNjA5MzA2Ni4zNy4xLjE3MjYwOTMwNzMuNTMuMC4w)*, in Enterprise Edition and above.*

SonarQube Server includes the AI CodeFix feature, which uses OpenAI’s GPT-4 to suggest AI-generated fix suggestions for issues detected in your projects.

To learn how to use this feature, see the dedicated section on the [Fixing issues](/sonarqube-server/10.7/user-guide/issues/fixing.md) page.

To learn how to enable the feature, see [AI-generated fix suggestions](/sonarqube-server/10.7/instance-administration/system-functions/enabling-ai-generated-fix-suggestions.md) in the administration section.

## AI code assurance <a href="#ai-code-assurance" id="ai-code-assurance"></a>

*This feature is available in Developer Edition and above.*

AI code assurance is a feature you can use to ensure the AI-generated code in your project is clean. As a developer, you can activate a setting at the project level to:

* indicate that your project contains AI-generated code
* ensure that the AI-generated code, as part of your [About new code](/sonarqube-server/10.7/core-concepts/clean-as-you-code/about-new-code.md), passes the Sonar way quality gate

Once active, an **AI Code** label is displayed next to the project in the UI, and you can use the [Using a project badge](/sonarqube-server/10.7/user-guide/project-badge.md) to promote your project’s health.

To learn more about how to mark AI-generated code in your project, see the [Project settings](/sonarqube-server/10.7/project-administration/project-settings.md#marking-a-project-as-containing-ai-generated-code) article on the *Project settings* page.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-server/10.7/user-guide/ai-features.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
