# murari123-byte/ai-powered-customer-support-agentic-tickecting-system architecture

> Architecture diagram of the GitHub repository murari123-byte/ai-powered-customer-support-agentic-tickecting-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system
- Repository: https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system

## Overview

This is a customer-support ticketing application with a React interface, FastAPI backend, PostgreSQL state, and asynchronous AI work through Celery and local Ollama. The main workflow is ticket creation, background classification and routing, staff handling with knowledge-backed suggestions or agent tools, and human-controlled resolution or escalation. The graph also shows authentication, document ingestion and search, administration, SLA jobs, and evaluation tooling. Some subsystem links come from README descriptions or source-index references; unsampled route and worker details are not expanded beyond that evidence.

Main entry points: [`backend/app/workers/tasks.py`](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/workers/tasks.py) (Celery tasks), [`backend/app/api/routes`](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/backend/app/api/routes) (API routes), [`backend/app/services/triage_service.py`](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/triage_service.py) (Ticket triage), [`backend/app/services/ticket_service.py`](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/ticket_service.py) (Ticket workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web interface"]
  node_react["React application<br/>[App.tsx]"]
  node_pages["Ticket and admin pages"]
  node_authui["Session context<br/>[AuthContext.tsx]"]
  node_client["API client<br/>[client.ts]"]
  node_endpoints["API endpoints<br/>[endpoints.ts]"]
end

subgraph group_api["API and support domain"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_routes["API routes"]
  node_auth["Authentication service<br/>[auth_service.py]"]
  node_tickets["Ticket workflow<br/>[ticket_service.py]"]
  node_triage["Ticket triage<br/>[triage_service.py]"]
  node_teams["Team and user services<br/>[team_service.py]"]
end

subgraph group_ai["AI and knowledge"]
  node_knowledge["Knowledge service"]
  node_documents["Document processing"]
  node_rag["Retrieval and answers<br/>[rag.py]"]
  node_classifier["Ticket classifier<br/>[classifier.py]"]
  node_agent["AI ticket agent<br/>[agent_service.py]"]
  node_tools["Agent tools<br/>[agent_tools.py]"]
  node_ai_service["AI service<br/>[service.py]"]
  node_provider["Ollama provider"]
end

subgraph group_runtime["Persistence and jobs"]
  node_database[("PostgreSQL and pgvector")]
  node_worker["Celery tasks<br/>[tasks.py]"]
  node_sla["SLA escalation<br/>[sla_service.py]"]
  node_redis["Redis queue"]
end

subgraph group_ops["Evaluation"]
  node_evals["AI evaluations"]
end

node_customer(("Customer"))
node_staff(("Support staff"))
node_browser(("Browser"))

node_customer -->|"uses"| node_browser
node_staff -->|"uses"| node_browser
node_browser -->|"loads"| node_react
node_react -->|"renders"| node_pages
node_pages -->|"reads session"| node_authui
node_authui -->|"calls"| node_endpoints
node_pages -->|"calls"| node_endpoints
node_endpoints -->|"uses"| node_client
node_client -->|"sends requests"| node_fastapi
node_fastapi -->|"registers"| node_routes
node_routes -->|"delegates"| node_auth
node_routes -.->|"dispatches"| node_tickets
node_routes -.->|"dispatches"| node_knowledge
node_routes -.->|"dispatches"| node_teams
node_auth -->|"reads and writes"| node_database
node_tickets -->|"reads and writes"| node_database
node_tickets -->|"queues AI work"| node_triage
node_triage -->|"classifies"| node_classifier
node_triage -->|"retrieves context"| node_rag
node_triage -->|"applies decisions"| node_tickets
node_knowledge -->|"processes uploads"| node_documents
node_knowledge -->|"stores documents"| node_database
node_rag -->|"searches articles"| node_knowledge
node_classifier -->|"requests output"| node_ai_service
node_rag -->|"requests answers"| node_ai_service
node_agent -->|"requests tool calls"| node_ai_service
node_agent -->|"dispatches tools"| node_tools
node_agent -->|"checks and changes tickets"| node_tickets
node_ai_service -.->|"calls model"| node_provider
node_provider -.->|"embeds for search"| node_database
node_worker -->|"runs"| node_triage
node_worker -->|"runs"| node_agent
node_worker -->|"runs processing"| node_knowledge
node_worker -.->|"runs checks"| node_sla
node_worker -->|"consumes jobs"| node_redis
node_redis -->|"dispatches jobs"| node_worker
node_worker -->|"uses local AI"| node_provider
node_evals -->|"evaluates"| node_classifier
node_evals -->|"uses"| node_ai_service

click node_react "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/App.tsx"
click node_pages "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/frontend/src/pages"
click node_authui "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/auth/AuthContext.tsx"
click node_client "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/api/client.ts"
click node_endpoints "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/api/endpoints.ts"
click node_fastapi "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/main.py"
click node_routes "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/backend/app/api/routes"
click node_auth "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/auth_service.py"
click node_tickets "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/ticket_service.py"
click node_triage "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/triage_service.py"
click node_teams "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/team_service.py"
click node_knowledge "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/knowledge_service.py"
click node_documents "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/document_processing.py"
click node_rag "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/ai/rag.py"
click node_classifier "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/ai/classifier.py"
click node_agent "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/agent_service.py"
click node_tools "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/agent_tools.py"
click node_ai_service "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/ai/service.py"
click node_provider "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/backend/app/ai/providers"
click node_database "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/backend/app/models"
click node_worker "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/workers/tasks.py"
click node_sla "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/sla_service.py"
click node_evals "https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/evals/run_classification.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_react,node_pages,node_authui,node_client,node_endpoints,node_browser toneBlue
class node_fastapi,node_routes,node_auth,node_tickets,node_triage,node_teams toneAmber
class node_knowledge,node_documents,node_rag,node_classifier,node_agent,node_tools,node_ai_service,node_provider toneMint
class node_database,node_worker,node_sla,node_redis toneRose
class node_evals,node_customer,node_staff toneIndigo
```

## Components

### Web interface

- [React application](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Ticket and admin pages](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/frontend/src/pages): `frontend/src/pages`
- [Session context](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/auth/AuthContext.tsx): `frontend/src/auth/AuthContext.tsx`
- [API client](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [API endpoints](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/frontend/src/api/endpoints.ts): `frontend/src/api/endpoints.ts`

### API and support domain

- [FastAPI application](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/main.py): `backend/app/main.py`
- [API routes](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/backend/app/api/routes): `backend/app/api/routes`
- [Authentication service](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Ticket workflow](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/ticket_service.py): `backend/app/services/ticket_service.py`
- [Ticket triage](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/triage_service.py): `backend/app/services/triage_service.py`
- [Team and user services](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/team_service.py): `backend/app/services/team_service.py`

### AI and knowledge

- [Knowledge service](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/knowledge_service.py): `backend/app/services/knowledge_service.py`
- [Document processing](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/document_processing.py): `backend/app/services/document_processing.py`
- [Retrieval and answers](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/ai/rag.py): `backend/app/ai/rag.py`
- [Ticket classifier](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/ai/classifier.py): `backend/app/ai/classifier.py`
- [AI ticket agent](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/agent_service.py): `backend/app/services/agent_service.py`
- [Agent tools](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/agent_tools.py): `backend/app/services/agent_tools.py`
- [AI service](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/ai/service.py): `backend/app/ai/service.py`
- [Ollama provider](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/backend/app/ai/providers): `backend/app/ai/providers`

### Persistence and jobs

- [PostgreSQL and pgvector](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/tree/main/backend/app/models): `backend/app/models`
- [Celery tasks](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/workers/tasks.py): `backend/app/workers/tasks.py`
- [SLA escalation](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/app/services/sla_service.py): `backend/app/services/sla_service.py`
- **Redis queue**

### Evaluation

- [AI evaluations](https://github.com/murari123-byte/ai-powered-customer-support-agentic-tickecting-system/blob/main/backend/evals/run_classification.py): `backend/evals/run_classification.py`

### Other components

- **Customer**
- **Support staff**
- **Browser**

## Connections

- Customer → Browser: uses (evidence: `README.md`)
- Support staff → Browser: uses (evidence: `README.md`)
- Browser → React application: loads (evidence: `README.md`)
- React application → Ticket and admin pages: renders (evidence: `frontend/src/App.tsx`)
- Ticket and admin pages → Session context: reads session (evidence: `frontend/src/pages/TicketsPage.tsx`)
- Session context → API endpoints: calls (evidence: `frontend/src/auth/AuthContext.tsx`)
- Ticket and admin pages → API endpoints: calls (evidence: `frontend/src/pages/TicketDetailPage.tsx`)
- API endpoints → API client: uses (evidence: `frontend/src/api/endpoints.ts`)
- API client → FastAPI application: sends requests (evidence: `README.md`)
- FastAPI application → API routes: registers (evidence: `backend/app/main.py`)
- API routes → Authentication service: delegates (evidence: `backend/app/api/routes/auth.py`)
- API routes → Ticket workflow: dispatches
- API routes → Knowledge service: dispatches
- API routes → Team and user services: dispatches
- Authentication service → PostgreSQL and pgvector: reads and writes (evidence: `backend/app/services/auth_service.py`)
- Ticket workflow → PostgreSQL and pgvector: reads and writes (evidence: `backend/app/services/ticket_service.py`)
- Ticket workflow → Ticket triage: queues AI work (evidence: `README.md`)
- Ticket triage → Ticket classifier: classifies (evidence: `backend/app/services/triage_service.py`)
- Ticket triage → Retrieval and answers: retrieves context (evidence: `backend/app/services/triage_service.py`)
- Ticket triage → Ticket workflow: applies decisions (evidence: `backend/app/services/triage_service.py`)
- Knowledge service → Document processing: processes uploads (evidence: `backend/app/services/knowledge_service.py`)
- Knowledge service → PostgreSQL and pgvector: stores documents (evidence: `backend/app/services/knowledge_service.py`)
- Retrieval and answers → Knowledge service: searches articles (evidence: `backend/app/ai/rag.py`)
- Ticket classifier → AI service: requests output (evidence: `backend/app/ai/classifier.py`)
- Retrieval and answers → AI service: requests answers (evidence: `backend/app/ai/rag.py`)
- AI ticket agent → AI service: requests tool calls (evidence: `backend/app/services/agent_service.py`)
- AI ticket agent → Agent tools: dispatches tools (evidence: `backend/app/services/agent_service.py`)
- AI ticket agent → Ticket workflow: checks and changes tickets (evidence: `backend/app/services/agent_service.py`)
- AI service → Ollama provider: calls model (evidence: `backend/app/ai/service.py`)
- Ollama provider → PostgreSQL and pgvector: embeds for search
- Celery tasks → Ticket triage: runs (evidence: `backend/app/workers/tasks.py`)
- Celery tasks → AI ticket agent: runs (evidence: `backend/app/workers/tasks.py`)
- Celery tasks → Knowledge service: runs processing (evidence: `backend/app/workers/tasks.py`)
- Celery tasks → SLA escalation: runs checks (evidence: `backend/app/workers/tasks.py`)
- Celery tasks → Redis queue: consumes jobs (evidence: `README.md`)
- Redis queue → Celery tasks: dispatches jobs (evidence: `README.md`)
- Celery tasks → Ollama provider: uses local AI (evidence: `README.md`)
- AI evaluations → Ticket classifier: evaluates (evidence: `backend/evals/run_classification.py`)
- AI evaluations → AI service: uses (evidence: `backend/evals/run_classification.py`)
