LangSmith Engine: an agent that debugs your agents

LangSmith Engine: an agent that debugs your agents
LangSmith Engine: an agent that finds your agent's failures and proposes the fix
I also explain it in this video, on my Articulator EN channel. The figures in this post are frames from the video.

What is LangSmith Enginelink

Until now, improving an agent was manual work: reading traces, looking for patterns, writing evals, and preparing fixes. According to LangChain, Engine runs that cycle for you:

  • It watches your production traces.
  • It groups failures into named issues.
  • It finds the root cause in your code.
  • It proposes the fix and the evals that keep the failure from coming back.

The key word is proposes: you review the changes and decide whether to merge them. It has been available in public beta since the day of the announcement.

The usual cyclelink

The article starts from an observation: every team building agents follows the same steps.

  1. Trace the agent to see what it's doing.
  2. Find patterns in failures or gaps in functionality.
  3. Change prompts, tools, logic, or structure.
  4. Build ground truth data from real traces.
  5. Run experiments to confirm the improvement and check for regressions.
  6. Ship and repeat.
The six steps of the agent development cycle, in a ring.
The six steps of the agent development cycle.

Where it gets stucklink

LangSmith already had pieces for each step: trace views, fast dataset creation, and experiments. But, according to LangChain, customers kept raising four complaints:

  1. Knowing what to fix is hard: reviewing traces one at a time doesn't reveal patterns.
  2. How often does it happen? With thousands of traces, it's hard to tell how often the same error recurs.
  3. Turning production data into evals is tedious, so many teams skip it.
  4. No evaluator for that failure: once a fix ships, there's usually no targeted evaluator. If the problem comes back, nobody notices.

Engine aims to work across the whole cycle at once: a prioritized list of clustered failures, fixes drafted automatically, and new examples proposed for your test suite.

One failure, start to finishlink

The article explains it with a hypothetical example: an agent that handles customers for a subscription service. The numbers below come from that example, not real data.

The signallink

Engine detects a cluster of traces where users ask how to cancel. The agent answers, but the online evaluators score those answers as failures and users leave negative feedback. Latency is normal, so no alert ever fired.

The issuelink

Engine turns it into a single named issue: the agent fails to handle cancellation requests accurately. It gives it a severity (high: it affects 12% of support sessions that week), says when it started (four days ago, right after a deployment; a correlation in time, not proof of cause), and links the specific traces as evidence.

The example issue: high severity, 12% of sessions, started four days ago, with linked traces as evidence.
The example issue: severity, when it started, and the traces as evidence.

The root cause and the fixlink

If you connect your repository, Engine reads the relevant code and finds the root cause: the cancellation tool's description is ambiguous, so the agent tries to cancel the subscription when the user is only asking about their options. Engine drafts a pull request with a targeted change to that description.

The custom evaluatorlink

To keep tracking that failure, it also proposes an online evaluator scoped to this exact issue. If the problem comes back after the fix ships, the issue resurfaces on its own, with updated details.

The test exampleslink

Finally, it pulls the failing traces into a dataset for your offline evals. Each example comes with its own criteria: what a correct answer should contain. It's the sentence that best sums up the product: the failures that made it to production become the test cases that keep them out.

Production failures become tests that keep them out.
Production failures become the tests that keep them out.

That's the full cycle, run autonomously and surfaced for your review: the signal becomes an issue, the issue a root cause, the cause a fix, and the fix evals that keep watching it. The article sums it up in four phases: monitor, build, test, and deploy.

The article's four phases: monitor, build, test, and deploy.
The article's figure, redrawn: monitor, build, test, and deploy.

The real screenshotlink

The article also includes a screenshot of the tool, with a different case from the example. It's the Chat-LangChain project, with 51 issues. The top one says the agent gets stuck calling the docs search tool over and over until it hits the maximum number of iterations: about twenty traces in a week with six or more searches per turn, with nearly identical queries.

Screenshot from the article: the Chat-LangChain issue list and the proposed fix for the search loop.
The original screenshot from the article: the issue list and the open issue.

The proposed fix changes the system prompt: before each search, the agent states what new information it's looking for, and it stops after two near-duplicate queries. On top of that, each tool is wrapped in a guard that cuts off repeated calls, so the loop ends even if the model ignores the instruction.

The prompt diff Engine proposes and the dedupe guard on every tool.
The proposed fix: the prompt diff and a dedupe guard.

Three actions per issuelink

For every issue it finds, Engine proposes three actions:

  1. Open a PR. With repository access, it writes a targeted change to the code or the prompt. You review it and merge it.
  2. Create an online evaluator focused on that exact problem. If it fires again, the issue resurfaces with updated details.
  3. Add examples to your offline evals: the failing traces, turned into ground truth examples.

The interesting part is that every resolved issue leaves something behind. When you confirm a fix, you also generate an evaluator that watches that behavior from then on. Over time, the issues you've already resolved make your evals more complete, and that makes future improvements more robust.

Every resolved issue adds an evaluator and eval coverage grows.
Every resolved issue leaves an evaluator behind: coverage grows.

How it works under the hoodlink

LangSmith Engine is itself a deep agent with access to your traces, your evaluator results, and, if you connect the repo, your agent's source code. It watches five kinds of signals:

  1. Explicit errors: failing tool calls, timeouts.
  2. Online evaluator failures.
  3. Trace anomalies: latency spikes, token blowouts, or an unexpected number of steps.
  4. Negative feedback from users.
  5. Unusual behavior, like questions the agent wasn't built to answer.
The five signals Engine watches.
The five signals Engine watches.

When it spots the same pattern across many traces, it groups them into one named issue instead of flagging each failure on its own: one clear problem you can prioritize, instead of a hundred scattered alerts.

And it sits on top of what you already have in LangSmith: it uses your evaluator results as input, so the failures your evals already catch feed straight into issue detection. If it proposes a new evaluator, it's because it found a gap in your coverage, and the examples it creates go straight into your offline evals. To get started, you connect a tracing project and, optionally, your repo; according to LangChain, no new infrastructure required.

Engine builds on the traces, evaluators, and datasets you already have in LangSmith and fills coverage gaps.
Engine builds on what you already have in LangSmith.

What customers saylink

According to LangChain, teams like Cogent, Harmonic, and Campfire have already used it to resolve issues affecting thousands of traces: they catch regressions earlier, ship fixes faster, and spend less time on triage. The article gives no numbers for those gains. It does include a quote from Austin Berke, founding engineer at Harmonic:

We love it so far. Our deepagent traces can contain dozens or hundreds of turns, which makes review and identifying patterns tedious. LangSmith Engine saves our team hours of digging by not only identifying emerging failure modes, but also proactively suggesting evals and code changes to resolve them quickly.

Austin Berke's quote, from Harmonic.
Austin Berke's quote, from Harmonic.

Where it's goinglink

For LangChain, agent development has been manual for too long. They want a cycle that runs continuously without anyone triggering it, well-understood issues that get resolved without human review, and a harness that learns your specific agent over time. Those are goals, not results: today, Engine proposes and you decide. They present it as the first step.

Summarylink

LangSmith Engine watches your production traces, groups failures into named issues, finds the root cause in your code, and proposes three things: the fix as a PR, a custom evaluator, and new test examples. The underlying idea is that every resolved failure leaves your evals a little stronger.

In one sentence

The failures that reach production become the test cases that keep them out.

Sourceslink

Continue reading

Last posts -->

Have you seen these projects?

Gymnasia

Gymnasia Gymnasia
Expo
React Native
TypeScript
OpenAI
Anthropic

Fitness app with two agents that run entirely on the device, with no backend, so the user's data never leaves the phone. A BYOK conversational coach with local tools and a remote system prompt with offline fallback, plus a food estimator that pulls macronutrients out of a photo of the plate, with barcode scanning against OpenFoodFacts.

LangGraph Deep Researcher

LangGraph Deep Researcher LangGraph Deep Researcher
Python
LangGraph
FastAPI
React
TypeScript
Docker

Multi-agent research system built with LangGraph. A supervisor breaks your question down into topics and launches search sub-agents in parallel; each one compresses its findings before handing them to a writer agent that produces the final sourced markdown report. Live streaming over WebSockets, a configurable model per role and bring-your-own API keys that are never persisted server-side.

Tau

Tau Tau
Python
LangChain

Multi-agent tutoring system for secondary school students, with one agent per subject and course material written and validated by a team of teachers. It was used with real students at a private school in Spain and at a secondary school in Colombia.

View all projects -->
>_ Available for projects

Do you have an AI project?

Let's talk.

maximofn@gmail.com

Machine Learning and AI specialist. I develop solutions with generative AI, intelligent agents and custom models.

Do you want to watch any talk?

Last talks -->

Do you want to improve with these tips?

Last tips -->

Use this locally

Hugging Face spaces allow us to run models with very simple demos, but what if the demo breaks? Or if the user deletes it? That's why I've created docker containers with some interesting spaces, to be able to use them locally, whatever happens. In fact, if you click on any project view button, it may take you to a space that doesn't work.

Flow edit

Flow edit Flow edit

FLUX.1-RealismLora

FLUX.1-RealismLora FLUX.1-RealismLora
View all containers -->
>_ Available for projects

Do you have an AI project?

Let's talk.

maximofn@gmail.com

Machine Learning and AI specialist. I develop solutions with generative AI, intelligent agents and custom models.

Do you want to train your model with these datasets?

short-jokes-dataset

HuggingFace

Dataset with jokes in English

Use: Fine-tuning text generation models for humor

231K rows 2 columns 45 MB
View on HuggingFace →

opus100

HuggingFace

Dataset with translations from English to Spanish

Use: Training English-Spanish translation models

1M rows 2 columns 210 MB
View on HuggingFace →

netflix_titles

HuggingFace

Dataset with Netflix movies and series

Use: Netflix catalog analysis and recommendation systems

8.8K rows 12 columns 3.5 MB
View on HuggingFace →
View more datasets -->