# mohithkumar3413/nexus-ai-customer-support-agent architecture

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

- Interactive diagram: https://gitdiagram.com/mohithkumar3413/nexus-ai-customer-support-agent
- Repository: https://github.com/mohithkumar3413/nexus-ai-customer-support-agent

## Overview

Nexus AI is a Streamlit customer-support interface alongside a separate Gemini ticket-triage agent and SQLite customer/order lookup. The visible app excerpts support semantic answer matching with confidence, chat-history CSV export, and BLEU evaluation; the agent enriches ticket prompts with customer data before requesting a Gemini response. The excerpts do not establish that the Streamlit app invokes the agent or persists conversations, so those links are not shown.

Main entry points: [`app.py`](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py) (Streamlit interface), [`agent.py`](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/agent.py) (Ticket processing), [`database.py`](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/database.py) (SQLite customer data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Support interface"]
  node_streamlit["Streamlit interface<br/>[app.py]"]
end

subgraph group_chat["Chat capabilities"]
  node_answer_match["Semantic answer matching<br/>[app.py]"]
  node_chat_history["Session chat history<br/>[app.py]"]
  node_confidence["Confidence scoring<br/>[app.py]"]
  node_csv_export["CSV report export<br/>[app.py]"]
  node_bleu["BLEU evaluation<br/>[app.py]"]
end

subgraph group_triage["Ticket triage"]
  node_ticket_agent["Ticket processing<br/>[agent.py]"]
  node_gemini{{"Gemini model"}}
end

subgraph group_data["Customer data"]
  node_sqlite[("SQLite customer data<br/>[database.py]")]
end

node_user(("Support user"))

node_user -->|"sends messages"| node_streamlit
node_streamlit -->|"matches queries"| node_answer_match
node_answer_match -->|"returns score"| node_confidence
node_streamlit -->|"tracks session"| node_chat_history
node_chat_history -->|"exports history"| node_csv_export
node_streamlit -->|"runs evaluation"| node_bleu
node_ticket_agent -->|"looks up customer"| node_sqlite
node_ticket_agent -->|"generates response"| node_gemini

click node_streamlit "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py"
click node_answer_match "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py"
click node_chat_history "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py"
click node_confidence "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py"
click node_csv_export "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py"
click node_bleu "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py"
click node_ticket_agent "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/agent.py"
click node_sqlite "https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/database.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_streamlit,node_user toneBlue
class node_answer_match,node_chat_history,node_confidence,node_csv_export,node_bleu toneAmber
class node_ticket_agent,node_gemini toneMint
class node_sqlite toneRose
```

## Components

### Support interface

- [Streamlit interface](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py): `app.py`

### Chat capabilities

- [Semantic answer matching](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py): `app.py`
- [Session chat history](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py): `app.py`
- [Confidence scoring](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py): `app.py`
- [CSV report export](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py): `app.py`
- [BLEU evaluation](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/app.py): `app.py`

### Ticket triage

- [Ticket processing](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/agent.py): `agent.py`
- **Gemini model**

### Customer data

- [SQLite customer data](https://github.com/mohithkumar3413/nexus-ai-customer-support-agent/blob/main/database.py): `database.py`

### Other components

- **Support user**

## Connections

- Support user → Streamlit interface: sends messages (evidence: `README.md`)
- Streamlit interface → Semantic answer matching: matches queries (evidence: `app.py`)
- Semantic answer matching → Confidence scoring: returns score (evidence: `app.py`)
- Streamlit interface → Session chat history: tracks session (evidence: `app.py`)
- Session chat history → CSV report export: exports history (evidence: `app.py`)
- Streamlit interface → BLEU evaluation: runs evaluation (evidence: `app.py`)
- Ticket processing → SQLite customer data: looks up customer (evidence: `agent.py`)
- Ticket processing → Gemini model: generates response (evidence: `agent.py`)
