# gopi-yenduru/devops-incident-response-agent architecture

> Architecture diagram of the GitHub repository gopi-yenduru/devops-incident-response-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gopi-yenduru/devops-incident-response-agent
- Repository: https://github.com/gopi-yenduru/devops-incident-response-agent

## Overview

DevOps Incident Agent ingests application logs, persists them, analyzes incidents through a five-stage agent graph, and presents incidents and analytics in a React dashboard. Its response stage can create GitHub issues or fix PRs and send Telegram or Slack alerts. The graph preserves the documented correlation, feedback, webhook-security, and auto-resolution capabilities; unsampled subsystem links are included only where the README or source index supports them.

Main entry points: [`backend/agents/graph.py`](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/graph.py) (Agent Graph), [`backend/database.py`](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/database.py) (Database), [`backend/routers/logs.py`](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/logs.py) (Log Ingestion), [`frontend/src/api/client.js`](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/api/client.js) (API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingestion and API"]
  node_api["FastAPI Application<br/>[main.py]"]
  node_app_registry["App Registration<br/>[apps.py]"]
  node_log_ingestion["Log Ingestion<br/>[logs.py]"]
  node_security["Webhook Security<br/>[security.py]"]
  node_monitor["Log Monitor<br/>[log_monitor.py]"]
end

subgraph group_analysis["Incident Analysis"]
  node_pipeline["Agent Graph<br/>[graph.py]"]
  node_anomaly["Anomaly Detection"]
  node_correlator["Incident Correlation"]
  node_root_cause["Root Cause Analysis"]
  node_fix_suggestion["Fix Suggestions<br/>[fix_suggestion.py]"]
end

subgraph group_state["State and Metrics"]
  node_database[("Database<br/>[database.py]")]
  node_models["Incident and App Models<br/>[incident.py]"]
  node_incident_api["Incident Management<br/>[incidents.py]"]
  node_analytics_api["Analytics API<br/>[analytics.py]"]
end

subgraph group_response["Response Integrations"]
  node_orchestrator["Response Orchestration"]
  node_github["GitHub Issues and PRs<br/>[github_service.py]"]
  node_telegram["Telegram Alerts"]
  node_slack["Slack Alerts<br/>[slack_service.py]"]
end

subgraph group_experience["Dashboard"]
  node_frontend["React App<br/>[App.jsx]"]
  node_api_client["API Client<br/>[client.js]"]
  node_dashboard["Live Dashboard<br/>[Dashboard.jsx]"]
  node_incident_detail["Incident Detail<br/>[IncidentDetail.jsx]"]
  node_analytics_view["Analytics View<br/>[Analytics.jsx]"]
  node_feedback["Accuracy Feedback"]
end

node_app_user(("Operator"))
node_log_source(("Application Logs"))

node_app_user -->|"views"| node_frontend
node_log_source -->|"submits logs"| node_log_ingestion
node_log_source -->|"sends signed webhook"| node_log_ingestion
node_api -->|"routes requests"| node_app_registry
node_api -->|"routes requests"| node_log_ingestion
node_api -->|"routes requests"| node_incident_api
node_api -->|"routes requests"| node_analytics_api
node_api -->|"starts monitor"| node_monitor
node_log_ingestion -->|"validates keys"| node_security
node_log_ingestion -->|"stores logs"| node_database
node_log_ingestion -->|"queues analysis"| node_pipeline
node_monitor -->|"runs analysis"| node_pipeline
node_pipeline -->|"dispatches"| node_anomaly
node_pipeline -->|"dispatches"| node_correlator
node_pipeline -->|"dispatches"| node_root_cause
node_pipeline -->|"dispatches"| node_fix_suggestion
node_pipeline -->|"dispatches"| node_orchestrator
node_pipeline -->|"reads history"| node_database
node_pipeline -.->|"stores results"| node_database
node_database -->|"maps records"| node_models
node_app_registry -->|"reads and writes"| node_database
node_incident_api -->|"reads and updates"| node_database
node_analytics_api -->|"queries metrics"| node_database
node_monitor -.->|"checks recurrence"| node_database
node_orchestrator -->|"creates issues"| node_github
node_orchestrator -->|"creates fix PRs"| node_github
node_orchestrator -->|"sends alerts"| node_telegram
node_orchestrator -->|"sends alerts"| node_slack
node_frontend -->|"renders"| node_dashboard
node_frontend -->|"renders"| node_incident_detail
node_frontend -->|"renders"| node_analytics_view
node_dashboard -->|"requests data"| node_api_client
node_incident_detail -->|"requests incident"| node_api_client
node_incident_detail -->|"renders"| node_feedback
node_feedback -->|"submits rating"| node_api_client
node_analytics_view -->|"requests metrics"| node_api_client
node_api_client -->|"calls endpoints"| node_incident_api
node_api_client -->|"calls endpoints"| node_analytics_api

click node_api "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/main.py"
click node_app_registry "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/apps.py"
click node_log_ingestion "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/logs.py"
click node_security "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/security.py"
click node_monitor "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/log_monitor.py"
click node_pipeline "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/graph.py"
click node_anomaly "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/anomaly_detector.py"
click node_correlator "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/incident_correlator.py"
click node_root_cause "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/root_cause_analyzer.py"
click node_fix_suggestion "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/fix_suggestion.py"
click node_orchestrator "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/response_orchestrator.py"
click node_database "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/database.py"
click node_models "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/models/incident.py"
click node_incident_api "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/incidents.py"
click node_analytics_api "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/analytics.py"
click node_github "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/github_service.py"
click node_telegram "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/telegram_service.py"
click node_slack "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/slack_service.py"
click node_frontend "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/api/client.js"
click node_dashboard "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/pages/Dashboard.jsx"
click node_incident_detail "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/pages/IncidentDetail.jsx"
click node_analytics_view "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/pages/Analytics.jsx"
click node_feedback "https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/components/AccuracyFeedback.jsx"

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_api,node_app_registry,node_log_ingestion,node_security,node_monitor toneBlue
class node_pipeline,node_anomaly,node_correlator,node_root_cause,node_fix_suggestion toneAmber
class node_database,node_models,node_incident_api,node_analytics_api toneMint
class node_orchestrator,node_github,node_telegram,node_slack toneRose
class node_frontend,node_api_client,node_dashboard,node_incident_detail,node_analytics_view,node_feedback,node_app_user,node_log_source toneIndigo
```

## Components

### Ingestion and API

- [FastAPI Application](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/main.py): `backend/main.py`
- [App Registration](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/apps.py): `backend/routers/apps.py`
- [Log Ingestion](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/logs.py): `backend/routers/logs.py`
- [Webhook Security](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/security.py): `backend/security.py`
- [Log Monitor](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/log_monitor.py): `backend/services/log_monitor.py`

### Incident Analysis

- [Agent Graph](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/graph.py): `backend/agents/graph.py`
- [Anomaly Detection](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/anomaly_detector.py): `backend/agents/anomaly_detector.py`
- [Incident Correlation](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/incident_correlator.py): `backend/agents/incident_correlator.py`
- [Root Cause Analysis](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/root_cause_analyzer.py): `backend/agents/root_cause_analyzer.py`
- [Fix Suggestions](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/fix_suggestion.py): `backend/agents/fix_suggestion.py`

### State and Metrics

- [Database](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/database.py): `backend/database.py`
- [Incident and App Models](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/models/incident.py): `backend/models/incident.py`
- [Incident Management](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/incidents.py): `backend/routers/incidents.py`
- [Analytics API](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/routers/analytics.py): `backend/routers/analytics.py`

### Response Integrations

- [Response Orchestration](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/agents/response_orchestrator.py): `backend/agents/response_orchestrator.py`
- [GitHub Issues and PRs](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/github_service.py): `backend/services/github_service.py`
- [Telegram Alerts](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/telegram_service.py): `backend/services/telegram_service.py`
- [Slack Alerts](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/backend/services/slack_service.py): `backend/services/slack_service.py`

### Dashboard

- [React App](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API Client](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/api/client.js): `frontend/src/api/client.js`
- [Live Dashboard](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Incident Detail](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/pages/IncidentDetail.jsx): `frontend/src/pages/IncidentDetail.jsx`
- [Analytics View](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/pages/Analytics.jsx): `frontend/src/pages/Analytics.jsx`
- [Accuracy Feedback](https://github.com/gopi-yenduru/devops-incident-response-agent/blob/main/frontend/src/components/AccuracyFeedback.jsx): `frontend/src/components/AccuracyFeedback.jsx`

### Other components

- **Operator**
- **Application Logs**

## Connections

- Operator → React App: views (evidence: `frontend/src/App.jsx`)
- Application Logs → Log Ingestion: submits logs (evidence: `README.md`)
- Application Logs → Log Ingestion: sends signed webhook (evidence: `README.md`)
- FastAPI Application → App Registration: routes requests (evidence: `backend/main.py`)
- FastAPI Application → Log Ingestion: routes requests (evidence: `backend/main.py`)
- FastAPI Application → Incident Management: routes requests (evidence: `backend/main.py`)
- FastAPI Application → Analytics API: routes requests (evidence: `backend/main.py`)
- FastAPI Application → Log Monitor: starts monitor (evidence: `backend/main.py`)
- Log Ingestion → Webhook Security: validates keys (evidence: `backend/routers/logs.py`)
- Log Ingestion → Database: stores logs (evidence: `backend/routers/logs.py`)
- Log Ingestion → Agent Graph: queues analysis (evidence: `backend/routers/logs.py`)
- Log Monitor → Agent Graph: runs analysis (evidence: `backend/services/log_monitor.py`)
- Agent Graph → Anomaly Detection: dispatches (evidence: `backend/agents/graph.py`)
- Agent Graph → Incident Correlation: dispatches (evidence: `backend/agents/graph.py`)
- Agent Graph → Root Cause Analysis: dispatches (evidence: `backend/agents/graph.py`)
- Agent Graph → Fix Suggestions: dispatches (evidence: `backend/agents/graph.py`)
- Agent Graph → Response Orchestration: dispatches (evidence: `backend/agents/graph.py`)
- Agent Graph → Database: reads history (evidence: `backend/agents/graph.py`)
- Agent Graph → Database: stores results (evidence: `backend/agents/graph.py`)
- Database → Incident and App Models: maps records (evidence: `backend/database.py`)
- App Registration → Database: reads and writes (evidence: `backend/routers/apps.py`)
- Incident Management → Database: reads and updates (evidence: `backend/routers/incidents.py`)
- Analytics API → Database: queries metrics (evidence: `backend/routers/analytics.py`)
- Log Monitor → Database: checks recurrence (evidence: `backend/services/log_monitor.py`)
- Response Orchestration → GitHub Issues and PRs: creates issues (evidence: `backend/agents/response_orchestrator.py`)
- Response Orchestration → GitHub Issues and PRs: creates fix PRs (evidence: `backend/agents/response_orchestrator.py`)
- Response Orchestration → Telegram Alerts: sends alerts (evidence: `backend/agents/response_orchestrator.py`)
- Response Orchestration → Slack Alerts: sends alerts (evidence: `backend/agents/response_orchestrator.py`)
- React App → Live Dashboard: renders (evidence: `frontend/src/App.jsx`)
- React App → Incident Detail: renders (evidence: `frontend/src/App.jsx`)
- React App → Analytics View: renders (evidence: `frontend/src/App.jsx`)
- Live Dashboard → API Client: requests data (evidence: `frontend/src/pages/Dashboard.jsx`)
- Incident Detail → API Client: requests incident (evidence: `frontend/src/pages/IncidentDetail.jsx`)
- Incident Detail → Accuracy Feedback: renders (evidence: `frontend/src/pages/IncidentDetail.jsx`)
- Accuracy Feedback → API Client: submits rating (evidence: `frontend/src/components/AccuracyFeedback.jsx`)
- Analytics View → API Client: requests metrics (evidence: `frontend/src/pages/Analytics.jsx`)
- API Client → Incident Management: calls endpoints (evidence: `frontend/src/api/client.js`)
- API Client → Analytics API: calls endpoints (evidence: `frontend/src/api/client.js`)
