# koushikbhuragoni04-glitch/aura architecture

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

- Interactive diagram: https://gitdiagram.com/koushikbhuragoni04-glitch/aura
- Repository: https://github.com/koushikbhuragoni04-glitch/aura

## Overview

Hindsight is an on-call incident triage agent that compares a baseline LLM response with a memory-informed response, while retaining engineer-confirmed resolutions for future alerts. The principal flow is alert submission through Flask, parallel recall/reflection and LLM triage, then evidence-backed results for the UI. A separate seed path loads synthetic incident history. The UI file is named in the README but absent from the supplied tree, so it is not represented as a repository node; relationships below are supported by app.py, agent.py, memory.py, seed.py, and README statements.

Main entry points: [`app.py`](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/app.py) (Flask API), [`agent.py`](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/agent.py) (Memory-aware triage), [`memory.py`](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py) (Incident retention), [`seed.py`](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/seed.py) (History loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["API and interaction"]
  node_flask["Flask API<br/>[app.py]"]
  node_resolution["Resolution teaching<br/>[app.py]"]
  node_static_ui["Web UI"]
end

subgraph group_triage["Triage reasoning"]
  node_triage_agent["Triage orchestration<br/>[agent.py]"]
  node_baseline["Baseline triage<br/>[agent.py]"]
  node_memory_triage["Memory-aware triage<br/>[agent.py]"]
end

subgraph group_memory["Incident memory"]
  node_recall["Similar recall<br/>[memory.py]"]
  node_reflection["Pattern reflection<br/>[memory.py]"]
  node_retain["Incident retention<br/>[memory.py]"]
  node_incident_text["Incident narrative<br/>[memory.py]"]
end

subgraph group_history["Incident history"]
  node_demo["Demo alert<br/>[seed_data.py]"]
  node_seed_loader["History loader<br/>[seed.py]"]
  node_incident_history["Synthetic incidents<br/>[seed_data.py]"]
end

node_engineer(("On-call engineer"))
node_llm{{"Groq LLM"}}
node_memory_bank[("Hindsight bank")]

node_engineer -->|"submits alert"| node_flask
node_flask -->|"serves demo"| node_demo
node_flask -->|"calls triage"| node_triage_agent
node_triage_agent -->|"dispatches"| node_baseline
node_triage_agent -->|"dispatches"| node_memory_triage
node_baseline -->|"requests completion"| node_llm
node_memory_triage -->|"requests memories"| node_recall
node_memory_triage -->|"requests insight"| node_reflection
node_memory_triage -->|"requests completion"| node_llm
node_recall -->|"recalls incidents"| node_memory_bank
node_reflection -->|"reflects over"| node_memory_bank
node_flask -->|"accepts resolution"| node_resolution
node_resolution -->|"retains incident"| node_retain
node_retain -->|"formats narrative"| node_incident_text
node_retain -->|"stores incident"| node_memory_bank
node_seed_loader -->|"loads incidents"| node_incident_history
node_seed_loader -->|"retains each"| node_retain
node_static_ui -.->|"uses API"| node_flask
node_engineer -->|"teaches agent"| node_resolution

click node_flask "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/app.py"
click node_demo "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/seed_data.py"
click node_triage_agent "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/agent.py"
click node_baseline "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/agent.py"
click node_memory_triage "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/agent.py"
click node_recall "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py"
click node_reflection "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py"
click node_resolution "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/app.py"
click node_retain "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py"
click node_incident_text "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py"
click node_seed_loader "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/seed.py"
click node_incident_history "https://github.com/koushikbhuragoni04-glitch/aura/blob/main/seed_data.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_flask,node_resolution,node_static_ui toneBlue
class node_triage_agent,node_baseline,node_memory_triage,node_memory_bank toneAmber
class node_recall,node_reflection,node_retain,node_incident_text toneMint
class node_demo,node_seed_loader,node_incident_history toneRose
class node_engineer,node_llm toneIndigo
```

## Components

### API and interaction

- [Flask API](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/app.py): `app.py`
- [Resolution teaching](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/app.py): `app.py`
- **Web UI**

### Triage reasoning

- [Triage orchestration](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/agent.py): `agent.py`
- [Baseline triage](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/agent.py): `agent.py`
- [Memory-aware triage](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/agent.py): `agent.py`

### Incident memory

- [Similar recall](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py): `memory.py`
- [Pattern reflection](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py): `memory.py`
- [Incident retention](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py): `memory.py`
- [Incident narrative](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/memory.py): `memory.py`

### Incident history

- [Demo alert](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/seed_data.py): `seed_data.py`
- [History loader](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/seed.py): `seed.py`
- [Synthetic incidents](https://github.com/koushikbhuragoni04-glitch/aura/blob/main/seed_data.py): `seed_data.py`

### Other components

- **On-call engineer**
- **Groq LLM**
- **Hindsight bank**

## Connections

- On-call engineer → Flask API: submits alert (evidence: `app.py`)
- Flask API → Demo alert: serves demo (evidence: `app.py`)
- Flask API → Triage orchestration: calls triage (evidence: `app.py`)
- Triage orchestration → Baseline triage: dispatches (evidence: `agent.py`)
- Triage orchestration → Memory-aware triage: dispatches (evidence: `agent.py`)
- Baseline triage → Groq LLM: requests completion (evidence: `agent.py`)
- Memory-aware triage → Similar recall: requests memories (evidence: `agent.py`)
- Memory-aware triage → Pattern reflection: requests insight (evidence: `agent.py`)
- Memory-aware triage → Groq LLM: requests completion (evidence: `agent.py`)
- Similar recall → Hindsight bank: recalls incidents (evidence: `memory.py`)
- Pattern reflection → Hindsight bank: reflects over (evidence: `memory.py`)
- Flask API → Resolution teaching: accepts resolution (evidence: `app.py`)
- Resolution teaching → Incident retention: retains incident (evidence: `app.py`)
- Incident retention → Incident narrative: formats narrative (evidence: `memory.py`)
- Incident retention → Hindsight bank: stores incident (evidence: `memory.py`)
- History loader → Synthetic incidents: loads incidents (evidence: `seed.py`)
- History loader → Incident retention: retains each (evidence: `seed.py`)
- Web UI → Flask API: uses API (evidence: `README.md`)
- On-call engineer → Resolution teaching: teaches agent (evidence: `app.py`)
