> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Review and act on LangSmith Engine recommendations

> Review the recommendations LangSmith Engine makes, open pull requests with its proposed fixes, and turn their traces into dataset examples.

> [!NOTE]
>
> This page describes LangSmith Cloud and self-hosted LangSmith with Helm chart version 0.18.0 or later. Earlier chart versions use previous labels in the recommendation detail panel, for example **Watch** instead of **Save for later**.

The **Engine** page lists the recommendations [LangSmith Engine](https://docs.langchain.com/langsmith/engine.md) makes for an [agent environment](https://docs.langchain.com/langsmith/agent-environments.md), each with a diagnosis, the traces that support it, and a proposed fix. A recommendation can fix a bug or optimize your agent. On LangSmith Cloud, Engine groups recommendations by [goal](https://docs.langchain.com/langsmith/engine-goals.md). Work through the recommendations to ship fixes and to turn their traces into evaluation datasets. If Engine is not running on your agent environment yet, see [Set up Engine](https://docs.langchain.com/langsmith/engine-setup.md).

Click any recommendation to open its detail panel. At the top, a diagnosis describes what Engine found and its impact. The header shows the recommendation's severity, which you can change, and its category. The toolbar below the title has buttons to open a pull request (**Connect a repository** if none is connected), **Save for later**, **Close**, and **Copy as prompt**, which can also send the fix to a coding agent. On a closed recommendation, **Reopen** replaces **Close**. When [Linear is connected](https://docs.langchain.com/langsmith/engine-setup.md#connect-to-linear), the header also shows **Create in Linear**.

Engine learns from what you do with each recommendation: closing it as **Done**, **Not Important**, or **Incorrectly Flagged**, changing its severity, or opening a pull request, along with any reason you give. For how those actions shape Engine's later analysis, see [How Engine learns from your actions on recommendations](https://docs.langchain.com/langsmith/engine.md#how-engine-learns-from-your-actions-on-recommendations).

## Review evidence

The **Evidence** section contains traces that support a diagnosis, including a snippet from each trace. From this section, you can:

* **View a trace**: Click **Open trace** to open an evidence trace. When Engine identifies the child run behind the recommendation, the trace opens at that run. A card in the trace view shows the recommendation's title and Engine's note about the trace. Click **Back to issue** on the card to return to the recommendation.
* **Create offline examples**: Click [**Engine proposed N examples**](#add-offline-examples) to generate custom ground truth [dataset examples](https://docs.langchain.com/langsmith/manage-datasets.md) from the production trace inputs for offline evaluation.
* **View all evidence**: Click **View all in tracing** to view the evidence on the agent environment's **Tracing** page.

For more information, see [Manage a trace](https://docs.langchain.com/langsmith/manage-trace.md).

When feedback on a trace surfaces or confirms a recommendation, the recommendation lists that feedback under **Feedback cited by Engine**, below the diagnosis. Each entry shows a feedback key, such as one written by an online evaluator or a user's thumbs-down rating, and how many evidence traces cite it. Click a key to open the newest trace with that feedback. In the **Evidence** section, each trace that cites feedback also shows the cited feedback values next to **Open trace**. For how Engine uses feedback, see [How Engine selects traces](https://docs.langchain.com/langsmith/engine.md#how-engine-selects-traces).

Engine keeps tracking a recommendation after it is filed. Any new trace that matches the recommendation's pattern is added to **Evidence** automatically, so the recommendation shows how often the pattern still occurs, without you re-running anything.

The **Proposed Fix** section describes the change Engine recommends. If a repository is connected, the section also lists the files the change touches, with the lines added and removed in each.

## Change severity and status

To change a recommendation's severity, click the severity in the header and select **High**, **Medium**, or **Low**. Optionally add a note for Engine, then click **Update**. Engine [learns from](https://docs.langchain.com/langsmith/engine.md#how-engine-learns-from-your-actions-on-recommendations) the change and any note.

Closing records the outcome of your review. Click **Close** and select an outcome:

* **Done**: The recommendation is resolved. Its status becomes **Done**.
* **Not Important**: The finding is real but not worth acting on.
* **Incorrectly Flagged**: The finding is not real.

**Not Important** and **Incorrectly Flagged** change the status to **Dismissed**. After you close a recommendation, you can optionally add a note explaining the outcome, which Engine [learns from](https://docs.langchain.com/langsmith/engine.md#how-engine-learns-from-your-actions-on-recommendations).

You can reopen a closed recommendation at any time. Click **Reopen** to clear any fix in progress. Engine also reopens a recommendation automatically when it detects the same pattern recurring in a later trace.

## Open a pull request

To open a pull request with the proposed code change, first [connect a repository](https://docs.langchain.com/langsmith/engine-repositories.md), then click **Open PR**. If the fix spans more than one repository, the button reads **Open N PRs**. On GitLab, Engine opens a merge request, but the buttons keep their PR names. Once a pull request exists, the button changes to **View PR**. Click **View PR** to see the recommendation's pull requests, grouped by repository, and click one to open it in GitHub or GitLab. A pull request someone else opened, such as a coding agent's, is listed first, and Engine's own pull request moves under **Engine PR**. To have Engine write a new fix, click **Regenerate**. Engine reflects the PR's status (open, merged, or closed) throughout the recommendation.

To work on the fix yourself, click **Copy as prompt** to copy the fix prompt to your clipboard. To open the prompt directly in a coding agent, click the arrow next to the button and select **Fix in Robin**, **Fix in Claude Code**, **Fix in Claude**, **Fix in Codex**, or **Fix in Cursor**. The button then shows your last choice, such as **Fix in Claude Code**, so you can repeat that choice with one click. Engine can propose code changes to any connected repository, for an agent built with any framework or SDK.

## Create a Linear issue

To create a Linear issue, first [connect Linear](https://docs.langchain.com/langsmith/engine-setup.md#connect-to-linear), then click **Create in Linear** on a recommendation. Engine shows **Linear creation pending** while it creates the issue. When creation completes, Engine displays the linked Linear issue identifier on the recommendation and in the recommendation list.

The Linear issue includes the recommendation's title and description, severity, category, tags, a **View issue in LangSmith** link, and evidence trace IDs. Engine retains the link to the Linear issue. If you close the Linear ticket, Engine closes the corresponding recommendation. If you cancel the Linear ticket, Engine marks the corresponding recommendation as incorrectly flagged. Engine also tracks a pull request linked to the Linear ticket on the corresponding recommendation.

## Add offline examples

Turn a recommendation's evidence traces into ground truth [dataset examples](https://docs.langchain.com/langsmith/manage-datasets.md) so you can evaluate a fix offline before you ship the change.

1. Click **Engine proposed N examples** at the top right of the **Evidence** list to open the **Add as offline example** dialog. N is the number of examples Engine proposed for the recommendation. The button appears only when Engine has proposed examples.
2. Review each trace. The dialog shows the input, the wrong output the agent produced, and the proposed expected output as a custom ground truth example.
3. Click **Add to Dataset** to add them directly, or click **Edit in annotation queue** to review them first.
4. In the annotation queue, each example shows the run inputs alongside reference outputs proposed by Engine, structured as named [assertions](https://docs.langchain.com/langsmith/assertions.md) generated from trace analysis. Each assertion is a short claim describing what a correct answer should or should not include. Edit the assertions as needed, add new ones with **+ Add**, then click **Add to Dataset & Next** to work through each example.

For more information, refer to [Manage datasets](https://docs.langchain.com/langsmith/manage-datasets.md), [Use annotation queues](https://docs.langchain.com/langsmith/annotation-queues.md), and [Use assertions](https://docs.langchain.com/langsmith/assertions.md).

## Save a recommendation for later

Saving a recommendation for later sets the recommendation aside without resolving it or marking it as incorrectly flagged. Click **Save for later** when you are not ready to act on a recommendation but still want to know if the pattern keeps appearing. The button changes to **Saved**. To move the recommendation back to open, click **Saved**.

A saved recommendation shows a **Saved for later** banner in its detail panel. When new traces link to the recommendation, the banner shows how many arrived and the recommendation's entry in the list shows a warning icon, so you can act on the recommendation or keep it saved. To list saved recommendations, filter by **Saved for later** under **Activity**.

To get a Slack message when new traces link to a saved recommendation, click **Alert Slack on new traces to this issue** in the banner, then select a channel. If no Slack workspace is connected, connect Slack first. The channel applies to every saved recommendation in the agent environment. For other destinations, see [Engine notifications](https://docs.langchain.com/langsmith/engine-notifications.md).

Closing a saved recommendation, or marking it as incorrectly flagged, removes it from **Saved for later**.

## Flag a trace for Engine

A flagged trace is one you have asked Engine to review directly, for example a trace where your agent went wrong without raising an error or receiving a low score. For how flags fit into trace selection, see [How Engine selects traces](https://docs.langchain.com/langsmith/engine.md#how-engine-selects-traces).

Flagging a trace requires Engine to be enabled for your organization and the `feedback:create` permission, which the Workspace Admin and Workspace Editor roles include. For more information, see [Feedback permissions](https://docs.langchain.com/langsmith/organization-workspace-operations.md#feedback).

To flag a trace:

1. Open the trace and click **Flag for Engine**.
2. (Optional) Add a note describing what went wrong or what Engine should look for.
3. Click **Flag for Engine** in the popover.

The button changes to **Queued** and stays that way until Engine links the trace to a recommendation. Click **Queued** to update your note, or click **Unflag** in the popover to remove the flag. When Engine links the trace to a recommendation, the trace view hides the button and shows a **View issue** link to that recommendation. If Engine is not set up yet for the [agent environment](https://docs.langchain.com/langsmith/agent-environments.md) that contains the trace, the popover offers **Flag and set up Engine**, which saves the flag and opens its **Engine** tab to [finish setup](https://docs.langchain.com/langsmith/engine-setup.md).

## Filter and sort recommendations

### In the UI

The **Engine** page lists recommendations in the left panel, grouped by goal on LangSmith Cloud. Each entry shows a title, a severity indicator, a category, such as **Poor Tool Use** or **Code Defect**, and how recently Engine saw the pattern.

At the top of the list, you can click:

* **Filter recommendations** to narrow the list by:
  * **Severity**: **High**, **Medium**, or **Low**.
  * **Status**: **Open**, **Done**, or **Dismissed**.
  * **Activity**: **Saved for later**, or **New traces** for saved recommendations that new traces have linked to.
  * **Categories**: The categories of the agent environment's recommendations, such as **Code Defect**.
* **Sort recommendations** to order the list by **Default**, **Severity**, **Last Seen**, **Last Updated**, **Created**, or **# of Traces**.
* **Recommendations** to switch the panel to [Red Teaming](https://docs.langchain.com/langsmith/engine-red-teaming.md) reports.

To [configure Engine](https://docs.langchain.com/langsmith/engine-setup.md#configure-engine), click the **Configure Engine**  icon at the top of the panel.

Open [LangSmith Chat](https://docs.langchain.com/langsmith/chat.md#engine) to ask questions across your recommendations, for example, which ones need the most attention or how many new ones are open.

If no recommendations appear after setup completes, Engine found no recurring patterns in the analyzed traces. Try checking back after more traces have been collected.

### With the CLI

The [LangSmith CLI](https://docs.langchain.com/langsmith/cli.md) calls recommendations issues. Use `langsmith project issues list` to list an agent environment's recommendations. Filter with `--status` (`open`, `fixing`, `watching`, `completed`, or `ignored`) and `--priority` (`urgent`, `high`, `medium`, or `low`), and page with `--limit` and `--offset`.

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# List open, high-priority recommendations for an agent environment
langsmith project issues list --project <environment-tracer-session-name> --status open --priority high
```

## See also

* [LangSmith Engine](https://docs.langchain.com/langsmith/engine.md): How Engine finds recommendations and learns from your actions on them.
* [Set goals](https://docs.langchain.com/langsmith/engine-goals.md): Tell Engine what to improve and track progress with a metric.
* [Validate fixes automatically](https://docs.langchain.com/langsmith/engine-fix-validation.md): Replay a recommendation's traces before and after Engine's fix to confirm that the fix works.
* [Engine notifications](https://docs.langchain.com/langsmith/engine-notifications.md): Get alerted in Slack, Jira, or a webhook when Engine makes recommendations.
* [Manage datasets](https://docs.langchain.com/langsmith/manage-datasets.md), [Use annotation queues](https://docs.langchain.com/langsmith/annotation-queues.md), and [Use assertions](https://docs.langchain.com/langsmith/assertions.md): Work with the offline examples Engine generates.

***

[Connect these docs](https://docs.langchain.com/use-these-docs.md) to your agent of choice via MCP for real-time answers.

[Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/engine-recommendations.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
