> 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/harness-ai/use-harness-ai/core-capabilities/in-harness-ui/step-analysis.md).

# Step analysis with AI

Analyze successful steps and other steps that have run with Harness AI to understand logs, execution details, and next actions

Step analysis with AI provides structured, actionable analysis of successful steps and other steps that have run. Use it to understand long logs, review what a step did, and investigate warnings or time spent in a successful execution. For step failures, Harness AI uses the existing [Pipeline Error Analyzer](/harness-ai/use-harness-ai/core-capabilities/in-harness-ui/devops-agent.md#error-analyzer) capability.

Step analysis supports any step type across Harness modules. It brings step diagnosis, available through Harness AI Chat and the Harness MCP Server, directly into the pipeline execution UI.

## What you will learn from this topic

* Analyze an individual step from the pipeline execution UI.
* Review structured analysis of successful steps and other steps that have run.
* Choose between step analysis and Pipeline Error Analyzer.

## Before you begin

* Enable [Harness AI](/harness-ai/use-harness-ai/harness-ai.md#enable-ai) for the account, organization, or project where you want to analyze a step.
* Ensure the `AI_PIPELINE_ANALYZER` feature flag is enabled for your account.
* Open a pipeline execution you have permission to view.

The **Analyze AI** action is visible only when Harness AI and the `AI_PIPELINE_ANALYZER` feature flag are enabled.

A failed execution is not required. Step analysis is available across modules and is not restricted to CI or CD step types.

## Analyze a step execution

{% stepper %}
{% step %}

### Open the step

Open a pipeline execution, select a stage, and select the step you want to understand. You can select a successful step, such as a build, publish, or cache step.
{% endstep %}

{% step %}

### Select Analyze AI

In the pipeline graph view, select **Analyze AI** in the selected step's **Details** panel.

![Analyze AI in the Details panel for the successful Save Cache to Harness step](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-6e2aadce9416ac09d752d2e9fe68cf61dfb662e7%2Fstep-analysis-details.png?alt=media)

You can also turn on **Console View**, select a step in the left panel, and select **Analyze AI** above its logs.

![Analyze AI above the logs for a successful Type Check step in Console View](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-d462987060b4add332a971f99baf20a8a4dcd374%2Fstep-analysis-console.png?alt=media)
{% endstep %}

{% step %}

### Review the analysis

Harness AI opens a chat with the request **Analyze the logs for this step**. Review the response for the selected step's outcome, execution breakdown, and actionable findings.

For example, analysis of a successful Docker build and push can summarize the image and registry, break down the build process, and explain cache activity recorded in the logs. The details depend on the selected step and its available execution data.

![Harness AI Chat summarizes a successful Docker build and push with execution details and a build process breakdown](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-1094025fa62c096688682ad458feedd5ba0765d6%2Fstep-analysis-response.png?alt=media)
{% endstep %}

{% step %}

### Ask follow-up questions

Continue in the same chat to explore a finding. For example:

* "Which operations account for the time spent in this step?"
* "Explain the warnings in this successful step."
* "What do the logs tell me about cache usage?"
* "What should I investigate next?"

Review the underlying logs and execution details when evaluating the recommendations.
{% endstep %}
{% endstepper %}

## Step analysis and Pipeline Error Analyzer

Step analysis complements [Pipeline Error Analyzer](/harness-ai/use-harness-ai/core-capabilities/in-harness-ui/devops-agent.md#error-analyzer) by extending analysis to successful steps and other steps that have run. Step failure diagnosis uses the existing Pipeline Error Analyzer capability.

| Use case                                                                                   | Experience                                                                |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| Understand a successful step or another step that has run, including long logs or warnings | Select **Analyze AI** on the step.                                        |
| Investigate a step failure and get help identifying its cause                              | Use **Analyze Error** in the existing Pipeline Error Analyzer experience. |

Both experiences require Harness AI to be enabled.

## Troubleshoot access

If **Analyze AI** does not appear:

* Confirm that Harness AI is enabled for the relevant account, organization, or project.
* Confirm that your account has the `AI_PIPELINE_ANALYZER` feature flag enabled.
* Select an individual step in a pipeline execution to open its details or logs.

## Next steps

* [Pipeline Error Analyzer](/harness-ai/use-harness-ai/core-capabilities/in-harness-ui/devops-agent.md#error-analyzer): Investigate pipeline failures.
* [Harness AI Chat](/harness-ai/use-harness-ai/harness-create-with-ai/harness-ai-chat-guide.md): Continue investigating with natural language prompts.
* [Harness MCP Server](/harness-ai/use-harness-ai/connect-with-ai/index.md): Access Harness from your AI client.

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/use-harness-ai/core-capabilities/in-harness-ui/step-analysis" %}
