# devlup-labs/inframind architecture

> Architecture diagram of the GitHub repository devlup-labs/inframind, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devlup-labs/inframind
- Repository: https://github.com/devlup-labs/inframind

## Overview

InfraMind is an autonomous incident-response workflow for a mock ML service on Kubernetes. It monitors Prometheus metrics, gathers pod logs when it detects an anomaly, uses retrieved log evidence to identify a likely cause and affected pod, then decides whether a constrained mitigation is safe. The loop rechecks metrics and produces a human-readable incident report. The README documents these capabilities and relationships; no source excerpts were available, so component paths point only to the visible `agents` directory.

Main entry points: [`agents`](https://github.com/devlup-labs/inframind/tree/main/agents) (Optimization Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_telemetry["Telemetry"]
  node_workload["Mock ML service"]
  node_prometheus[("Prometheus metrics")]
  node_monitoring["Monitoring Agent"]
end

subgraph group_investigation["Investigation"]
  node_collector["Log Collector"]
  node_qdrant[("Qdrant retrieval")]
  node_root_cause["Root Cause Agent"]
end

subgraph group_remediation["Remediation"]
  node_optimization["Optimization Agent"]
  node_scaling["Horizontal scaling"]
  node_restart["Pod restart"]
  node_kubernetes["Kubernetes"]
  node_no_action["No safe action"]
end

subgraph group_reporting["Reporting"]
  node_reporting["Reporting Agent"]
  node_incident_report["Incident report"]
end

node_workload -->|"exposes metrics"| node_prometheus
node_monitoring -->|"reads metrics"| node_prometheus
node_monitoring -->|"triggers on anomaly"| node_collector
node_collector -->|"collects pod logs"| node_kubernetes
node_collector -->|"stores log embeddings"| node_qdrant
node_root_cause -->|"searches log evidence"| node_qdrant
node_root_cause -->|"provides cause and pod"| node_optimization
node_optimization -->|"selects for pressure"| node_scaling
node_optimization -->|"selects for pod failure"| node_restart
node_optimization -->|"declines unsafe action"| node_no_action
node_scaling -->|"scales pods"| node_kubernetes
node_restart -->|"restarts affected pod"| node_kubernetes
node_no_action -->|"continues incident loop"| node_reporting
node_scaling -->|"waits and rechecks"| node_monitoring
node_restart -->|"waits and rechecks"| node_monitoring
node_reporting -->|"produces report"| node_incident_report

click node_monitoring "https://github.com/devlup-labs/inframind/tree/main/agents"
click node_collector "https://github.com/devlup-labs/inframind/tree/main/agents"
click node_root_cause "https://github.com/devlup-labs/inframind/tree/main/agents"
click node_optimization "https://github.com/devlup-labs/inframind/tree/main/agents"
click node_scaling "https://github.com/devlup-labs/inframind/tree/main/agents"
click node_restart "https://github.com/devlup-labs/inframind/tree/main/agents"
click node_no_action "https://github.com/devlup-labs/inframind/tree/main/agents"
click node_reporting "https://github.com/devlup-labs/inframind/tree/main/agents"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_workload,node_prometheus,node_monitoring toneBlue
class node_collector,node_qdrant,node_root_cause toneAmber
class node_optimization,node_scaling,node_restart,node_kubernetes,node_no_action toneMint
class node_reporting,node_incident_report toneRose
```

## Components

### Telemetry

- **Mock ML service**
- **Prometheus metrics**
- [Monitoring Agent](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`

### Investigation

- [Log Collector](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`
- **Qdrant retrieval**
- [Root Cause Agent](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`

### Remediation

- [Optimization Agent](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`
- [Horizontal scaling](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`
- [Pod restart](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`
- **Kubernetes**
- [No safe action](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`

### Reporting

- [Reporting Agent](https://github.com/devlup-labs/inframind/tree/main/agents): `agents`
- **Incident report**

## Connections

- Mock ML service → Prometheus metrics: exposes metrics (evidence: `README.md`)
- Monitoring Agent → Prometheus metrics: reads metrics (evidence: `README.md`)
- Monitoring Agent → Log Collector: triggers on anomaly (evidence: `README.md`)
- Log Collector → Kubernetes: collects pod logs (evidence: `README.md`)
- Log Collector → Qdrant retrieval: stores log embeddings (evidence: `README.md`)
- Root Cause Agent → Qdrant retrieval: searches log evidence (evidence: `README.md`)
- Root Cause Agent → Optimization Agent: provides cause and pod (evidence: `README.md`)
- Optimization Agent → Horizontal scaling: selects for pressure (evidence: `README.md`)
- Optimization Agent → Pod restart: selects for pod failure (evidence: `README.md`)
- Optimization Agent → No safe action: declines unsafe action (evidence: `README.md`)
- Horizontal scaling → Kubernetes: scales pods (evidence: `README.md`)
- Pod restart → Kubernetes: restarts affected pod (evidence: `README.md`)
- No safe action → Reporting Agent: continues incident loop (evidence: `README.md`)
- Horizontal scaling → Monitoring Agent: waits and rechecks (evidence: `README.md`)
- Pod restart → Monitoring Agent: waits and rechecks (evidence: `README.md`)
- Reporting Agent → Incident report: produces report (evidence: `README.md`)
