LangSmith Engine adds Goals to investigate why agents miss production outcomes

LangChain’s Engine Goals uses outcomes attached to production traces to prioritize investigations. A coding team could use pull request decisions to find where apparently successful runs fall short.

Editorial cover: LangChainEditorial cover: LangChain
Company marks identify their owners. Reference only; no endorsement.

LangChain launched Goals for LangSmith Engine on December 3. Teams that already trace their production agents can describe an outcome in plain language, such as getting more agent-authored pull requests merged. Engine helps define a metric, uses it to decide which traces to investigate, and tracks it as the team makes changes. The new capability gives engineering teams a way to investigate runs that finish successfully in the trace but fail to deliver work people use. LangChain’s Goals announcement

An illustrative LangSmith Engine Goal links pull request outcomes to production traces. Comparing merged and closed pull requests guides a proposed fix and a regression test.An illustrative LangSmith Engine Goal links pull request outcomes to production traces. Comparing merged and closed pull requests guides a proposed fix and a regression test.
Illustrative coding-agent workflow based on LangChain’s Goals announcement. Linking pull request outcomes to traces gives Engine evidence for choosing what to investigate.

LangChain blog article headed Toward goal-oriented agent improvement with LangSmith Engine.
LangChain’s December 3 announcement introducing Goals for LangSmith Engine. · Original source

How a Goal changes the investigation

Engine has been clustering recurring failures and proposing fixes and evaluation coverage since its May launch. LangChain’s engineering write-up describes a system that screens compact summaries of agent runs before pulling full traces for a closer look. Findings can become issues with trace evidence, proposed evaluators, or examples for a regression dataset. Goals adds a team-defined outcome that helps Engine decide where to spend that investigative effort. Original Engine launch · Engine architecture

Teams can create a Goal in LangSmith or describe it to Engine in Slack. Engine looks for a usable signal in existing trace data or feedback, or checks whether an evaluator could measure it. When the signal lives in another system, Engine can help instrument the agent, including proposing a pull request that records the outcome as feedback on the relevant trace. Once the Goal is defined, Engine groups existing recommendations that serve it and uses the metric to guide future investigations. LangChain says Engine still looks for important issues outside those Goals at a lower frequency. Goals announcement

A successful tool call can hide abandoned work

LangChain illustrates the change with Content Studio, its internal design agent. The team wanted more generated content to make it into marketing campaigns and used social publication as its measure. Content Studio already recorded publication elsewhere. LangChain says Engine opened a pull request to attach that outcome to the corresponding traces, giving it examples of comparable requests with different results. Content Studio case study

Engine found that videos that went through follow-up edits were less likely to be posted, even when those edits finished without errors. One pattern in the unpublished work was especially revealing. A request to change the closing slide could regenerate the whole video, forcing users to review scenes they had already approved. LangChain says Engine proposed preserving the project and editing only the affected scenes. It added revision requests to the regression dataset and evaluated the fix against the full dataset before shipment. The announcement describes the fix and its pre-release checks. It gives no before-and-after publication rate. Content Studio case study

Start with one kind of pull request

For a coding agent, a practical first Goal would be to increase the share of agent-authored test-fix pull requests that reviewers merge within seven days. Define the denominator as all eligible pull requests opened by that agent whose seven-day window has elapsed. Join each pull request to the run that created it, and record what happened as trace feedback. Track closed and still-open pull requests separately so a review backlog does not look like a wave of rejected fixes. Monitor the share of pull requests with a matched trace so gaps in instrumentation are visible alongside the merge rate.

Use the resulting labels to compare similar work. If merged and closed pull requests both passed CI, look at what reviewers asked the agent to change. A pattern of reviewers asking for smaller diffs could justify testing a narrower editing strategy. Add representative requests to the offline suite and check that the patch fixes the target test, keeps the rest of the suite green, and stays within the intended scope. After shipping, compare the same class of pull requests over the same observation window. Changes in reviewer workload or task mix can move merge rates independently of the agent. Guide to evals for AI agents

That workflow gives the production metric and the offline suite distinct jobs. The metric helps Engine find work worth investigating. The suite tests whether a proposed fix addresses the observed failure and preserves behavior the team already relies on.

Sources

  1. Toward goal-oriented agent improvement with LangSmith Engine
  2. LangSmith Engine: How We Built an Agent for Improving Agents
  3. Introducing Langsmith Engine