--- title: Vehicle Diagnostics Agent emoji: 🚗 colorFrom: blue colorTo: green sdk: gradio sdk_version: 4.44.1 app_file: app.py pinned: false license: mit short_description: Multi-Agent AI System for Predictive Vehicle Diagnostics tags: - anomaly-detection - lstm - pytorch - langchain - langgraph - multi-agent - vehicle-diagnostics - time-series --- # 🚗 Vehicle Diagnostics Agent ## Multi-Agent AI System for Predictive Vehicle Diagnostics This is a production-ready multi-agent AI system that analyzes vehicle sensor data to detect anomalies, identify root causes, and provide actionable maintenance recommendations. ### 🎯 Key Features - **🔍 Anomaly Detection**: LSTM-based neural network with 99.53% validation accuracy - **🔬 Root Cause Analysis**: Identifies underlying issues with OBD-II fault code mapping - **🔧 Maintenance Recommendations**: Provides cost estimates and prioritized action plans - **📊 Interactive Visualizations**: Real-time anomaly detection charts - **📋 Natural Language Reports**: Easy-to-understand summaries for vehicle owners ### 🏗️ System Architecture The system employs a **multi-agent architecture** orchestrated by LangGraph: 1. **Data Ingestion Agent** - Loads and prepares vehicle sensor data 2. **Anomaly Detection Agent** - LSTM neural network for pattern detection 3. **Root Cause Analysis Agent** - Fault pattern matching and correlation analysis 4. **Maintenance Recommendation Agent** - Cost estimation and action planning 5. **Report Generation Agent** - Comprehensive diagnostic reports ### 🚀 Technology Stack - **ML Framework**: PyTorch (LSTM-based time-series anomaly detection) - **Orchestration**: LangGraph for multi-agent coordination - **Frontend**: Gradio for interactive UI - **Data Processing**: Pandas, NumPy, Scikit-learn - **Visualization**: Plotly ### 📊 Model Performance - **Validation Accuracy**: 99.53% - **Training Loss**: 0.0003 (final epoch) - **Validation Loss**: 0.0409 (best) - **Dataset**: 50,000 records from 100 vehicles - **Features**: 60+ engineered features from 14 sensor measurements ### 🎮 How to Use 1. **Select a Vehicle**: Choose from available vehicle IDs 2. **Set Reading Count**: Specify how many recent readings to analyze (default: 200) 3. **Run Diagnostic**: Click the diagnostic button to analyze 4. **Review Results**: View anomaly detection, root cause analysis, and maintenance recommendations ### 📈 Dataset The system analyzes synthetic vehicle sensor data including: - Engine temperature, RPM, speed - Battery voltage and health - Oil and fuel pressure - Tire pressure (all four wheels) - Vibration levels - Coolant temperature - And more... ### 🔬 Technical Details **Anomaly Detection Model:** - Architecture: 2-layer LSTM with 64 hidden units - Input: Sequences of 10 timesteps with 60 features - Output: Binary classification (normal/anomaly) - Training: 31,570 sequences on GPU **Root Cause Analysis:** - 8 fault pattern definitions - Sensor correlation analysis - Confidence scoring - OBD-II fault code mapping (P-codes, C-codes) ### 📝 License MIT License - See LICENSE file for details ### 🔗 Links - **GitHub**: [VehicleDiagnosticsAgent](https://github.com/saadmann18/VehicleDiagnosticsAgent) - **Documentation**: Full project documentation available in the repository ### 👨‍💻 Author Built with ❤️ by Saad Mann --- **Note**: This is a demonstration system using synthetic data. For production use with real vehicles, integration with actual OBD-II devices would be required.