> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-integration/troubleshooting-and-resources/troubleshoot-harness-ci/ai.md).

# Troubleshoot builds with Harness AI

[Harness AI](https://harness.io/products/harness-ai) analyzes log files and correlates error messages with known issues. This feature enables developers to troubleshoot and resolve deployment failures quickly, saving them from sifting through millions of log lines. Harness AI also suggests fixes and predicts potential errors in the code before the build is initiated. This feature works across Harness CI and CD modules.

{% embed url="<https://www.youtube.com/watch?v=b-l0Ig4HHBQ>" %}

### Get started with AI for CI <a href="#get-started-with-ai-for-ci" id="get-started-with-ai-for-ci"></a>

To enable Harness AI for CI in your Harness account, perform the following steps:

1. Navigate to **Account Settings**.
2. Select **Default Settings**.
3. Expand the **Harness AI** section.
4. Enable the **Harness AI** setting.
5. Click **Save**.

After enabling Harness AI, AI-driven error analysis and remediation become available when a step fails or when an empty stage (a stage with no steps) encounters a failure.

When viewing the logs for the failed step or stage, select the **Harness AI** dialog to review error analysis and troubleshooting suggestions.

![An example of AI dialog.](/files/FcRK2Dd7ajsjpKMWsjWE)

You can find step logs on the [**Build details** page](/continuous-integration/use-harness-ci/use-harness-ci/viewing-builds.md).

{% hint style="info" %}
Go to the following Harness legal pages for more information about Harness AI:

* [Harness AI Terms](https://www.harness.io/legal/aida-terms)
* [Harness AI Data Privacy](https://www.harness.io/legal/harness-ai-data-privacy)
  {% endhint %}
