<?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: Vishal Rajput</title>
    <description>The latest articles on DEV Community by Vishal Rajput (@vishal_rajput_0deae83dd7a).</description>
    <link>https://dev.to/vishal_rajput_0deae83dd7a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4100788%2Fb89d4070-87d0-4442-beda-e979bb5242fb.jpg</url>
      <title>DEV Community: Vishal Rajput</title>
      <link>https://dev.to/vishal_rajput_0deae83dd7a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishal_rajput_0deae83dd7a"/>
    <language>en</language>
    <item>
      <title>Building TrueSRE: Autonomous Multi-Agent Incident Remediation with TrueForge, FastMCP, and Daytona</title>
      <dc:creator>Vishal Rajput</dc:creator>
      <pubDate>Sat, 29 Aug 2026 21:54:16 +0000</pubDate>
      <link>https://dev.to/vishal_rajput_0deae83dd7a/building-truesre-autonomous-multi-agent-incident-remediation-with-trueforge-fastmcp-and-daytona-1aai</link>
      <guid>https://dev.to/vishal_rajput_0deae83dd7a/building-truesre-autonomous-multi-agent-incident-remediation-with-trueforge-fastmcp-and-daytona-1aai</guid>
      <description>&lt;p&gt;💥 The 3:00 AM On-Call Nightmare&lt;br&gt;
If you’ve ever carried an on-call pager for a production Kubernetes cluster, you know the dread of a 3:00 AM alert:&lt;/p&gt;

&lt;p&gt;Your phone buzzes aggressively. The payment gateway is crashing with CrashLoopBackOff. Users are encountering 500 internal errors, and the business is losing thousands of dollars per minute.&lt;/p&gt;

&lt;p&gt;You sit down half-asleep and start the manual diagnostic grind:&lt;/p&gt;

&lt;p&gt;Open Prometheus and craft PromQL queries to check if the service is down (up == 0).&lt;br&gt;
Sift through thousands of Loki log lines searching for JVM or Go panic stack traces.&lt;br&gt;
Run kubectl describe pod to extract container termination exit codes (ExitCode: 137 OOMKilled).&lt;br&gt;
Switch to GitHub to review recent commits and unified diffs to see who deployed what.&lt;br&gt;
Formulate a hypothesis, draft a rollback command, and pray it doesn't break production further.&lt;br&gt;
By the time the issue is resolved, 45 minutes have passed.&lt;/p&gt;

&lt;p&gt;According to Gartner, enterprise IT downtime costs an average of $5,600 per minute ($300,000+ per hour).&lt;/p&gt;

&lt;p&gt;Why Standard AI Chatbots Fail in Production&lt;br&gt;
Generic LLM wrappers cannot solve this. When given access to a terminal, naive AI agents frequently hallucinate destructive commands (rm -rf /, dropping databases, or deleting the wrong namespaces) with zero security boundaries.&lt;/p&gt;

&lt;p&gt;We asked ourselves: Can we build an autonomous, multi-agent SRE swarm that diagnoses and remediates real infrastructure in under 25 seconds—while guaranteeing 100% safety?&lt;/p&gt;

&lt;p&gt;That is why we built TrueSRE.&lt;/p&gt;

&lt;p&gt;🌟 Introducing TrueSRE&lt;br&gt;
TrueSRE is an enterprise-grade autonomous Site Reliability Engineering multi-agent platform. Built on the TrueForge Agent Harness, official Model Context Protocol (FastMCP), Daytona Isolated Sandboxing, and Cryptographic HMAC-SHA256 Human-In-The-Loop (HITL) Safety Gates, TrueSRE takes outages from detection to verified resolution in under 25 seconds.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   🚨 3:00 AM Outage Detected (SEV-1 OOMKilled)
                       │
                       ▼
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;🧠 TrueForge Swarm Dispatched (PromQL, Loki, K8s, Git VCS via FastMCP)&lt;br&gt;
                           │&lt;br&gt;
                           ▼&lt;br&gt;
  🔬 Bayesian Competing Hypotheses (4 Ranked Possibilities — 92% Confidence)&lt;br&gt;
                           │&lt;br&gt;
                           ▼&lt;br&gt;
  📦 Daytona Isolated Sandbox Dry-Run (ExitCode: 0 Syntax Pre-Validation)&lt;br&gt;
                           │&lt;br&gt;
                           ▼&lt;br&gt;
  🔐 Cryptographic HMAC-SHA256 Human-In-The-Loop Approval Gate&lt;br&gt;
                           │&lt;br&gt;
                           ▼&lt;br&gt;
  ⚡ FastMCP Mutating Rollout Undo + Closed-Loop Telemetry Verification&lt;br&gt;
                           │&lt;br&gt;
                           ▼&lt;br&gt;
  📝 Auto-Generated Blameless Post-Mortem &amp;amp; Vector RAG Incident Memory&lt;br&gt;
🏛️ System Architecture: The 4-Layer Foundation&lt;br&gt;
TrueSRE is engineered with strict separation of concerns across 4 distinct layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Presentation Layer (Cyber-SRE Mission Control)&lt;br&gt;
A high-performance React 18 + Vite + Tailwind CSS dashboard that streams real-time agent thoughts, tool dispatches, live topology maps, and interactive Daytona terminals over WebSockets (ws://localhost:8000/ws/stream).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TrueForge Agentic Runtime (FastAPI Backend)&lt;br&gt;
The core intelligence engine. TrueForge coordinates turn-based agent execution, dynamic tool selection, and state transitions across a deterministic 15-node state machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model Context Protocol (FastMCP) &amp;amp; Daytona Sandbox Boundary&lt;br&gt;
Decouples AI reasoning from raw infrastructure execution. An official FastMCP JSON-RPC server exposes 18 enterprise tools, while ephemeral Daytona sandboxes test remediation runbooks before touching live workloads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Infrastructure &amp;amp; Telemetry Stack&lt;br&gt;
Direct integration with real Kubernetes clusters, Prometheus (&lt;a href="http://localhost:9090" rel="noopener noreferrer"&gt;http://localhost:9090&lt;/a&gt;), Grafana Loki (&lt;a href="http://localhost:3100" rel="noopener noreferrer"&gt;http://localhost:3100&lt;/a&gt;), Jaeger Tracing, and local Git VCS repositories.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🤖 The 6-Agent Specialized Swarm&lt;br&gt;
Rather than relying on a single monolithic prompt, TrueSRE delegates responsibilities across 6 specialized agent personas:&lt;/p&gt;

&lt;p&gt;Agent Persona   Role in TrueForge Harness   Key Responsibility&lt;br&gt;
🛡️ Incident Commander  Triage &amp;amp; State Orchestration    Classifies severity (SEV-1 to SEV-4), coordinates agent lifecycles, and broadcasts state.&lt;br&gt;
📈 Telemetry Investigator Metrics &amp;amp; Log Diagnostics   Dispatches PromQL queries (up, rate, P95 latency) and queries Loki LogQL streams.&lt;br&gt;
🔍 RCA Reasoner   5-Whys Root Cause &amp;amp; Git Blame   Analyzes unified Git diffs and evaluates 4 competing hypotheses with probabilistic confidence.&lt;br&gt;
🛠️ Remediation Planner Runbook Synthesis &amp;amp; Daytona Dry-run Formulates rollback runbooks and validates YAML schemas inside an isolated Daytona sandbox.&lt;br&gt;
🔒 Safety HITL Gatekeeper Blast Radius &amp;amp; Cryptographic Gate   Calculates downstream blast radius and enforces single-use HMAC-SHA256 operator authorization.&lt;br&gt;
📝 Post-Mortem Scribe Blameless RCA &amp;amp; Incident Memory Auto-compiles markdown incident reports and stores vector embeddings in incident memory.&lt;br&gt;
🛡️ Enterprise Safety: Daytona Sandboxing &amp;amp; Cryptographic HITL&lt;br&gt;
Safety was our #1 architectural constraint. We implemented two bulletproof safety mechanisms:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ephemeral Daytona Sandbox Dry-Runs
Before executing a remediation command against Kubernetes, the Remediation Planner spins up an isolated Daytona sandbox container and dry-runs the command:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;bash&lt;br&gt;
kubectl rollout undo deployment/payment-service --dry-run=client -o yaml&lt;br&gt;
If an agent or prompt injection attempts a destructive command like rm -rf /, TrueSRE's Security Policy Engine intercepts it instantly:&lt;/p&gt;

&lt;p&gt;text&lt;br&gt;
SECURITY_VIOLATION: Execution blocked by TrueSRE Daytona Policy.&lt;br&gt;
Reason: Command matches catastrophic destruction pattern: rm -rf&lt;br&gt;
Risk Level: FORBIDDEN | Exit Code: 126&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Single-Use Cryptographic HMAC-SHA256 Authorization
When an action modifies production, TrueSRE pauses at the Human-in-the-Loop (HITL) gate. Upon operator review and approval in the UI, the server issues a cryptographic token: hitl_&lt;em&gt;&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The FastMCP server validates this cryptographic token at the tool boundary. Unsigned requests are rejected with MUTATION_BLOCKED, and the token is revoked immediately upon execution.&lt;/p&gt;

&lt;p&gt;🔄 End-to-End Walkthrough: Resolving a Real SEV-1 Outage in 20 Seconds&lt;br&gt;
Let’s trace a real out-of-memory crash loop on our payment-service:&lt;/p&gt;

&lt;p&gt;Detection: Prometheus fires an alert—payment-service pods are restarting with exit code 137 (OOMKilled).&lt;br&gt;
Investigation: The Telemetry Investigator dispatches FastMCP tools to query Prometheus availability (up == 0) and extracts JVM heap overflow stack traces from Loki.&lt;br&gt;
Root Cause Analysis: The RCA Reasoner inspects recent Git commits, finds commit #e89a10f in BufferPool.java, and discovers an unbounded memory cache regression.&lt;br&gt;
Hypothesis Evaluation: The Bayesian reasoner scores 4 competing hypotheses, ranking the memory leak code regression at 92% confidence.&lt;br&gt;
Daytona Dry-Run: The Remediation Planner tests k8s_rollout_undo in Daytona and confirms Exit Code: 0.&lt;br&gt;
Human Approval: The operator clicks [Approve &amp;amp; Execute Remediation] in the Mission Control modal.&lt;br&gt;
Closed-Loop Verification: FastMCP executes the rollout undo. TrueSRE re-queries Prometheus and mathematically proves:&lt;br&gt;
Error Rate: $84.5% \rightarrow 0.04%$ ($\Delta -84.46%$)&lt;br&gt;
P95 Latency: $1,840\text{ms} \rightarrow 92\text{ms}$ (95% drop)&lt;br&gt;
Cluster Health: Restored to nominal (up == 1).&lt;br&gt;
Blameless Post-Mortem: The Post-Mortem Scribe synthesizes a complete Markdown post-mortem report and stores vector embeddings in our Incident Memory store.&lt;br&gt;
Total MTTR: Under 20 seconds.&lt;/p&gt;

&lt;p&gt;💡 What We Learned &amp;amp; Key Takeaways&lt;br&gt;
Decoupling Reasoning from Execution with MCP: The Model Context Protocol (MCP) proved to be an absolute game-changer. By treating infrastructure tools as standardized JSON-RPC endpoints, we could swap diagnostic tools without touching agent logic.&lt;br&gt;
TrueForge Agent Harness Reliability: TrueForge’s turn-based orchestration allowed us to manage complex multi-agent handoffs between Telemetry, RCA, and Remediation planners seamlessly.&lt;br&gt;
Safety Cannot Be an Afterthought: Autonomous agents must be bounded by sandboxed dry-runs and cryptographic authorization tokens. TrueSRE proves that autonomy and enterprise safety can coexist.&lt;br&gt;
🔗 Try TrueSRE Yourself!&lt;br&gt;
GitHub Repository: &lt;a href="https://github.com/VishalRRajput/TrueSRE" rel="noopener noreferrer"&gt;https://github.com/VishalRRajput/TrueSRE&lt;/a&gt;&lt;br&gt;
Tech Stack: Python 3.11, FastAPI, TrueForge, FastMCP, Daytona, React 18, Vite, Kubernetes, Prometheus, Loki.&lt;br&gt;
Built with ❤️ by Vishal Rajput for the TrueForge Agent Harness Hackathon.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>kubernetes</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
