# chittaranjanp51/enterprise-it-support-agentic-rag-copilot architecture

> Architecture diagram of the GitHub repository chittaranjanp51/enterprise-it-support-agentic-rag-copilot, 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/chittaranjanp51/enterprise-it-support-agentic-rag-copilot
- Repository: https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot

## Overview

This is an enterprise IT support copilot: users submit questions through the chat API and receive a direct, knowledge-base, web-grounded, or explicitly unverified fallback answer, with source and trace metadata. Its main runtime is a LangGraph workflow that routes and grades evidence before choosing an answer path. A separate ingestion workflow loads policy files, chunks and embeds them, and writes them to Pinecone. The graph wiring and service calls are excerpted; web UI behavior and other unsampled details are not inferred.

Main entry points: [`app/services.py`](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py) (LLM provider), [`app/graph.py`](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py) (Question router), [`app/ingest.py`](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/ingest.py) (Document ingestion), [`app/config.py`](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/config.py) (Runtime settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Chat API"]
  node_chat_api["Chat endpoint<br/>[main.py]"]
  node_response["Answer metadata<br/>[main.py]"]
end

subgraph group_agent["Answer Workflow"]
  node_workflow["LangGraph workflow<br/>[graph.py]"]
  node_router["Question router<br/>[graph.py]"]
  node_direct["Direct answer<br/>[graph.py]"]
  node_kb_retrieval["KB retrieval<br/>[graph.py]"]
  node_kb_grading["KB evidence grading<br/>[graph.py]"]
  node_kb_answer["KB answer<br/>[graph.py]"]
  node_web_search["Web search<br/>[graph.py]"]
  node_web_grading["Web evidence grading<br/>[graph.py]"]
  node_web_answer["Web answer<br/>[graph.py]"]
  node_fallback["Fallback answer<br/>[graph.py]"]
end

subgraph group_knowledge["Knowledge Ingestion"]
  node_source_files["Policy files"]
  node_ingest["Document ingestion<br/>[ingest.py]"]
  node_chunking["Text chunking<br/>[ingest.py]"]
end

subgraph group_services["External Services"]
  node_llm["LLM provider<br/>[services.py]"]
  node_embedder["Text embeddings<br/>[services.py]"]
  node_pinecone[("Pinecone index<br/>[services.py]")]
  node_tavily["Tavily search<br/>[services.py]"]
  node_settings["Runtime settings<br/>[config.py]"]
end

node_user(("Questioner"))

node_user -->|"submits question"| node_chat_api
node_chat_api -->|"invokes"| node_workflow
node_workflow -->|"returns answer"| node_response
node_workflow -->|"dispatches"| node_router
node_router -->|"routes direct"| node_direct
node_router -->|"routes lookup"| node_kb_retrieval
node_kb_retrieval -->|"passes matches"| node_kb_grading
node_kb_grading -->|"accepts evidence"| node_kb_answer
node_kb_grading -->|"rejects evidence"| node_web_search
node_web_search -->|"passes results"| node_web_grading
node_web_grading -->|"accepts evidence"| node_web_answer
node_web_grading -->|"rejects evidence"| node_fallback
node_router -->|"asks"| node_llm
node_direct -->|"asks"| node_llm
node_kb_grading -->|"grades with"| node_llm
node_kb_answer -->|"generates with"| node_llm
node_web_search -->|"searches"| node_tavily
node_web_grading -->|"grades with"| node_llm
node_web_answer -->|"generates with"| node_llm
node_fallback -->|"generates with"| node_llm
node_kb_retrieval -->|"embeds query"| node_embedder
node_kb_retrieval -->|"queries"| node_pinecone
node_source_files -->|"loads files"| node_ingest
node_ingest -->|"splits text"| node_chunking
node_ingest -->|"embeds chunks"| node_embedder
node_ingest -->|"upserts vectors"| node_pinecone
node_llm -->|"reads provider config"| node_settings
node_embedder -->|"reads model config"| node_settings
node_pinecone -->|"reads index config"| node_settings

click node_chat_api "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/main.py"
click node_response "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/main.py"
click node_workflow "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_router "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_direct "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_kb_retrieval "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_kb_grading "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_kb_answer "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_web_search "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_web_grading "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_web_answer "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_fallback "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py"
click node_source_files "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/tree/main/data/kb"
click node_ingest "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/ingest.py"
click node_chunking "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/ingest.py"
click node_llm "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py"
click node_embedder "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py"
click node_pinecone "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py"
click node_tavily "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py"
click node_settings "https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/config.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_chat_api,node_response toneBlue
class node_workflow,node_router,node_direct,node_kb_retrieval,node_kb_grading,node_kb_answer,node_web_search,node_web_grading,node_web_answer,node_fallback toneAmber
class node_source_files,node_ingest,node_chunking toneMint
class node_llm,node_embedder,node_pinecone,node_tavily,node_settings toneRose
class node_user toneIndigo
```

## Components

### Chat API

- [Chat endpoint](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/main.py): `app/main.py`
- [Answer metadata](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/main.py): `app/main.py`

### Answer Workflow

- [LangGraph workflow](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [Question router](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [Direct answer](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [KB retrieval](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [KB evidence grading](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [KB answer](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [Web search](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [Web evidence grading](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [Web answer](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`
- [Fallback answer](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/graph.py): `app/graph.py`

### Knowledge Ingestion

- [Policy files](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/tree/main/data/kb): `data/kb`
- [Document ingestion](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/ingest.py): `app/ingest.py`
- [Text chunking](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/ingest.py): `app/ingest.py`

### External Services

- [LLM provider](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py): `app/services.py`
- [Text embeddings](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py): `app/services.py`
- [Pinecone index](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py): `app/services.py`
- [Tavily search](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/services.py): `app/services.py`
- [Runtime settings](https://github.com/chittaranjanp51/enterprise-it-support-agentic-rag-copilot/blob/main/app/config.py): `app/config.py`

### Other components

- **Questioner**

## Connections

- Questioner → Chat endpoint: submits question (evidence: `README.md`)
- Chat endpoint → LangGraph workflow: invokes (evidence: `app/main.py`)
- LangGraph workflow → Answer metadata: returns answer (evidence: `app/main.py`)
- LangGraph workflow → Question router: dispatches (evidence: `app/graph.py`)
- Question router → Direct answer: routes direct (evidence: `app/graph.py`)
- Question router → KB retrieval: routes lookup (evidence: `app/graph.py`)
- KB retrieval → KB evidence grading: passes matches (evidence: `app/graph.py`)
- KB evidence grading → KB answer: accepts evidence (evidence: `app/graph.py`)
- KB evidence grading → Web search: rejects evidence (evidence: `app/graph.py`)
- Web search → Web evidence grading: passes results (evidence: `app/graph.py`)
- Web evidence grading → Web answer: accepts evidence (evidence: `app/graph.py`)
- Web evidence grading → Fallback answer: rejects evidence (evidence: `app/graph.py`)
- Question router → LLM provider: asks (evidence: `app/graph.py`)
- Direct answer → LLM provider: asks (evidence: `app/graph.py`)
- KB evidence grading → LLM provider: grades with (evidence: `app/graph.py`)
- KB answer → LLM provider: generates with (evidence: `app/graph.py`)
- Web search → Tavily search: searches (evidence: `app/graph.py`)
- Web evidence grading → LLM provider: grades with (evidence: `app/graph.py`)
- Web answer → LLM provider: generates with (evidence: `app/graph.py`)
- Fallback answer → LLM provider: generates with (evidence: `app/graph.py`)
- KB retrieval → Text embeddings: embeds query (evidence: `app/graph.py`)
- KB retrieval → Pinecone index: queries (evidence: `app/graph.py`)
- Policy files → Document ingestion: loads files (evidence: `README.md`)
- Document ingestion → Text chunking: splits text (evidence: `app/ingest.py`)
- Document ingestion → Text embeddings: embeds chunks (evidence: `app/ingest.py`)
- Document ingestion → Pinecone index: upserts vectors (evidence: `app/ingest.py`)
- LLM provider → Runtime settings: reads provider config (evidence: `app/services.py`)
- Text embeddings → Runtime settings: reads model config (evidence: `app/services.py`)
- Pinecone index → Runtime settings: reads index config (evidence: `app/services.py`)
