<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Naman Bhatt</title>
    <description>The latest articles on DEV Community by Naman Bhatt (@reverser_101).</description>
    <link>https://dev.to/reverser_101</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F99mvlsfu5tfj9m7ku25d.png</url>
      <title>DEV Community: Naman Bhatt</title>
      <link>https://dev.to/reverser_101</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/reverser_101"/>
    <language>en</language>
    <item>
      <title>Turning Solo AI Agents into an SRE Incident Squad with Switch</title>
      <dc:creator>Naman Bhatt</dc:creator>
      <pubDate>Sat, 07 Nov 2026 16:42:02 +0000</pubDate>
      <link>https://dev.to/reverser_101/turning-solo-ai-agents-into-an-sre-incident-squad-with-switch-5cgn</link>
      <guid>https://dev.to/reverser_101/turning-solo-ai-agents-into-an-sre-incident-squad-with-switch-5cgn</guid>
      <description>&lt;p&gt;Every engineering team knows the dread of the 2:00 AM PagerDuty alarm: checkout is throwing HTTP 500 errors, customers are abandoning carts, and the slack channel is filled with panicked questions.&lt;/p&gt;

&lt;p&gt;AI coding agents like Claude Code, Codex, and OpenCode have revolutionized solo developer productivity. But when production breaks, &lt;strong&gt;solo agents struggle&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They exist in an isolated terminal on one developer’s laptop.&lt;/li&gt;
&lt;li&gt;They hallucinate causes from coincidental log lines without empirical testing.&lt;/li&gt;
&lt;li&gt;They lack shared state with human teammates.&lt;/li&gt;
&lt;li&gt;Giving an unconstrained LLM write access to production infrastructure is an SRE nightmare.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We built &lt;strong&gt;IncidentPilot&lt;/strong&gt; to solve this: an autonomous, human-supervised engineering incident response squad running directly inside team chat via &lt;strong&gt;Switch&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Switch is the Missing Piece for Agentic Teams
&lt;/h2&gt;

&lt;p&gt;Switch is open-source infrastructure that brings AI agents into team chat (Mattermost, Slack, Discord, Microsoft Teams). What makes Switch fundamentally different from a simple chatbot webhook:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Shared Room Context&lt;/strong&gt;: Humans and agents read from the exact same timeline of messages, attachments, and decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Room Documents&lt;/strong&gt;: Living state (incident war-boards, post-mortems) stored natively in the room via &lt;code&gt;create_room_document&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Role Leases (&lt;code&gt;assume_role&lt;/code&gt;)&lt;/strong&gt;: Jobs like &lt;code&gt;@sre-commander&lt;/code&gt; or &lt;code&gt;@sre-debugger&lt;/code&gt; are held as distributed leases, preventing split-brain race conditions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wire-Level Agent Protocol&lt;/strong&gt;: Server-Sent Events (SSE) streaming down, HTTP operations up, and 2-second heartbeats ensuring true distributed resilience.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. The Squad Architecture
&lt;/h2&gt;

&lt;p&gt;Inside &lt;code&gt;#sre-incident-war-room&lt;/code&gt;, four specialized agents collaborate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@sre-commander&lt;/code&gt;&lt;/strong&gt;: Listens for alerts, assigns severity (P1–P3), pins a live incident document, and manages the state machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@sre-diagnostician&lt;/code&gt;&lt;/strong&gt;: Slices container logs, queries Prometheus metrics, and retrieves relevant runbooks via Hybrid BM25+Dense RRF search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@sre-debugger&lt;/code&gt;&lt;/strong&gt;: Runs automated tests in an isolated microservice sandbox (&lt;code&gt;orders-api&lt;/code&gt;), reproduces the exact failure trace, and drafts a surgical patch diff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@sre-critic&lt;/code&gt;&lt;/strong&gt;: An adversarial reviewer (ported from &lt;code&gt;incident-suite&lt;/code&gt;, MIT) that cross-examines the diagnosis to catch hallucinations and checks the patch for regression risks.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. Engineering Invariants: Beyond "AI Vibe-Coding"
&lt;/h2&gt;

&lt;p&gt;To make IncidentPilot production-ready, we enforced three core engineering invariants:&lt;/p&gt;

&lt;h3&gt;
  
  
  A. Empirical Causal Triangulation
&lt;/h3&gt;

&lt;p&gt;A diagnosis is rejected unless it can be empirically falsified in the sandbox:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The regression test must fail against the broken service.&lt;/li&gt;
&lt;li&gt;The proposed patch must turn the exact same test green.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  B. The Cryptographic Four-Eyes Approval Gate
&lt;/h3&gt;

&lt;p&gt;No automated agent can mutate production without human sign-off.&lt;br&gt;
When a patch is proposed, IncidentPilot computes a SHA-256 action digest:&lt;br&gt;
$$\text{Digest} = \text{SHA-256}(\text{ActionType} \parallel \text{Target} \parallel \text{PatchDiff} \parallel \text{Timestamp})$$&lt;br&gt;
When an on-call engineer signs off (&lt;code&gt;@sre-commander approve&lt;/code&gt;), the engine re-evaluates the live hash. If anything changed between proposal and sign-off, execution safely aborts (TOCTOU defense).&lt;/p&gt;
&lt;h3&gt;
  
  
  C. Compensating Saga Rollbacks
&lt;/h3&gt;

&lt;p&gt;Every approved remediation registers an automated rollback action. If post-remediation health probes fail within 30 seconds, the system automatically rolls back the change.&lt;/p&gt;


&lt;h2&gt;
  
  
  4. How to Get Started with Switch in 10 Minutes
&lt;/h2&gt;

&lt;p&gt;If you’re setting up Switch for the first time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Download Switch Console&lt;/span&gt;
&lt;span class="c"&gt;# Available for macOS, Windows, and Linux from github.com/sandbox-quantum/switch&lt;/span&gt;

&lt;span class="c"&gt;# 2. Start the local server&lt;/span&gt;
docker compose &lt;span class="nt"&gt;-f&lt;/span&gt; switch/deploy/standalone-docker-compose.yml up &lt;span class="nt"&gt;-d&lt;/span&gt;

&lt;span class="c"&gt;# 3. Create your incident room from template&lt;/span&gt;
switch room create &lt;span class="nt"&gt;--template&lt;/span&gt; switch/templates/incident-pilot.template.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. Evaluation Benchmarks
&lt;/h2&gt;

&lt;p&gt;We evaluated IncidentPilot across 5 ground-truth production failure scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;bad-deploy&lt;/code&gt;: HTTP 500 regression in checkout&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cache-down&lt;/code&gt;: Redis stop leading to DB pool exhaustion&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kill-worker&lt;/code&gt;: Worker crashed, Kafka consumer lag&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;oom-worker&lt;/code&gt;: Memory leak trigger&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;poison-message&lt;/code&gt;: Malformed JSON event crashloop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MTTR Reduction&lt;/strong&gt;: &lt;strong&gt;&amp;gt;93%&lt;/strong&gt; compared to manual human triage baselines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety Compliance&lt;/strong&gt;: &lt;strong&gt;100%&lt;/strong&gt; (zero unapproved production mutations).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Solo agents helped us write code faster. &lt;strong&gt;Switch turns them into true engineering teammates.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>devops</category>
      <category>sre</category>
    </item>
  </channel>
</rss>
