LangChain's GTM Agent is an internal production system built on Deep Agents and deployed through LangSmith Deployments. A LangChain software engineer built a self-healing deployment and maintenance pipeline around it that detects regressions after each deploy, decides whether the change caused them, and hands confirmed issues to Open SWE, LangChain's internal open-source async coding agent.
Right after each production deploy, a self-healing GitHub Action triggers and captures the build and server logs. The flow has two paths. The first checks that the Docker images build. If a build fails, the pipeline pipes the CLI error logs and the git diff of the last commit to main straight to Open SWE with no human involved, since build failures are almost always caused by the most recent change.
The second path looks for server-side regressions against the background error rate. It collects all error logs from the past 7 days and normalizes them into error signatures: regex replaces UUIDs, timestamps and long numeric strings, and each message is truncated to 200 characters so logically identical errors are bucketed together. It then polls errors from the current revision for 60 minutes after deployment, normalized the same way. For each signature, the expected hourly rate from the baseline is scaled to the 60-minute window, and the signature is flagged as a potential regression when the observed count significantly exceeds the Poisson expectation (p < 0.05). Signatures absent from the baseline are flagged if they occur repeatedly in the window.
Because correlated failures such as traffic spikes or API outages break the independence assumption, flagged errors are not sent directly to Open SWE. The diff from the last commit and the specific error go to a triage agent, also built on Deep Agents. It first classifies every changed file as runtime, prompt/config, test, docs, CI and so on; changes that touch only non-runtime files are treated as extremely unlikely causes. For runtime changes, the agent must establish a concrete causal link between a specific line in the diff and the observed error. It returns a structured verdict with its decision, confidence, reasoning and the error signatures it attributes to the change, so Open SWE receives a focused investigation prompt.
Once the triage agent green-lights an investigation, Open SWE works through the bug and opens a PR, and the engineer is notified when it is ready for review. It has been most useful for bugs that do not crash loudly: silent failures that return wrong defaults, configuration mismatches between code and deployment, and cascading regressions where fixing one bug unmasks the next. Planned work includes a wider lookback window beyond the previous version, smarter error grouping, and choosing between rollback and fix-forward based on severity and triage confidence.
Details
- City
- San Francisco
- Organization
- LangChain
- Continent
- North America
- Country
- United States
- Category
- Software
- Type
- Deployment
- Id
- 9e36e2ca-7783-48df-8f67-5ca2bd305b06
- Created At
- 27 Nov 2026