# agenticai-fde/llmops-customer-support architecture

> Architecture diagram of the GitHub repository agenticai-fde/llmops-customer-support, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/agenticai-fde/llmops-customer-support
- Repository: https://github.com/agenticai-fde/llmops-customer-support

## Overview

This is a small FastAPI customer-support API. A user checks service status or submits a validated question to `/chat`; the handler calls Azure OpenAI and returns the answer with latency and token usage. The app can also send logs and request telemetry to Application Insights when configured. The sampled source is concentrated in `app/main.py`, so endpoint, validation, and client responsibilities are separated logically rather than implying separate modules. Deployment and test infrastructure are outside this runtime view.

Main entry points: [`app/main.py`](https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py) (Chat handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API"]
  node_routes["HTTP endpoints<br/>[main.py]"]
  node_status["Status checks<br/>[main.py]"]
  node_request["Chat request validation<br/>[main.py]"]
end

subgraph group_llm["Answer generation"]
  node_chat["Chat handler<br/>[main.py]"]
  node_client["Azure client setup<br/>[main.py]"]
  node_azure{{"Azure OpenAI"}}
end

subgraph group_observability["Observability"]
  node_telemetry["Telemetry setup<br/>[main.py]"]
  node_insights[("Application Insights")]
end

node_user(("Support user"))

node_user -->|"sends requests"| node_routes
node_routes -->|"serves status"| node_status
node_routes -->|"validates chat"| node_request
node_routes -->|"dispatches chat"| node_chat
node_chat -->|"creates client"| node_client
node_client -->|"configures client"| node_azure
node_chat -->|"requests completion"| node_azure
node_azure -->|"returns answer and usage"| node_chat
node_telemetry -->|"configures export"| node_insights
node_chat -.->|"reports request telemetry"| node_insights

click node_routes "https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py"
click node_status "https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py"
click node_request "https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py"
click node_chat "https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py"
click node_client "https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py"
click node_telemetry "https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.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_routes,node_status,node_request,node_user toneBlue
class node_chat,node_client,node_azure toneAmber
class node_telemetry,node_insights toneMint
```

## Components

### API

- [HTTP endpoints](https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py): `app/main.py`
- [Status checks](https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py): `app/main.py`
- [Chat request validation](https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py): `app/main.py`

### Answer generation

- [Chat handler](https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py): `app/main.py`
- [Azure client setup](https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py): `app/main.py`
- **Azure OpenAI**

### Observability

- [Telemetry setup](https://github.com/agenticai-fde/llmops-customer-support/blob/main/app/main.py): `app/main.py`
- **Application Insights**

### Other components

- **Support user**

## Connections

- Support user → HTTP endpoints: sends requests (evidence: `README.md`)
- HTTP endpoints → Status checks: serves status (evidence: `app/main.py`)
- HTTP endpoints → Chat request validation: validates chat (evidence: `app/main.py`)
- HTTP endpoints → Chat handler: dispatches chat (evidence: `app/main.py`)
- Chat handler → Azure client setup: creates client (evidence: `app/main.py`)
- Azure client setup → Azure OpenAI: configures client (evidence: `app/main.py`)
- Chat handler → Azure OpenAI: requests completion (evidence: `app/main.py`)
- Azure OpenAI → Chat handler: returns answer and usage (evidence: `app/main.py`)
- Telemetry setup → Application Insights: configures export (evidence: `app/main.py`)
- Chat handler → Application Insights: reports request telemetry (evidence: `README.md`)
