# kalyan-devops-tech/agentic-sre-automation architecture

> Architecture diagram of the GitHub repository kalyan-devops-tech/agentic-sre-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kalyan-devops-tech/agentic-sre-automation
- Repository: https://github.com/kalyan-devops-tech/agentic-sre-automation

## Overview

This FastAPI service receives normalized alert payloads, suppresses repeats, optionally gathers read-only Kubernetes evidence, triages with rules or optional LLM assistance, records outcomes, and emails on-call engineers. The README also documents Datadog and Prometheus integrations and the human-approved response boundary. The sampled pipeline and module excerpts support the internal call relationships; provider-to-webhook relationships are documented in the README, while unsampled deployment details are omitted.

Main entry points: [`app/pipeline.py`](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/pipeline.py) (Alert pipeline), [`app/triage.py`](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/triage.py) (Alert triage), [`app/main.py`](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/main.py) (Webhook API), [`app/actions.py`](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/actions.py) (Kubernetes checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingress["Alert ingress"]
  node_webhook["Webhook API<br/>[main.py]"]
  node_orchestrator["Alert pipeline<br/>[pipeline.py]"]
end

subgraph group_analysis["Evidence and triage"]
  node_evidence["Kubernetes checks<br/>[actions.py]"]
  node_triage["Alert triage<br/>[triage.py]"]
end

subgraph group_delivery["Notification"]
  node_email_builder["Email delivery<br/>[emailer.py]"]
end

subgraph group_state["Audit state"]
  node_cooldown["Cooldown checks<br/>[store.py]"]
  node_audit_db[("SQLite audit<br/>[store.py]")]
end

node_alert_sources(("Alert sources"))
node_openai{{"OpenAI service"}}
node_smtp{{"SMTP relay"}}
node_on_call(("On-call engineers"))

node_alert_sources -->|"send alerts"| node_webhook
node_webhook -->|"processes payload"| node_orchestrator
node_orchestrator -->|"checks cooldown"| node_cooldown
node_cooldown -->|"queries records"| node_audit_db
node_orchestrator -->|"records outcomes"| node_audit_db
node_orchestrator -->|"gathers evidence"| node_evidence
node_evidence -->|"supplies checks"| node_triage
node_orchestrator -->|"requests analysis"| node_triage
node_triage -.->|"requests LLM triage"| node_openai
node_orchestrator -->|"sends incident"| node_email_builder
node_email_builder -->|"sends message"| node_smtp
node_smtp -->|"delivers email"| node_on_call

click node_webhook "https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/main.py"
click node_orchestrator "https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/pipeline.py"
click node_cooldown "https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/store.py"
click node_audit_db "https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/store.py"
click node_evidence "https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/actions.py"
click node_triage "https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/triage.py"
click node_email_builder "https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/emailer.py"

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_webhook,node_orchestrator toneBlue
class node_evidence,node_triage toneAmber
class node_email_builder toneMint
class node_cooldown,node_audit_db toneRose
class node_alert_sources,node_openai,node_smtp,node_on_call toneIndigo
```

## Components

### Alert ingress

- [Webhook API](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/main.py): `app/main.py`
- [Alert pipeline](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/pipeline.py): `app/pipeline.py`

### Evidence and triage

- [Kubernetes checks](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/actions.py): `app/actions.py`
- [Alert triage](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/triage.py): `app/triage.py`

### Notification

- [Email delivery](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/emailer.py): `app/emailer.py`

### Audit state

- [Cooldown checks](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/store.py): `app/store.py`
- [SQLite audit](https://github.com/kalyan-devops-tech/agentic-sre-automation/blob/master/app/store.py): `app/store.py`

### Other components

- **Alert sources**
- **OpenAI service**
- **SMTP relay**
- **On-call engineers**

## Connections

- Alert sources → Webhook API: send alerts (evidence: `README.md`)
- Webhook API → Alert pipeline: processes payload (evidence: `app/main.py`)
- Alert pipeline → Cooldown checks: checks cooldown (evidence: `app/pipeline.py`)
- Cooldown checks → SQLite audit: queries records (evidence: `app/store.py`)
- Alert pipeline → SQLite audit: records outcomes (evidence: `app/pipeline.py`)
- Alert pipeline → Kubernetes checks: gathers evidence (evidence: `app/pipeline.py`)
- Kubernetes checks → Alert triage: supplies checks (evidence: `app/pipeline.py`)
- Alert pipeline → Alert triage: requests analysis (evidence: `app/pipeline.py`)
- Alert triage → OpenAI service: requests LLM triage (evidence: `app/triage.py`)
- Alert pipeline → Email delivery: sends incident (evidence: `app/pipeline.py`)
- Email delivery → SMTP relay: sends message (evidence: `app/emailer.py`)
- SMTP relay → On-call engineers: delivers email (evidence: `README.md`)
