Skip to main content

Troubleshoot builds and deployments with Harness AI

Last updated on

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.


What will you learn in this topic?

By the end of this topic, you will be able to:


Before you begin

Before you troubleshoot builds and deployments with Harness AI, ensure you have the following:

  • Harness account access: Access to your Harness account with permissions to view pipelines and enable account settings.
  • CI or CD module access: Access to the Continuous Integration (CI) or Continuous Deployment (CD) module where you want to use AI-driven error analysis.
  • Failed pipeline execution: At least one pipeline execution with a failed step or stage to analyze (optional for initial setup, required to test AI troubleshooting).

Get started with Harness AI for CI

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 Harness AI dialog.

Step logs are available on the Build details page.


Next steps