# shashivardhan-7/deploydetective-exasol architecture

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

- Interactive diagram: https://gitdiagram.com/shashivardhan-7/deploydetective-exasol
- Repository: https://github.com/shashivardhan-7/deploydetective-exasol

## Overview

Deploy Detective is a web-based AIOps agent that investigates microservice incidents using Exasol, recommends a safe response, and verifies recovery. The principal workflow starts with a user request, resolves the affected service, analyzes error rates, correlates deployments, checks dependency latency and historical incidents, then decides whether to simulate a rollback and query for recovery. The README documents logs, metrics, deployment history and incident history as analytical inputs. The graph follows the sampled application and agent code; SQL capabilities and database structure are supported by the README and tree, but their contents were not sampled.

Main entry points: [`agent/tools.py`](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/tools.py) (Exasol query and action tools), [`agent/investigator.py`](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/investigator.py) (Investigation orchestrator), [`app/main.py`](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/app/main.py) (FastAPI application), [`database/schema.sql`](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/schema.sql) (Exasol analytical store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_ui["Investigation UI<br/>[app.js]"]
  node_api["FastAPI application<br/>[main.py]"]
end

subgraph group_agent["Investigation agent"]
  node_investigator["Investigation orchestrator<br/>[investigator.py]"]
  node_planner["Service and intent planner<br/>[planner.py]"]
  node_decision["Remediation policy<br/>[decision.py]"]
  node_narrative["Evidence narrative<br/>[narrative.py]"]
end

subgraph group_analytics["Exasol analytics"]
  node_tools["Exasol query and action tools<br/>[tools.py]"]
  node_sql["Analytics query definitions<br/>[queries.sql]"]
  node_error["Error-rate analysis<br/>[queries.sql]"]
  node_deploy["Deploy correlation<br/>[queries.sql]"]
  node_dependency["Dependency latency<br/>[queries.sql]"]
  node_history["Historical incident match<br/>[queries.sql]"]
end

subgraph group_actions["Action and verification"]
  node_mock["Simulated rollback adapter<br/>[mock_deployer.py]"]
  node_verify["Recovery verification<br/>[queries.sql]"]
end

node_user(("Incident requester"))
node_exasol[("Exasol analytical store<br/>[schema.sql]")]

node_user -->|"submits incident"| node_ui
node_ui -->|"posts request"| node_api
node_api -->|"runs investigation"| node_investigator
node_api -->|"checks health"| node_tools
node_investigator -->|"resolves service"| node_planner
node_investigator -->|"requests analysis"| node_tools
node_tools -->|"loads queries"| node_sql
node_tools -->|"runs query"| node_error
node_tools -->|"runs query"| node_deploy
node_tools -->|"runs query"| node_dependency
node_tools -->|"runs query"| node_history
node_tools -->|"executes SQL"| node_exasol
node_exasol -->|"returns evidence"| node_investigator
node_investigator -->|"evaluates evidence"| node_decision
node_investigator -->|"builds explanation"| node_narrative
node_investigator -->|"records rollback"| node_tools
node_tools -->|"proposes rollback"| node_mock
node_tools -->|"writes action audit"| node_exasol
node_investigator -->|"queries recovery"| node_tools
node_tools -->|"runs query"| node_verify
node_tools -->|"reads telemetry"| node_exasol
node_exasol -->|"returns verification"| node_investigator
node_investigator -->|"returns result"| node_api
node_api -->|"returns investigation"| node_ui

click node_ui "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/static/app.js"
click node_api "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/app/main.py"
click node_investigator "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/investigator.py"
click node_planner "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/planner.py"
click node_decision "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/decision.py"
click node_narrative "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/narrative.py"
click node_tools "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/tools.py"
click node_sql "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql"
click node_error "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql"
click node_deploy "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql"
click node_dependency "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql"
click node_history "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql"
click node_exasol "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/schema.sql"
click node_mock "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/deployment/mock_deployer.py"
click node_verify "https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql"

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_api toneBlue
class node_investigator,node_planner,node_decision,node_narrative,node_exasol toneAmber
class node_tools,node_sql,node_error,node_deploy,node_dependency,node_history,node_user toneMint
class node_mock,node_verify toneRose
```

## Components

### Web interface

- [Investigation UI](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/static/app.js): `static/app.js`
- [FastAPI application](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/app/main.py): `app/main.py`

### Investigation agent

- [Investigation orchestrator](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/investigator.py): `agent/investigator.py`
- [Service and intent planner](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/planner.py): `agent/planner.py`
- [Remediation policy](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/decision.py): `agent/decision.py`
- [Evidence narrative](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/narrative.py): `agent/narrative.py`

### Exasol analytics

- [Exasol query and action tools](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/agent/tools.py): `agent/tools.py`
- [Analytics query definitions](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql): `database/queries.sql`
- [Error-rate analysis](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql): `database/queries.sql`
- [Deploy correlation](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql): `database/queries.sql`
- [Dependency latency](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql): `database/queries.sql`
- [Historical incident match](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql): `database/queries.sql`

### Action and verification

- [Simulated rollback adapter](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/deployment/mock_deployer.py): `deployment/mock_deployer.py`
- [Recovery verification](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/queries.sql): `database/queries.sql`

### Other components

- **Incident requester**
- [Exasol analytical store](https://github.com/shashivardhan-7/deploydetective-exasol/blob/main/database/schema.sql): `database/schema.sql`

## Connections

- Incident requester → Investigation UI: submits incident
- Investigation UI → FastAPI application: posts request
- FastAPI application → Investigation orchestrator: runs investigation
- FastAPI application → Exasol query and action tools: checks health
- Investigation orchestrator → Service and intent planner: resolves service
- Investigation orchestrator → Exasol query and action tools: requests analysis
- Exasol query and action tools → Analytics query definitions: loads queries
- Exasol query and action tools → Error-rate analysis: runs query
- Exasol query and action tools → Deploy correlation: runs query
- Exasol query and action tools → Dependency latency: runs query
- Exasol query and action tools → Historical incident match: runs query
- Exasol query and action tools → Exasol analytical store: executes SQL
- Exasol analytical store → Investigation orchestrator: returns evidence
- Investigation orchestrator → Remediation policy: evaluates evidence
- Investigation orchestrator → Evidence narrative: builds explanation
- Investigation orchestrator → Exasol query and action tools: records rollback
- Exasol query and action tools → Simulated rollback adapter: proposes rollback
- Exasol query and action tools → Exasol analytical store: writes action audit
- Investigation orchestrator → Exasol query and action tools: queries recovery
- Exasol query and action tools → Recovery verification: runs query
- Exasol query and action tools → Exasol analytical store: reads telemetry
- Exasol analytical store → Investigation orchestrator: returns verification
- Investigation orchestrator → FastAPI application: returns result
- FastAPI application → Investigation UI: returns investigation
