# emanisaikumar01/incidence-respose-agent architecture

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

- Interactive diagram: https://gitdiagram.com/emanisaikumar01/incidence-respose-agent
- Repository: https://github.com/emanisaikumar01/incidence-respose-agent

## Overview

RecallOps is an AI-assisted incident-response application: engineers submit incidents, review recommendations informed by similar historical cases, and record verified outcomes for future recall. The Django dashboard calls the FastAPI backend over HTTP; the backend persists incident records locally and coordinates memory recall and recommendation generation. The documented memory explorer is also represented. Edges reflect shown calls or README-documented behavior; the excerpts do not show every template/API wiring detail or provider implementation.

Main entry points: [`Backend/api/incidents.py`](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/api/incidents.py) (Incident API), [`app/dashboard/services.py`](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/app/dashboard/services.py) (Backend HTTP client), [`Backend/services/incident_service.py`](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/services/incident_service.py) (Incident workflows), [`agent/incident_agent.py`](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/agent/incident_agent.py) (Incident response agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Engineer dashboard"]
  node_dashboard["Dashboard views<br/>[views.py]"]
  node_webclient["Backend HTTP client<br/>[services.py]"]
  node_webpages["Dashboard and incident pages"]
end

subgraph group_api["Incident backend"]
  node_incident_api["Incident API<br/>[incidents.py]"]
  node_memory_api["Memory search API<br/>[memory.py]"]
  node_backend_app["FastAPI app<br/>[main.py]"]
  node_incident_service["Incident workflows"]
  node_incident_store[("Incident JSON store<br/>[incidents.json]")]
  node_incident_model["Incident models<br/>[incident.py]"]
  node_outcome_model["Outcome model<br/>[outcome.py]"]
  node_recommendation_model["Recommendation model<br/>[recommendation.py]"]
end

subgraph group_ai["Analysis and recommendation"]
  node_recommendation_service["Recommendation formatting"]
  node_agent["Incident response agent<br/>[incident_agent.py]"]
  node_prompts["Analysis prompt<br/>[prompts.py]"]
end

subgraph group_memory["Incident memory"]
  node_memory_service["Memory service<br/>[memory_service.py]"]
  node_hindsight_adapter["Hindsight adapter"]
end

node_engineer(("Engineer"))
node_groq["Groq LLM"]
node_hindsight[("Hindsight memory service")]

node_engineer -->|"submits and reviews"| node_dashboard
node_dashboard -->|"requests backend"| node_webclient
node_dashboard -->|"renders"| node_webpages
node_webclient -->|"calls HTTP API"| node_backend_app
node_backend_app -->|"registers routes"| node_incident_api
node_backend_app -->|"registers routes"| node_memory_api
node_incident_api -->|"validates incident"| node_incident_model
node_incident_api -->|"validates outcome"| node_outcome_model
node_incident_api -->|"dispatches workflow"| node_incident_service
node_incident_service -->|"reads and writes"| node_incident_store
node_incident_service -->|"recalls and records"| node_memory_service
node_incident_service -->|"generates recommendation"| node_recommendation_service
node_recommendation_service -->|"analyzes incident"| node_agent
node_agent -->|"uses prompt"| node_prompts
node_agent -->|"generates response"| node_groq
node_memory_api -->|"searches memories"| node_memory_service
node_memory_service -->|"delegates recall and record"| node_hindsight_adapter
node_hindsight_adapter -->|"recalls and retains"| node_hindsight
node_webclient -->|"calls incident endpoints"| node_incident_api
node_webclient -->|"calls search endpoint"| node_memory_api
node_agent -.->|"optional direct recall"| node_hindsight_adapter

click node_dashboard "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/app/dashboard/views.py"
click node_webclient "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/app/dashboard/services.py"
click node_webpages "https://github.com/emanisaikumar01/incidence-respose-agent/tree/main/app/templates"
click node_incident_api "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/api/incidents.py"
click node_memory_api "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/api/memory.py"
click node_backend_app "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/main.py"
click node_incident_service "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/services/incident_service.py"
click node_incident_store "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/data/incidents.json"
click node_incident_model "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/models/incident.py"
click node_outcome_model "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/models/outcome.py"
click node_recommendation_model "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/models/recommendation.py"
click node_recommendation_service "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/services/recommendation_service.py"
click node_agent "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/agent/incident_agent.py"
click node_prompts "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/agent/prompts.py"
click node_memory_service "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/services/memory_service.py"
click node_hindsight_adapter "https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/memory/hindsight_memory.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_dashboard,node_webclient,node_webpages toneBlue
class node_incident_api,node_memory_api,node_backend_app,node_incident_service,node_incident_store,node_incident_model,node_outcome_model,node_recommendation_model,node_hindsight toneAmber
class node_recommendation_service,node_agent,node_prompts toneMint
class node_memory_service,node_hindsight_adapter toneRose
class node_engineer,node_groq toneIndigo
```

## Components

### Engineer dashboard

- [Dashboard views](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/app/dashboard/views.py): `app/dashboard/views.py`
- [Backend HTTP client](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/app/dashboard/services.py): `app/dashboard/services.py`
- [Dashboard and incident pages](https://github.com/emanisaikumar01/incidence-respose-agent/tree/main/app/templates): `app/templates`

### Incident backend

- [Incident API](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/api/incidents.py): `Backend/api/incidents.py`
- [Memory search API](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/api/memory.py): `Backend/api/memory.py`
- [FastAPI app](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/main.py): `Backend/main.py`
- [Incident workflows](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/services/incident_service.py): `Backend/services/incident_service.py`
- [Incident JSON store](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/data/incidents.json): `data/incidents.json`
- [Incident models](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/models/incident.py): `Backend/models/incident.py`
- [Outcome model](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/models/outcome.py): `Backend/models/outcome.py`
- [Recommendation model](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/models/recommendation.py): `Backend/models/recommendation.py`

### Analysis and recommendation

- [Recommendation formatting](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/services/recommendation_service.py): `Backend/services/recommendation_service.py`
- [Incident response agent](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/agent/incident_agent.py): `agent/incident_agent.py`
- [Analysis prompt](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/agent/prompts.py): `agent/prompts.py`

### Incident memory

- [Memory service](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/Backend/services/memory_service.py): `Backend/services/memory_service.py`
- [Hindsight adapter](https://github.com/emanisaikumar01/incidence-respose-agent/blob/main/memory/hindsight_memory.py): `memory/hindsight_memory.py`

### Other components

- **Engineer**
- **Groq LLM**
- **Hindsight memory service**

## Connections

- Engineer → Dashboard views: submits and reviews (evidence: `README.md`)
- Dashboard views → Backend HTTP client: requests backend (evidence: `app/dashboard/views.py`)
- Dashboard views → Dashboard and incident pages: renders (evidence: `app/dashboard/views.py`)
- Backend HTTP client → FastAPI app: calls HTTP API (evidence: `app/dashboard/services.py`)
- FastAPI app → Incident API: registers routes (evidence: `Backend/main.py`)
- FastAPI app → Memory search API: registers routes (evidence: `Backend/main.py`)
- Incident API → Incident models: validates incident (evidence: `Backend/api/incidents.py`)
- Incident API → Outcome model: validates outcome (evidence: `Backend/api/incidents.py`)
- Incident API → Incident workflows: dispatches workflow (evidence: `Backend/api/incidents.py`)
- Incident workflows → Incident JSON store: reads and writes (evidence: `Backend/services/incident_service.py`)
- Incident workflows → Memory service: recalls and records (evidence: `Backend/services/incident_service.py`)
- Incident workflows → Recommendation formatting: generates recommendation (evidence: `Backend/services/incident_service.py`)
- Recommendation formatting → Incident response agent: analyzes incident (evidence: `Backend/services/recommendation_service.py`)
- Incident response agent → Analysis prompt: uses prompt (evidence: `agent/incident_agent.py`)
- Incident response agent → Groq LLM: generates response (evidence: `agent/incident_agent.py`)
- Memory search API → Memory service: searches memories (evidence: `Backend/api/memory.py`)
- Memory service → Hindsight adapter: delegates recall and record (evidence: `Backend/services/memory_service.py`)
- Hindsight adapter → Hindsight memory service: recalls and retains (evidence: `memory/hindsight_memory.py`)
- Backend HTTP client → Incident API: calls incident endpoints (evidence: `app/dashboard/services.py`)
- Backend HTTP client → Memory search API: calls search endpoint (evidence: `app/dashboard/services.py`)
- Incident response agent → Hindsight adapter: optional direct recall (evidence: `agent/incident_agent.py`)
