File size: 1,684 Bytes
047e6c3
 
 
 
 
620d849
047e6c3
 
 
 
 
 
 
 
 
 
 
 
 
 
620d849
 
047e6c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 馃 Agentic Reliability Framework MVP

**Author:** [Juan D. Petter](https://github.com/petter2025)  
**Stack:** Python 3.10 路 Gradio 5.49.1 路 FastAPI 路 FAISS 路 SentenceTransformers 路 Hugging Face Router API  

---

## 馃殌 Overview

The **Agentic Reliability Framework MVP** is an intelligent observability and self-healing system that combines:

- **Adaptive anomaly detection** (latency/error-rate monitoring)  
- **AI-driven root cause analysis** powered by Hugging Face鈥檚 Inference Router  
- **Persistent FAISS vector memory** for incident recall and similarity search  
- **Agentic self-healing simulation** (automated reliability responses)

This MVP runs entirely in a Hugging Face Space and doubles as both:
- a **visual Gradio dashboard**, and  
- a **REST API backend** (via FastAPI).

---

## 鈿欙笍 Features

| Module | Description |
|--------|--------------|
| **Anomaly Detection** | Adaptive thresholding + random test anomalies |
| **AI Insight Generation** | Uses `mistralai/Mixtral-8x7B-Instruct-v0.1` via Hugging Face Router |
| **Self-Healing Simulation** | Randomized corrective actions |
| **Persistent Memory** | FAISS + JSON persistence with file locks |
| **REST API** | `/add-event` route secured with an optional API key |
| **UI Dashboard** | Live anomaly visualization via Gradio Blocks |

---

## 馃З Tech Stack

| Component | Purpose |
|------------|----------|
| `gradio` | Dashboard / UI |
| `fastapi` | API backend |
| `sentence-transformers` | Embeddings for FAISS |
| `faiss-cpu` | Vector memory store |
| `requests` | Hugging Face Inference Router calls |
| `filelock` | Safe concurrent persistence |

---

## 馃 Architecture Flow