LangSmith Engine: An Intelligent Operations Tool That Automatically Diagnoses and Fixes Agent Failures

LangSmith Engine uses AI Agents to automatically diagnose and fix production Agent failures.
LangChain launched LangSmith Engine, an AI Agent that monitors other Agents in production, hunting for failures, prioritizing issues, and drafting repair proposals. Built on sandbox isolation and a sub-Agent architecture, it represents the shift from passive observability dashboards to active AI-driven operations. The article explores how Agent evaluation for continuously running systems remains the industry's hardest unsolved challenge.
When Agents Start Fixing Agents
As AI Agents accelerate their deployment into production, an increasingly thorny reality is surfacing: Agents fail, and their failure modes are often complex, subtle, and hard to reproduce.
Understanding this complexity requires some background: errors in traditional programs are typically deterministic—the same input produces the same output, and bugs can be reliably reproduced. This property stems from the deterministic execution model of von Neumann architecture: the output of each instruction is entirely determined by the input state, and the entire program can be paused, inspected, and replayed at any point. Agent systems, however, rely on large language models for dynamic decision-making, with behavior that is inherently stochastic (determined by the sampling process controlled by the temperature parameter). Combined with the error accumulation effect in multi-step reasoning chains, the same task may follow entirely different execution paths across different runs. This paradigm shift from "deterministic computation" to "probabilistic decision-making" is the fundamental reason why Agent engineering complexity grows exponentially, and it's the point where traditional debugging tools and operations methodologies break down.
About the Temperature Parameter: Temperature is the core hyperparameter controlling the randomness of large language model outputs. Technically, at each token generation step, the LLM calculates logits (unnormalized probabilities) for all candidate tokens in the vocabulary. Temperature scales these logits through division before applying softmax normalization: high Temperature flattens the probability distribution (more diverse but potentially off-topic output), while low Temperature sharpens the distribution (more deterministic but potentially overly conservative output). A Temperature of 0 approximates Greedy Decoding, producing nearly deterministic output. Production-grade Agents typically set Temperature between 0.0 and 0.3 to ensure stability, but even then, floating-point precision differences and hardware scheduling non-determinism can still cause minor variations across runs. It's worth noting that besides Temperature, Top-P (nucleus sampling) and Top-K sampling also affect output randomness, and modern inference frameworks typically allow configuring all three parameters simultaneously to collectively shape the model's output distribution.
What makes things even trickier is that Agents often need to call external tools (APIs, databases, code execution environments), and any slight deviation in intermediate steps can cause overall task failure, with the root cause potentially buried among dozens of call steps. This "butterfly effect" has a dedicated term in Agent engineering: Error Cascading—a tiny judgment deviation in early steps gets progressively amplified as the reasoning chain extends, ultimately producing results far from expectations at the end, while the process of tracing back to the root cause from the end is extremely time-consuming.
Recently, Ben Tannyhill from the LangChain team shared their newly launched product—LangSmith Engine—on the Max Agency podcast.
About LangChain and LangSmith: LangChain was founded by Harrison Chase in October 2022 and is one of the most widely used LLM application development frameworks, with its GitHub Star count long ranking among the top AI projects. Its design philosophy derives from the software engineering principle of "composition over inheritance," allowing developers to build complex LLM workflows like building blocks through standardized abstraction layers like Chain, Tool, and Memory. LangSmith is the companion observability and evaluation platform launched by the LangChain team in 2023, positioned for Agent full lifecycle management—from development debugging to production monitoring. Notably, the LangChain team also launched LangGraph in 2024—a stateful multi-Agent orchestration framework based on a directed graph model, where each node represents an Agent or tool call, and edges represent state transition conditions. Compared to earlier chain models, LangGraph supports cyclic execution, conditional branching, and persistent state, with built-in checkpoint mechanisms for failure recovery and intermediate state auditing. LangSmith Engine is the latest capability extension of the LangSmith platform, and its sub-Agent architecture is very likely built on LangGraph, marking the platform's strategic transformation from passive monitoring to active operations.
This is an ambitious product: it is itself an Agent, specifically designed to "track your Agent's failures, prioritize issues, and draft fixes." In other words, this is an engineering practice of using Agents to govern Agents.

As enterprises deploy more and more Agents into production, operations and debugging costs are skyrocketing. Traditional logging and monitoring tools feel inadequate when facing Agent systems that are "non-deterministic, multi-step, and dynamically decision-making."
It's necessary here to explain the evolving background of the concept of Observability. Observability originates from control theory and in software engineering is typically composed of three pillars: Logs, Metrics, and Traces, collectively known as the "o11y three pillars." Traditional observability tools (like Datadog, Prometheus) were originally designed for microservices architectures: a request comes in, the service processes it, a response returns, and the entire process is linear with clear boundaries. But Agent systems break this assumption—a single user request might trigger dozens of rounds of LLM reasoning, tool calls, and self-reflection loops, with execution paths dynamically generated and no fixed call graph. This requires observability tools to understand the LLM's Prompt-Response structure, the contextual chain of tool calls, and the Agent's "Chain of Thought Trace" during multi-step decision-making. The traditional Span concept in distributed tracing—describing an operation with time boundaries—needs to be extended in Agent scenarios to "cognitive Spans" that carry semantic information, recording not just execution time, but also the model's reasoning process, confidence changes, and tool selection rationale.
Notably, the Agent observability field is gradually converging toward the OpenTelemetry (OTel) standard. OpenTelemetry was launched by CNCF in 2019 after merging the OpenTracing and OpenCensus projects, providing cross-language, vendor-neutral telemetry data collection SDKs that unify the collection interfaces for three types of signals: Traces, Metrics, and Logs. In Agent scenarios, OpenTelemetry's Span model is extended to express LLM call Prompt/Response pairs, tool call inputs/outputs, and Agent decision nodes. In 2024, the OpenTelemetry community officially launched the GenAI Semantic Conventions working group, specifically defining standardized attribute naming conventions for LLM and Agent scenarios, such as gen_ai.system (model provider), gen_ai.request.model (requested model name), gen_ai.usage.input_tokens (input token count), etc. Platforms like Arize AI and LangSmith have already provided OTel-compatible integration layers. This standardization trend means that in the future, Agent observability data can seamlessly integrate into enterprises' existing monitoring infrastructure without completely relying on proprietary platforms—which will also become an important consideration dimension for products like LangSmith Engine in enterprise procurement.
LangSmith Engine aims to fill precisely this gap—advancing observability from "discovering problems" to "automatically diagnosing and providing fix recommendations."
Core Capabilities: A Closed Loop from Discovery to Fix
According to Ben Tannyhill's introduction, LangSmith Engine's workflow can be broken down into three key stages:
1. Failure Hunting
Engine proactively "traverses" the target Agent's execution traces, searching for anomalies and failure patterns. This differs from traditional monitoring that passively waits for alerts—it's an active patrol approach. From a technical implementation perspective, "failure hunting" is essentially an anomaly detection problem, but the high-dimensional, sparse, and unstructured nature of Agent traces makes traditional statistical methods (like Z-score, IQR detection) difficult to apply directly—rather than detecting whether a metric deviates from the mean, Engine needs to understand whether a reasoning chain "makes semantic sense," which is precisely the core motivation for using an LLM to evaluate another LLM. For a production-grade Agent system generating massive call traces daily, manual investigation is virtually infeasible, making it more reasonable to have another Agent take on this "patrol work."
2. Problem Prioritization
Discovering problems is only the first step. Failures in real systems are often numerous and vary in severity; throwing them all at developers indiscriminately would actually cause information overload. Engine has a built-in prioritization mechanism to help teams focus on the critical issues with the greatest impact.
This design essentially simulates the judgment of a senior SRE (Site Reliability Engineer). SRE was created by Google in 2003, with the core philosophy of applying software engineering methods to operations work, balancing system stability and iteration speed through Error Budgets, SLO/SLA metric systems, and Postmortems. In SRE practice, "impact assessment" typically relies on three dimensions: the proportion of affected users (Breadth), fault duration (Duration), and the degree of user experience damage (Depth), with the product of the three approximating the business loss weight of the fault. Engine's prioritization mechanism essentially transplants this methodology to the Agent operations domain—not all failures deserve immediate attention; they need to be weighed against the number of affected users, degree of business loss, and cost of repair.
3. Drafting Fixes
The most imaginative step is automatically drafting fix proposals. Engine doesn't just tell you "what's broken" but also attempts to suggest "how to fix it." Although human engineers remain the final decision-makers, the collaborative model of "AI drafts first, humans review" is becoming the mainstream paradigm for AI-assisted development.
This paradigm has a formal name in software engineering: Human-in-the-Loop (HITL). HITL's design philosophy combines AI's efficiency advantages with human judgment: AI handles large volumes of repetitive, low-complexity decisions, while humans focus on reviewing high-risk, high-uncertainty critical nodes. In the Agent fix scenario, HITL is not only an engineering safety guarantee but also a compliance requirement—many industry regulatory frameworks (such as MiFID II in finance and FDA software guidance in healthcare) explicitly require human review mechanisms for critical operations of AI systems, and fully autonomous Agent repair behavior faces legal compliance risks in these scenarios.
Architecture Design: Sandbox Isolation and Sub-Agent Collaboration
In the podcast, Ben Tannyhill focused on two key architectural choices.
Sandbox Isolation
Since Engine needs to perform diagnostics and even attempt repair actions, security and isolation become the primary considerations. The team adopted a sandbox mechanism to run related operations.
Sandbox is a classic technique in computer security, originally used in browsers (like Chrome's process isolation model) and operating systems (like macOS's App Sandbox), controlling the spread of potential damage by limiting a program's resource access permissions. In Agent engineering, the necessity of sandboxes is even more pronounced: a diagnostic Agent with code execution, file read/write, or external API call capabilities, if run without isolation in a production environment, could itself become a new source of failures through its "repair" actions. Common sandbox implementations include containerization (Docker/Kubernetes namespace isolation), virtual machine snapshots (for easy rollback), and the principle of least privilege. In cloud-native architectures, gVisor (Google's open-source user-space kernel) and Firecracker (AWS's open-source lightweight micro-VM, the underlying technology for Lambda and Fargate) are common high-security sandbox solutions—the former isolates containers by intercepting system calls in user space, while the latter completely isolates workloads through independent guest kernels, allowing teams to choose between them based on security requirements and performance overhead.
For Agent systems, sandboxes also need to guard against Prompt Injection attacks—a security threat specifically targeting LLM applications, first publicly demonstrated by Riley Goodside in 2022. The attack principle involves hiding malicious instructions in external content that the Agent processes (such as web page text, documents, API responses), causing the model to mistake the attacker's instructions for legitimate system instructions and execute them. Indirect Prompt Injection is particularly dangerous: attackers don't need to interact directly with the Agent; they only need to plant malicious content in the Agent's information sources. For a diagnostic Agent with tool-calling capabilities, prompt injection could lead to data exfiltration, privilege escalation, or destructive operations. Currently, the industry has no completely reliable defense solution; OWASP (Open Web Application Security Project) has listed prompt injection as the top security risk for LLM applications. Sandbox isolation is an important engineering measure for reducing the impact scope of attacks, rather than a complete solution.
This decision is very pragmatic—having one Agent modify another Agent's runtime environment inherently carries risk, and sandboxes can limit the spread of side effects, preventing "repair" from devolving into "destruction."
Sub-Agent Architecture (Subagents)
To handle complex diagnostic tasks, Engine is designed to be completed through collaboration among multiple sub-Agents.
The architectural thinking behind Multi-Agent Systems can be traced back to distributed artificial intelligence research in the 1980s, with its theoretical foundation being the "Contract Net Protocol" proposed by Victor Lesser and others—a distributed task allocation mechanism based on task bidding and tendering, which shares striking similarities with the "Orchestrator-Worker" pattern in modern multi-Agent frameworks. In modern LLM applications, a single monolithic Agent faces context window limitations, reasoning capability boundaries, and debugging difficulties. The design of decomposing complex tasks into multiple focused sub-Agents is similar to how microservices architecture transforms monolithic applications: each sub-Agent has clear responsibility boundaries, an independent toolset, and limited context burden, while the coordination layer (Orchestrator) handles task distribution and result integration. Current mainstream multi-Agent frameworks (such as AutoGen, CrewAI, LangGraph) provide different coordination modes including sequential pipelines, parallel execution, and dynamic routing. LangGraph, as the LangChain team's self-developed framework, naturally supports the checkpoint recovery and intermediate state auditing capabilities needed by LangSmith Engine through its directed graph structure and persistent state management—this ensures that every decision made by sub-Agents can be fully traced and replayed, not just the final results. Notably, in Anthropic's Claude multi-Agent usage guide published in 2024, it explicitly recommends introducing Trust Boundaries between sub-Agents in multi-Agent systems involving high-risk operations—instructions from the coordination layer should be granted user-level rather than system-level trust to prevent malicious Orchestrators from abusing sub-Agents' tool-calling permissions. LangSmith Engine's delegation of failure detection, priority judgment, and fix draft generation to dedicated Agents is a concrete practice of this design philosophy.
This multi-Agent division-of-labor architecture is an important trend in the current Agent engineering field: decomposing massive tasks into multiple focused subtasks, handled by different sub-Agents each fulfilling their roles, with results integrated through a coordination layer. Compared to a single monolithic Agent, this design offers clear advantages in maintainability, debuggability, and performance.
The Biggest Challenge: Building an Evaluation System for Never-Stopping Agents
The most technically dense part of the entire conversation was how the team builds an evaluation system (Evals) for an Agent that "never stops."
Traditional model evaluation is typically based on fixed test sets: given inputs, compare outputs, calculate metrics. But LangSmith Engine is a continuously running system that constantly processes dynamic inputs, with no clear "start" and "end," and an input distribution that continuously shifts. This makes "how to measure whether it's doing well" an open-ended challenge.
Agent Evaluation (Evals) is a widely acknowledged technical challenge in current AI engineering. Traditional NLP evaluation relies on standard datasets (like GLUE, SuperGLUE) and automated metrics (like BLEU, ROUGE), but these methods are almost completely ineffective for Agents. First, Agent evaluation needs to focus on process rather than just results—even if the final answer is correct, whether intermediate tool calls were reasonable and whether the reasoning chain was efficient are equally important. Second, input distributions in production environments continuously drift (Distribution Shift), and static test sets quickly lose representativeness. This problem has a dedicated term in machine learning: Dataset Contamination—when model training data overlaps with evaluation data, evaluation scores systematically overestimate actual capabilities. For Agent evaluation, a similar problem manifests as "evaluation set overfitting": development teams unconsciously optimize Agent behavior for the evaluation set, causing the gap between evaluation scores and actual production performance to widen.
One important exploration direction in the industry is the LLM-as-Judge evaluation paradigm, systematically proposed by Lianmin Zheng et al. in the 2023 MT-Bench paper: the core idea is using more capable LLMs (like GPT-4) to judge the output quality of the model being tested, replacing human annotation. This method has particular value in Agent evaluation—manual evaluation is costly and difficult to scale, while traditional automated metrics cannot capture the reasonableness of the reasoning process. Of course, the challenges facing LLM-as-Judge are equally significant: position bias (Judge tends to prefer the first option), verbosity bias (preference for longer answers), and self-reinforcement bias (models from the same family give each other inflated scores) are all known systematic defects. Research from Stanford University in 2024 further pointed out that when the Judge model and the evaluated model come from the same provider, scoring bias can be as high as 15%, directly challenging common practices like "using GPT-4 to evaluate GPT-4o." Other exploration directions include Trace Similarity comparison and online evaluation based on human feedback (an evaluation variant of RLHF).
For continuously running systems like LangSmith Engine, the Data Flywheel mechanism is another evaluation approach worth attention. The data flywheel concept was first systematically articulated by Andrew Ng in his 2021 "AI Is Data" presentation, with the core insight that in AI product competition, advantages in data quality and data accumulation speed are often more enduring than advantages in model architecture. Specifically for Agent evaluation scenarios, the data flywheel means continuously flowing real user feedback from production traffic (explicit ratings or implicit behavioral signals, such as whether users accepted the Agent's repair suggestions) back into the evaluation dataset, keeping the evaluation set synchronized with the actual input distribution. This requires the system to have supporting capabilities like online sampling, annotation queue management, and evaluation set version control, as well as solving the annotation cold start problem—how to establish an effective evaluation baseline when there's insufficient annotation data in the early stages. How to design evaluation metrics that are aware of real business value remains an open question without standard answers.
This challenge has universal significance. As more and more Agents enter production in persistent, long-running forms, how to assess their decision quality and how to judge superiority without standard answers is a problem the entire industry needs to face. The LangChain team's exploration in this area has reference value for all teams building production-grade Agents.
Industry Signal: Observability Is Becoming Agent-ified
From the LangSmith Engine product, several broader industry trends can be discerned.
AI infrastructure itself is being reshaped by Agents. Past observability tools were dashboards for human use; future observability tools may be Agents capable of autonomous diagnosis and repair. The boundary between tools and the objects being tooled is gradually blurring. This trend has precedents in software engineering history: compilers were once tools manually operated by programmers, while modern IDEs can automatically detect compilation errors and suggest fixes; network operations once relied on humans manually logging into devices to execute commands, while AIOps platforms can now automatically identify anomalies and trigger predefined repair Runbooks. What LangSmith Engine represents is the latest extension of this trend at the AI system operations layer.
AgentOps is becoming an independent engineering discipline. Just as DevOps and MLOps each spawned complete toolchains, Agent deployment, monitoring, debugging, and evaluation are forming their own methodologies and tool ecosystems. DevOps was shaped around 2009 by Patrick Debois and others, merging development and operations processes, spawning CI/CD pipelines, Infrastructure as Code, and other toolchains; MLOps emerged after 2015 alongside the industrialization deployment needs of deep learning, focusing on model training, version management, and drift detection, with representative tools including MLflow, Kubeflow, and Weights & Biases. The challenge AgentOps faces is that it simultaneously inherits the complexity of both, plus the additional non-determinism of LLM reasoning, side effect management of tool calls, and maintenance of long-running state, making it currently one of the least engineered and least standardized operations domains. A notable milestone: in 2024, Google DeepMind promoted the Agent Contract mechanism internally, requiring every Agent deployed to production to be accompanied by a formalized Capability Declaration and Failure Mode Documentation, signaling that major tech companies have begun incorporating AgentOps into formal engineering specification systems. As AgentOps matures as an independent field, we expect to see Agent operations specifications similar to SRE Runbooks gradually emerge, with LangSmith Engine being one representative.
Evaluation (Evals) is the unavoidable hard problem of Agent engineering. No matter how strong a product's capabilities are, if effects cannot be reliably measured, it's difficult to continuously optimize and build trust. LangChain's making the evaluation challenge a core podcast topic also confirms the importance and difficulty of this aspect in practice. Notably, in 2024, Anthropic, OpenAI, and Google DeepMind successively released their respective Agent evaluation frameworks, but the three differ significantly in evaluation dimensions, metric definitions, and benchmark tasks, and the industry has not yet formed a consensus benchmark analogous to ImageNet for computer vision—this gap is both a current challenge and a harbinger of future opportunity.
Summary
LangSmith Engine represents a direction worth watching: using AI to manage AI. When the scale and complexity of Agents exceed the limits of direct human operations, "having Agents look after Agents" may be an inevitable evolutionary path. For teams deploying Agents in production environments, the discussions around sandbox isolation, sub-Agent collaboration, and continuous evaluation provide considerable engineering experience to draw from. From a broader perspective, the emergence of LangSmith Engine also foreshadows that AI engineering is entering a new stage of maturity: when we begin using AI to govern AI, the complexity of the toolchain itself has surpassed the boundaries of human-only management, and the emergence of a systematic AgentOps methodology and standardized tool ecosystem will be an inevitable outcome of this field's development.
The full conversation can be found on the Max Agency podcast on YouTube, Apple Podcasts, and Spotify.
Key Takeaways
- The fundamental cause of Agent failures lies in the paradigm shift from deterministic computation to probabilistic decision-making, where error cascading effects cause debugging difficulty to grow exponentially
- LangSmith Engine represents the evolutionary direction of observability tools: from passive data-displaying dashboards toward Agents that proactively diagnose and generate fix proposals
- Sandbox isolation and sub-Agent division of labor are the two core security and engineering principles for current production-grade Agent system architectures—the former limits side effect propagation, the latter improves maintainability
- Agent Evaluation (Evals) is currently the industry's most under-standardized component, with LLM-as-Judge and data flywheel mechanisms being the two most promising exploration directions
- AgentOps is becoming an independent engineering discipline following DevOps and MLOps, with the OpenTelemetry standardization process determining the future integration landscape of enterprise-grade toolchains
Related articles

Kimi K3 Deep Dive: 2.8 Trillion Parameter Open-Source Model Closes the Gap with Closed-Source Frontier for the First Time
Moonshot AI releases Kimi K3 open-weight model with 2.8T parameters and 1M token context. Our deep dive covers coding, 3D dev, agent capabilities, and safety concerns.

How to Choose an AI Agent Platform for Your Team: 5 Evaluation Dimensions and a Decision Framework
Choose the right AI Agent platform by evaluating model flexibility, observability, tool integration, security compliance, and total cost. A complete decision framework to help technical leaders avoid vendor lock-in.

Legora's Legal AI Practice: How Vertical AI Empowers Law Firms and Corporate Legal Transformation
Explore Legora's legal vertical AI practice, covering AI model selection strategies, enterprise legal transformation challenges, and the path to deploying vertical AI in the legal industry.