# Cognitive AI Manufacturing Agent (IoT Industry Automation)
```mermaid
graph TB
subgraph "IoT Sensors"
A[Temp/Pressure/Vibration
Flow/Speed/Level/Current]
end
subgraph "Edge Layer"
B[Edge Gateway & MQTT
Data Validation/Protocol Convert]
end
subgraph "DataStreamX"
C[Stream Processing
Pattern Detection/Enrichment]
end
subgraph "Kafka Streaming"
D[Event Topics & Consumers
sensor-data/alerts/commands]
end
subgraph "AI Engine"
E[Node.js/Python Agents
Anomaly/Predictive/ML]
F[Decision & Rule Engine
Action Classification]
end
subgraph "Actions"
G{Critical Alert?}
H[Emergency Shutdown]
I[Auto-Fix & Control]
J[Optimization]
end
subgraph "HookPilot Automation"
K[Webhook Receiver
Workflow Engine]
L[Multi-channel Dispatch
Template/Retry/APIs]
end
subgraph "Notifications"
M[Telegram/Email/Slack
SMS/WhatsApp/Push]
end
subgraph "React Dashboard"
N[Real-time Monitor
Analytics/Control Panel]
end
subgraph "Storage & Analytics"
O[Time Series/Event Store
Config/User/ML Models]
end
subgraph "Learning Loop"
P[Performance Metrics
Model Retraining/Tuning]
end
A --> B --> C --> D
D --> E --> F --> G
G -->|Yes| H
G -->|No| I --> J
H --> K
I --> K
J --> K
K --> L --> M
D --> N
F --> N
N --> I
C --> O
F --> O
N --> P --> E
```