<?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: Vihaan Vaghela</title>
    <description>The latest articles on DEV Community by Vihaan Vaghela (@victorblain).</description>
    <link>https://dev.to/victorblain</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3838546%2Fb0a5de1f-46f5-42ea-813c-b01aac7c0822.png</url>
      <title>DEV Community: Vihaan Vaghela</title>
      <link>https://dev.to/victorblain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/victorblain"/>
    <language>en</language>
    <item>
      <title>I Built a Real-Time Autonomous Infrastructure AI at 14. Here's Everything.</title>
      <dc:creator>Vihaan Vaghela</dc:creator>
      <pubDate>Sun, 22 Mar 2026 16:12:30 +0000</pubDate>
      <link>https://dev.to/victorblain/i-built-a-real-time-autonomous-infrastructure-ai-at-14-heres-everything-1hac</link>
      <guid>https://dev.to/victorblain/i-built-a-real-time-autonomous-infrastructure-ai-at-14-heres-everything-1hac</guid>
      <description>&lt;p&gt;Here it is — the full dev.to post:&lt;/p&gt;

&lt;p&gt;I Built a Real-Time Autonomous Infrastructure AI at 14. Here's Everything.&lt;br&gt;
I'm Vihaan. I'm 14 years old. And over the last few months I've been building something called Extremis.&lt;br&gt;
Not a tutorial. Not a hackathon project. A real, production-grade autonomous infrastructure operating system — one that monitors itself, repairs itself, contains its own failures, and governs itself through a full protocol stack without human intervention.&lt;br&gt;
This post is the complete story. Where it started. What it became. How it works. And where it's going.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0ug2ueh0mnyefze2yas.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0ug2ueh0mnyefze2yas.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where It Started&lt;br&gt;
Extremis started as a traffic intelligence system.&lt;br&gt;
The original goal was simple: predict congestion, prioritize emergency vehicles, optimize traffic flow in real time. Clean problem. Clean solution.&lt;br&gt;
But as the system grew, it became obvious that a smart model is worthless if it can't survive failure. A traffic intelligence platform that goes dark during peak congestion isn't just inconvenient — it's dangerous.&lt;br&gt;
So I built fault tolerance in. And then governance. And then intelligence. And then the whole thing evolved into something I never planned from the start.&lt;/p&gt;

&lt;p&gt;Phase 1: The Protocol Stack&lt;br&gt;
The first major milestone was the eight-protocol governance stack — a complete escalation chain that runs from the first anomaly detection all the way to permanent human-authorized termination.&lt;br&gt;
Sentinel     →  detects anomalies&lt;br&gt;
Serpentine   →  classifies stress state&lt;br&gt;
Aegis        →  contains failures&lt;br&gt;
Atlas        →  rebalances load&lt;br&gt;
Punisher     →  repairs with AI&lt;br&gt;
Phoenix      →  orchestrates recovery&lt;br&gt;
Hyperion     →  autonomous emergency shutdown&lt;br&gt;
Terminus     →  permanent human-authorized termination&lt;br&gt;
Every protocol has a defined role. Every handoff is deliberate. Nothing overlaps.&lt;br&gt;
Sentinel runs every second collecting latency, CPU, memory, GPU, queue depth, and throughput. It uses z-score statistical analysis against a rolling history of 20 samples to detect anomalies before they become failures. Every anomaly gets categorized and severity-scored. Raw metrics flow at medium priority. Detected anomalies escalate at high priority immediately.&lt;br&gt;
Serpentine synthesizes everything Sentinel produces into a unified stress state across five levels — stable, moderate, critical, failure, catastrophic — using three indices: pressure, congestion, and instability. Catastrophic requires 92% pressure or 95% instability. Not lower. Because catastrophic means exactly that.&lt;br&gt;
Aegis contains failures before they cascade. Nodes above 20% error rate get isolated. Nodes above 95% load get throttled. Global circuit breakers activate under catastrophic state. Every action is logged with explicit reasoning.&lt;br&gt;
Atlas redistributes load dynamically. Overloaded nodes above 80% get shifted to underutilized nodes below 50%, targeting 65% post-shift. Recommends autoscaler activation when redistribution isn't enough.&lt;br&gt;
Punisher is where it gets interesting. A dual-head neural network diagnoses incidents and ranks repair strategies by risk. Governed by an adaptive credit system — 0.02 credits regenerating per second, max 10 — that prevents thrashing. The system gets more conservative as failures accumulate.&lt;br&gt;
Phoenix brings the system back after repair. Sequenced restarts in dependency order. Container rebuilds for nodes above 85% load. Global runtime state restoration. Conservative by design — more restarts than necessary, never fewer.&lt;br&gt;
Hyperion is the emergency shutdown. Fires within one second. Halts everything. No complex logic. No second guessing. Irreversible.&lt;br&gt;
Terminus is the human kill switch. Blocks orchestrators, AI agents, and internal services from invoking it. Requires a human being at a physical console with multi-factor authorization. Encrypts a full system state archive before termination. Recovery is possible — but only deliberately, only by a human.&lt;/p&gt;

&lt;p&gt;Phase 2: The Intelligence Layer&lt;br&gt;
With the protocol stack in place, the next phase added a full intelligence layer on top of it.&lt;br&gt;
The architecture became:&lt;br&gt;
Input → Sentinel → Serpentine → Anarchy → ORACLE → MORL → PULSAR → Fusion → Meta → Output&lt;br&gt;
Anarchy Protocol — event-triggered bounded simulation. When specific triggers fire — traffic spike, error surge, confidence collapse, novelty detection, strategy failure loop — Anarchy spawns a lightweight micro-simulator and evaluates three candidate strategies:&lt;/p&gt;

&lt;p&gt;Baseline (current system decision)&lt;br&gt;
Conservative (stability-focused)&lt;br&gt;
Aggressive (performance-focused)&lt;/p&gt;

&lt;p&gt;Each path is scored:&lt;br&gt;
Score = (Accuracy × 0.4)&lt;br&gt;
      + (Stability × 0.3)&lt;br&gt;
      - (Latency × 0.15)&lt;br&gt;
      - (Resource Cost × 0.15)&lt;br&gt;
Override only fires if the best simulated score beats baseline by at least 10%. No unnecessary overrides. No wasted compute. 30ms total time budget. Hard cap.&lt;br&gt;
ORACLE — an RSSM-based world model. Instead of running full simulations, ORACLE predicts future states in latent space. Short-path conservative mode. Confidence scaling. Memory-assisted candidate ordering. The system imagines futures rather than simulating them.&lt;br&gt;
MORL — multi-objective reinforcement learning. Optimizes multiple competing goals simultaneously: minimize travel time, minimize emissions, prioritize emergency vehicles, reduce fuel consumption. Automatically gated off under low-confidence or high-risk conditions.&lt;br&gt;
PULSAR — deterministic micro-adjustment engine. Reversible tuning under hard pulse-count and latency budgets. Small, precise, bounded corrections.&lt;br&gt;
Fusion Layer — coordinates ORACLE, MORL, and PULSAR under safety gates. Trust recalibration. Emergency oracle down-weighting. Safety fallback gate. VIHAAN-aware clamps.&lt;br&gt;
Meta Layer — background controller that monitors runtime signals and applies smoothed control updates only when stable conditions justify adaptation. Gradual. Conservative. Never aggressive.&lt;/p&gt;

&lt;p&gt;Phase 3: The Latency Crisis and How I Fixed It&lt;br&gt;
Here's where things got ugly before they got good.&lt;br&gt;
After building the intelligence layer, the system was producing brutal latency numbers. p95 around 100ms. Tail spikes. Instability under stress. Not remotely real-time capable.&lt;br&gt;
I profiled everything.&lt;br&gt;
The culprit: Sentinel was consuming ~97% of runtime.&lt;br&gt;
The original Sentinel ran heavy statistical checks on every cycle — unbounded work patterns that amplified into massive tail latency spikes. Every cycle, Sentinel was doing too much, taking too long, and poisoning everything downstream.&lt;br&gt;
The fix:&lt;/p&gt;

&lt;p&gt;Rolling window metrics with O(1) incremental statistics&lt;br&gt;
5ms hard cap on Sentinel's time budget&lt;br&gt;
Heavy analysis moved to bounded background tasks&lt;br&gt;
Strict per-stage budget enforcement across the entire pipeline&lt;br&gt;
Early-exit logic when risk or latency indicators exceed thresholds&lt;br&gt;
Spike detection and temporary mitigation windows after detected spikes&lt;/p&gt;

&lt;p&gt;One bottleneck. One fix. The entire system collapsed from unstable to real-time.&lt;/p&gt;

&lt;p&gt;Phase 4: VIHAAN Protocol&lt;br&gt;
The final piece was the VIHAAN Protocol — the ultimate authority layer named after me.&lt;br&gt;
VIHAAN detects sustained systemic risk signals and escalates deterministically:&lt;br&gt;
normal → warning → critical → vihaan_activated&lt;br&gt;
When activated, VIHAAN applies authoritative overrides:&lt;/p&gt;

&lt;p&gt;Disables MORL and PULSAR&lt;br&gt;
Caps oracle weight&lt;br&gt;
Freezes meta layer&lt;br&gt;
Forces baseline decision path&lt;/p&gt;

&lt;p&gt;Then drives a deterministic recovery state machine:&lt;br&gt;
stabilize → monitor → gradual_reintroduction → full_restore&lt;br&gt;
The philosophy: discipline over chaos. When uncertainty rises, autonomy is intentionally narrowed. Intelligence is reintroduced gradually, only after evidence of stability. The system earns back its own autonomy.&lt;br&gt;
VIHAAN persists memory signatures and audit logs for replay and governance learning. Every decision is traceable.&lt;/p&gt;

&lt;p&gt;The Numbers&lt;br&gt;
Here's where Extremis stands right now:&lt;br&gt;
Phasep95 LatencyStabilityEarly profile~100msBrittlePost-optimization~2msStableCurrent (500 cycles)1.124msStable&lt;br&gt;
Current measured snapshot:&lt;/p&gt;

&lt;p&gt;Avg latency: 0.607ms&lt;br&gt;
p95: 1.124ms&lt;br&gt;
p99: 1.634ms&lt;br&gt;
Max: 1.908ms&lt;br&gt;
Bus dropped events: 0&lt;br&gt;
Bus ordering violations: 0&lt;br&gt;
Regression tests: 32/32 passing&lt;/p&gt;

&lt;p&gt;Zero dropped events. Zero ordering violations. Sub-2ms across the board under adversarial stress injection.&lt;/p&gt;

&lt;p&gt;The Design Principles That Made It Work&lt;br&gt;
Bounded everything. Every stage has a hard time cap. No unbounded loops. No open-ended computation. If it can't finish in budget, it exits.&lt;br&gt;
Intelligence is subordinate to safety. The control plane is immutable. Intelligence operates only inside bounded envelopes. Safety contracts are non-negotiable.&lt;br&gt;
Tail risk is a first-class problem. p95/p99 behavior is optimized alongside average latency. Average latency means nothing if your p99 is catastrophic.&lt;br&gt;
Fallback is always available. No matter what fails, a safe baseline action path exists. The system can always do something safe.&lt;br&gt;
Autonomy is earned, not assumed. VIHAAN narrows autonomy under uncertainty and restores it gradually after stability is proven.&lt;/p&gt;

&lt;p&gt;What's Next&lt;br&gt;
Extremis keeps growing. On the roadmap:&lt;/p&gt;

&lt;p&gt;Graph Neural Network traffic modeling — model the entire road network as a live graph where congestion propagates across topology&lt;br&gt;
Temporal Graph Networks — extend GNN to model how the graph evolves over time&lt;br&gt;
Adversarial Robustness Layer — protect against spoofed sensors and adversarial inputs&lt;br&gt;
Predictive Incident Detection — detect conditions that precede accidents before they happen&lt;br&gt;
Digital Twin Engine — a real-time virtual mirror of the entire network running in parallel&lt;/p&gt;

&lt;p&gt;Final Thought&lt;br&gt;
Extremis started as a traffic model.&lt;br&gt;
It became a fault-tolerant protocol stack. Then a real-time adaptive intelligence platform. Then a bounded, governed, auditable system that earns its own autonomy.&lt;br&gt;
The single most important lesson: find your bottleneck before you optimize anything else. One unbounded component — Sentinel at 97% of runtime — was the entire problem. Everything else was noise.&lt;br&gt;
Profile first. Fix the real problem. Build around constraints.&lt;br&gt;
Extremis is no longer experimental. It is controlled, bounded, and real-time capable.&lt;br&gt;
And it's still being built.&lt;/p&gt;

&lt;p&gt;I document everything on Substack as I build — systemsbyvihaan.substack.com&lt;br&gt;
I'm 14. This is just the beginning.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
