# uzair-23/agentic-sre architecture

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

- Interactive diagram: https://gitdiagram.com/uzair-23/agentic-sre
- Repository: https://github.com/uzair-23/agentic-sre

## Overview

Agentic-SRE is a synthetic-incident response product: an operator starts an investigation, the backend generates telemetry and runs an agent graph, and the operator reviews and approves or rejects a proposed fix. The approved path executes the action and produces a postmortem that adjusts future monitoring thresholds. The UI also exposes incident status and traces; a separate evaluation harness scores pipeline behavior against a golden set. The graph follows the README and sampled call sites; unsampled internal agent and UI wiring is not expanded.

Main entry points: [`backend/agents/graph.py`](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/graph.py) (Agent graph), [`backend/api/main.py`](https://github.com/uzair-23/agentic-sre/blob/main/backend/api/main.py) (REST API), [`backend/cli/main.py`](https://github.com/uzair-23/agentic-sre/blob/main/backend/cli/main.py) (Operator CLI), [`backend/evals/harness.py`](https://github.com/uzair-23/agentic-sre/blob/main/backend/evals/harness.py) (Pipeline evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operator["Operator interfaces"]
  node_ui["Response dashboard<br/>[App.tsx]"]
  node_incident_views["Incident views<br/>[IncidentDetail.tsx]"]
  node_approval_panel["Approval panel<br/>[ApprovalPanel.tsx]"]
  node_trace_button["Trace viewer link"]
  node_cli["Operator CLI<br/>[main.py]"]
end

subgraph group_api["Incident service"]
  node_api_service["REST API<br/>[main.py]"]
  node_incident_store[("Incident store<br/>[main.py]")]
end

subgraph group_pipeline["Response pipeline"]
  node_simulator["Telemetry generator"]
  node_graph["Agent graph<br/>[graph.py]"]
  node_monitor["Anomaly monitor<br/>[monitor.py]"]
  node_diagnosis["Root cause diagnosis<br/>[diagnosis.py]"]
  node_remediation["Fix proposal<br/>[remediation.py]"]
  node_approval_gate["Human approval gate<br/>[graph.py]"]
  node_executor["Action executor<br/>[graph.py]"]
  node_postmortem["Postmortem learning<br/>[postmortem.py]"]
  node_guardrails["Input guardrails<br/>[injection_guard.py]"]
  node_pii["PII scrubber<br/>[pii_scrubber.py]"]
  node_risk["Risk classifier<br/>[risk_classifier.py]"]
end

subgraph group_state["Incident state"]
  node_thresholds[("Monitor thresholds<br/>[thresholds.json]")]
  node_schemas["Incident state schemas<br/>[schemas.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_eval_harness["Pipeline evaluation<br/>[harness.py]"]
  node_golden_set["Golden incidents<br/>[golden_set.json]"]
end

node_operator(("SRE operator"))
node_langfuse["Langfuse tracing"]
node_groq["Groq inference"]

node_operator -->|"uses"| node_ui
node_ui -->|"renders"| node_incident_views
node_incident_views -->|"shows gate"| node_approval_panel
node_incident_views -->|"offers trace"| node_trace_button
node_ui -->|"requests incidents"| node_api_service
node_approval_panel -->|"submits decision"| node_api_service
node_trace_button -->|"requests trace"| node_api_service
node_operator -->|"runs investigation"| node_cli
node_cli -->|"generates logs"| node_simulator
node_cli -->|"runs pipeline"| node_graph
node_cli -->|"resumes decision"| node_graph
node_api_service -->|"reads and writes"| node_incident_store
node_api_service -->|"generates logs"| node_simulator
node_api_service -->|"runs pipeline"| node_graph
node_api_service -->|"resumes decision"| node_graph
node_graph -->|"scrubs telemetry"| node_pii
node_graph -->|"checks anomalies"| node_monitor
node_monitor -->|"reads thresholds"| node_thresholds
node_graph -->|"checks injection"| node_guardrails
node_graph -->|"diagnoses incident"| node_diagnosis
node_graph -->|"proposes fix"| node_remediation
node_graph -->|"classifies risk"| node_risk
node_graph -->|"requests decision"| node_approval_gate
node_operator -->|"approves or rejects"| node_approval_gate
node_graph -->|"executes approved fix"| node_executor
node_graph -->|"creates postmortem"| node_postmortem
node_postmortem -->|"updates thresholds"| node_thresholds
node_graph -->|"uses state"| node_schemas
node_api_service -.->|"records traces"| node_langfuse
node_graph -.->|"records traces"| node_langfuse
node_monitor -.->|"infers"| node_groq
node_diagnosis -.->|"infers"| node_groq
node_remediation -.->|"infers"| node_groq
node_postmortem -.->|"infers"| node_groq
node_eval_harness -->|"loads cases"| node_golden_set
node_eval_harness -->|"generates logs"| node_simulator
node_eval_harness -->|"evaluates pipeline"| node_graph

click node_ui "https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/App.tsx"
click node_incident_views "https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/components/IncidentDetail.tsx"
click node_approval_panel "https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/components/ApprovalPanel.tsx"
click node_trace_button "https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/components/TraceViewerButton.tsx"
click node_cli "https://github.com/uzair-23/agentic-sre/blob/main/backend/cli/main.py"
click node_api_service "https://github.com/uzair-23/agentic-sre/blob/main/backend/api/main.py"
click node_incident_store "https://github.com/uzair-23/agentic-sre/blob/main/backend/api/main.py"
click node_simulator "https://github.com/uzair-23/agentic-sre/blob/main/backend/simulator/incident_generator.py"
click node_graph "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/graph.py"
click node_monitor "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/monitor.py"
click node_diagnosis "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/diagnosis.py"
click node_remediation "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/remediation.py"
click node_approval_gate "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/graph.py"
click node_executor "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/graph.py"
click node_postmortem "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/postmortem.py"
click node_guardrails "https://github.com/uzair-23/agentic-sre/blob/main/backend/guardrails/injection_guard.py"
click node_pii "https://github.com/uzair-23/agentic-sre/blob/main/backend/guardrails/pii_scrubber.py"
click node_risk "https://github.com/uzair-23/agentic-sre/blob/main/backend/guardrails/risk_classifier.py"
click node_thresholds "https://github.com/uzair-23/agentic-sre/blob/main/backend/simulator/thresholds.json"
click node_schemas "https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/schemas.py"
click node_eval_harness "https://github.com/uzair-23/agentic-sre/blob/main/backend/evals/harness.py"
click node_golden_set "https://github.com/uzair-23/agentic-sre/blob/main/backend/simulator/golden_set.json"

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_ui,node_incident_views,node_approval_panel,node_trace_button,node_cli toneBlue
class node_api_service,node_incident_store toneAmber
class node_simulator,node_graph,node_monitor,node_diagnosis,node_remediation,node_approval_gate,node_executor,node_postmortem,node_guardrails,node_pii,node_risk toneMint
class node_thresholds,node_schemas toneRose
class node_eval_harness,node_golden_set,node_operator,node_langfuse,node_groq toneIndigo
```

## Components

### Operator interfaces

- [Response dashboard](https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Incident views](https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/components/IncidentDetail.tsx): `frontend/src/components/IncidentDetail.tsx`
- [Approval panel](https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/components/ApprovalPanel.tsx): `frontend/src/components/ApprovalPanel.tsx`
- [Trace viewer link](https://github.com/uzair-23/agentic-sre/blob/main/frontend/src/components/TraceViewerButton.tsx): `frontend/src/components/TraceViewerButton.tsx`
- [Operator CLI](https://github.com/uzair-23/agentic-sre/blob/main/backend/cli/main.py): `backend/cli/main.py`

### Incident service

- [REST API](https://github.com/uzair-23/agentic-sre/blob/main/backend/api/main.py): `backend/api/main.py`
- [Incident store](https://github.com/uzair-23/agentic-sre/blob/main/backend/api/main.py): `backend/api/main.py`

### Response pipeline

- [Telemetry generator](https://github.com/uzair-23/agentic-sre/blob/main/backend/simulator/incident_generator.py): `backend/simulator/incident_generator.py`
- [Agent graph](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/graph.py): `backend/agents/graph.py`
- [Anomaly monitor](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/monitor.py): `backend/agents/monitor.py`
- [Root cause diagnosis](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/diagnosis.py): `backend/agents/diagnosis.py`
- [Fix proposal](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/remediation.py): `backend/agents/remediation.py`
- [Human approval gate](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/graph.py): `backend/agents/graph.py`
- [Action executor](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/graph.py): `backend/agents/graph.py`
- [Postmortem learning](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/postmortem.py): `backend/agents/postmortem.py`
- [Input guardrails](https://github.com/uzair-23/agentic-sre/blob/main/backend/guardrails/injection_guard.py): `backend/guardrails/injection_guard.py`
- [PII scrubber](https://github.com/uzair-23/agentic-sre/blob/main/backend/guardrails/pii_scrubber.py): `backend/guardrails/pii_scrubber.py`
- [Risk classifier](https://github.com/uzair-23/agentic-sre/blob/main/backend/guardrails/risk_classifier.py): `backend/guardrails/risk_classifier.py`

### Incident state

- [Monitor thresholds](https://github.com/uzair-23/agentic-sre/blob/main/backend/simulator/thresholds.json): `backend/simulator/thresholds.json`
- [Incident state schemas](https://github.com/uzair-23/agentic-sre/blob/main/backend/agents/schemas.py): `backend/agents/schemas.py`

### Evaluation

- [Pipeline evaluation](https://github.com/uzair-23/agentic-sre/blob/main/backend/evals/harness.py): `backend/evals/harness.py`
- [Golden incidents](https://github.com/uzair-23/agentic-sre/blob/main/backend/simulator/golden_set.json): `backend/simulator/golden_set.json`

### Other components

- **SRE operator**
- **Langfuse tracing**
- **Groq inference**

## Connections

- SRE operator → Response dashboard: uses
- Response dashboard → Incident views: renders
- Incident views → Approval panel: shows gate
- Incident views → Trace viewer link: offers trace
- Response dashboard → REST API: requests incidents
- Approval panel → REST API: submits decision
- Trace viewer link → REST API: requests trace
- SRE operator → Operator CLI: runs investigation
- Operator CLI → Telemetry generator: generates logs
- Operator CLI → Agent graph: runs pipeline
- Operator CLI → Agent graph: resumes decision
- REST API → Incident store: reads and writes
- REST API → Telemetry generator: generates logs
- REST API → Agent graph: runs pipeline
- REST API → Agent graph: resumes decision
- Agent graph → PII scrubber: scrubs telemetry
- Agent graph → Anomaly monitor: checks anomalies
- Anomaly monitor → Monitor thresholds: reads thresholds
- Agent graph → Input guardrails: checks injection
- Agent graph → Root cause diagnosis: diagnoses incident
- Agent graph → Fix proposal: proposes fix
- Agent graph → Risk classifier: classifies risk
- Agent graph → Human approval gate: requests decision
- SRE operator → Human approval gate: approves or rejects
- Agent graph → Action executor: executes approved fix
- Agent graph → Postmortem learning: creates postmortem
- Postmortem learning → Monitor thresholds: updates thresholds
- Agent graph → Incident state schemas: uses state
- REST API → Langfuse tracing: records traces
- Agent graph → Langfuse tracing: records traces
- Anomaly monitor → Groq inference: infers
- Root cause diagnosis → Groq inference: infers
- Fix proposal → Groq inference: infers
- Postmortem learning → Groq inference: infers
- Pipeline evaluation → Golden incidents: loads cases
- Pipeline evaluation → Telemetry generator: generates logs
- Pipeline evaluation → Agent graph: evaluates pipeline
