""" Gradio-only UI components for ARF Ensures full compatibility with app.py Updated with proper imports and error handling """ import gradio as gr from typing import Dict, List, Any import logging logger = logging.getLogger(__name__) # Try to import scenarios from registry first try: from config.scenario_registry import ScenarioRegistry INCIDENT_SCENARIOS = ScenarioRegistry.load_scenarios() logger.info(f"Loaded {len(INCIDENT_SCENARIOS)} scenarios from registry") except ImportError: logger.warning("Scenario registry not available, falling back to demo scenarios") from demo.scenarios import INCIDENT_SCENARIOS # ----------------------------- # Header & Status # ----------------------------- def create_header(version="3.3.6", mock_mode=False) -> gr.HTML: mock_text = " ยท MOCK MODE" if mock_mode else "" return gr.HTML(f"""
Production-grade multi-agent AI for autonomous system reliability intelligence
Anomaly detected: 99.8% confidence
3 similar incidents found in RAG memory
Generating healing intent with 94% confidence
Analysis & Advisory Only - No execution, permanently safe
Action: Scale Redis cluster from 3 to 5 nodes
Pattern Match: Similar incident resolved with scaling (87% success rate)
Safety Check: โ Passed (blast radius: 2 services)
Estimated Impact: Reduce MTTR from 45min to 12min
Full Execution & Learning - Autonomous healing with safety guarantees
Mode: Autonomous (Requires Enterprise license)
Expected Recovery: 12 minutes (vs 45 min manual)
Cost Saved: $6,375
Users Protected: 45,000 โ 0 impacted
45s
โ 89% faster than average
12m
โ 73% faster than manual
81.7%
โ 5.4ร industry average
${int(business_impact.get('revenue_loss_per_hour', 8500) * 0.85 / 1000):.1f}K
Per incident avoided
Current Mode: Advisory (OSS Only)
Switch to "Approval" mode to enable human-in-the-loop workflows
Agentic Reliability Framework ยฉ 2025
Production-grade multi-agent AI for autonomous system reliability intelligence