Agents

LangChain releases open-source Kubernetes SRE agent

LangChain has built an open-source autonomous SRE agent for Kubernetes to automate cluster triage and reduce engineer burnout by safely gating all infrastructure changes.

LangChain Blog5 days agoAgents
Image: LangChain Blog

LangChain has released an open-source autonomous Site Reliability Engineering (SRE) agent designed to monitor, triage, and safely remediate issues in Kubernetes clusters. Built using the Deep Agents framework over LangGraph, the tool aims to alleviate the cognitive load on infrastructure teams by automating mechanical triage. The architecture splits responsibilities between a central orchestrator powered by Anthropic's Claude Sonnet and several specialized, read-only subagents running on the cheaper Claude Haiku model. These subagents include a pod-inspector, scaling-analyzer, performance-analyzer, log-analyzer, security-auditor, and reliability-auditor.

To optimize operational costs, LangChain designed a proactive scheduler that bypasses the full orchestrator. Instead of triggering a complete investigation that requires roughly 20 model calls, the scheduler gathers raw cluster state using the Kubernetes Python client with zero LLM tokens, then makes a single Claude Haiku call to generate a structured health report. This optimization achieved a 95% to 99% cost reduction per check. For safety, the agent cannot execute changes autonomously. All write operations, such as scaling a deployment or patching a Horizontal Pod Autoscaler, are restricted to a single change-executor subagent and require human approval via Slack.

The development team utilized LangSmith to trace agent decisions and identify system inefficiencies, such as a runaway tool loop that burned five dollars before being capped with hard recursion and tool limits. LangSmith also helped resolve a recurring false positive where the scaling-analyzer flagged single-replica services as critical. By leveraging LangSmith Engine, the team automated the detection of issues, such as a scheduled health check failing to collect CPU and memory metrics because the collector lacked the necessary tools. The engine automatically generated a GitHub pull request to wire in the required capabilities.

For DevOps practitioners, this agent shifts the paradigm of cluster management from constant manual monitoring to high-level oversight. By keeping write tools narrow and legible, engineers can confidently approve or reject proposed changes directly from Slack, backed by structural read-write separation and in-cluster role-based access control. The agent is currently available as an open-source project on GitHub.

This is our own summary of reporting by LangChain Blog

More in Agents