# mesit-rathnayake/slt_soveregn_core architecture

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

- Interactive diagram: https://gitdiagram.com/mesit-rathnayake/slt_soveregn_core
- Repository: https://github.com/mesit-rathnayake/slt_soveregn_core

## Overview

SLTMobitel Assistant combines customer/product knowledge queries, NetOps incident triage, account and ticket workflows, and voice/MCP access. A typical assistant turn enters through a UI or API, is handled by the agent, and uses retrieval or diagnostic tools to produce a grounded response; the platform also provides role controls and audit logging. The graph includes documented capabilities whose implementation excerpts were not available. Evidence is limited to the README and sampled files/reference index, so uncertain runtime links are omitted.

Main entry points: [`poc-netops-assistant/src/agent/orchestrator.py`](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/orchestrator.py) (Conversation Orchestrator), [`poc-netops-assistant/frontend/src/App.jsx`](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/App.jsx) (Web Application), [`poc-netops-assistant/src/mcp/slt_mcp_server.py`](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/mcp/slt_mcp_server.py) (MCP Tools and Resources), [`poc-netops-assistant/src/retrieval/rag_engine.py`](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/rag_engine.py) (Dual Knowledge Retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_web_app["Web Application<br/>[App.jsx]"]
  node_chat_view["Chat View<br/>[ChatView.jsx]"]
  node_account_view["Account and Tickets"]
  node_officer_view["Officer Ticket Queue"]
  node_role_gate["Role Selection<br/>[RoleGate.jsx]"]
  node_markdown["Markdown Rendering<br/>[MarkdownText.jsx]"]
  node_streamlit["Streamlit Chat and Portal<br/>[app.py]"]
end

subgraph group_agent["Agent Controls"]
  node_agent_core["Conversation Orchestrator<br/>[orchestrator.py]"]
  node_guardrails["Guardrails and RAG Evaluation"]
  node_governance["RBAC and Audit<br/>[governance.py]"]
  node_llm["LLM Gateway<br/>[llm_gateway.py]"]
end

subgraph group_knowledge["Knowledge and Operations"]
  node_sanitizer["PII Sanitizer<br/>[sanitizer.py]"]
  node_rag["Dual Knowledge Retrieval<br/>[rag_engine.py]"]
  node_kb_client["Cloud KnowledgeBase Client<br/>[aws_kb_client.py]"]
  node_edge_gateway["CloudFront Gateway and Cache"]
  node_sop_store["Approved NetOps SOPs"]
  node_account_service["Customer Accounts and Tickets<br/>[account_service.py]"]
end

subgraph group_channels["Integration Channels"]
  node_lambda_api["Lambda REST and MCP<br/>[lambda_function.py]"]
  node_http_api["FastAPI Account API<br/>[server.py]"]
  node_security["API Security<br/>[security.py]"]
  node_mcp["MCP Tools and Resources<br/>[slt_mcp_server.py]"]
  node_voice["Voice and IVR Agent<br/>[voice_agent.py]"]
end

node_user(("Customer or Staff"))
node_kb_service["SLT KnowledgeBase API"]
node_cloud_services["Bedrock and Gemini"]
node_audit_log[("JSONL Audit Trail<br/>[audit_trail.jsonl]")]

node_user -->|"uses"| node_web_app
node_web_app -->|"selects role"| node_role_gate
node_web_app -->|"shows chat"| node_chat_view
node_web_app -->|"shows account"| node_account_view
node_web_app -->|"shows queue"| node_officer_view
node_chat_view -->|"renders responses"| node_markdown
node_account_view -->|"renders content"| node_markdown
node_user -->|"submits queries"| node_streamlit
node_streamlit -->|"handles turns"| node_agent_core
node_user -->|"requests endpoints"| node_lambda_api
node_lambda_api -->|"dispatches chat"| node_agent_core
node_user -.->|"uses account API"| node_http_api
node_http_api -->|"checks requests"| node_security
node_agent_core -->|"sanitizes input"| node_sanitizer
node_agent_core -->|"applies guardrails"| node_guardrails
node_agent_core -->|"dispatches tools"| node_mcp
node_agent_core -->|"retrieves answers"| node_rag
node_agent_core -->|"formats voice turns"| node_voice
node_agent_core -.->|"records governed turns"| node_governance
node_agent_core -.->|"uses language models"| node_llm
node_governance -->|"appends events"| node_audit_log
node_mcp -->|"calls sanitizer"| node_sanitizer
node_mcp -->|"calls retrieval"| node_rag
node_mcp -->|"creates tickets"| node_account_service
node_mcp -->|"formats IVR"| node_voice
node_rag -->|"queries cloud KB"| node_kb_client
node_rag -->|"retrieves SOP guidance"| node_sop_store
node_kb_client -->|"checks and caches"| node_edge_gateway
node_edge_gateway -->|"routes retrieval"| node_kb_service
node_kb_client -->|"requests chunks"| node_kb_service
node_llm -.->|"invokes models"| node_cloud_services
node_lambda_api -.->|"serves voice endpoint"| node_voice
node_http_api -->|"uses account gateway"| node_account_service

click node_web_app "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/App.jsx"
click node_chat_view "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/ChatView.jsx"
click node_account_view "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/AccountTicketsView.jsx"
click node_officer_view "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/TechnicalOfficerView.jsx"
click node_role_gate "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/RoleGate.jsx"
click node_markdown "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/MarkdownText.jsx"
click node_streamlit "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/app.py"
click node_lambda_api "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/lambda_function.py"
click node_http_api "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/server.py"
click node_security "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/security.py"
click node_agent_core "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/orchestrator.py"
click node_guardrails "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/guardrails_evals.py"
click node_governance "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/governance.py"
click node_llm "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/llm_gateway.py"
click node_sanitizer "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/ingestion/sanitizer.py"
click node_mcp "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/mcp/slt_mcp_server.py"
click node_rag "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/rag_engine.py"
click node_kb_client "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/aws_kb_client.py"
click node_edge_gateway "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/cloudfront_gateway.py"
click node_sop_store "https://github.com/mesit-rathnayake/slt_soveregn_core/tree/main/poc-netops-assistant/data/approved_manuals"
click node_account_service "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/account_service.py"
click node_voice "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/voice/voice_agent.py"
click node_audit_log "https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/data/audit_trail.jsonl"

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_web_app,node_chat_view,node_account_view,node_officer_view,node_role_gate,node_markdown,node_streamlit toneBlue
class node_agent_core,node_guardrails,node_governance,node_llm,node_audit_log toneAmber
class node_sanitizer,node_rag,node_kb_client,node_edge_gateway,node_sop_store,node_account_service,node_kb_service toneMint
class node_lambda_api,node_http_api,node_security,node_mcp,node_voice toneRose
class node_user,node_cloud_services toneIndigo
```

## Components

### User Interfaces

- [Web Application](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/App.jsx): `poc-netops-assistant/frontend/src/App.jsx`
- [Chat View](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/ChatView.jsx): `poc-netops-assistant/frontend/src/components/ChatView.jsx`
- [Account and Tickets](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/AccountTicketsView.jsx): `poc-netops-assistant/frontend/src/components/AccountTicketsView.jsx`
- [Officer Ticket Queue](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/TechnicalOfficerView.jsx): `poc-netops-assistant/frontend/src/components/TechnicalOfficerView.jsx`
- [Role Selection](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/RoleGate.jsx): `poc-netops-assistant/frontend/src/components/RoleGate.jsx`
- [Markdown Rendering](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/frontend/src/components/MarkdownText.jsx): `poc-netops-assistant/frontend/src/components/MarkdownText.jsx`
- [Streamlit Chat and Portal](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/app.py): `poc-netops-assistant/src/api/app.py`

### Agent Controls

- [Conversation Orchestrator](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/orchestrator.py): `poc-netops-assistant/src/agent/orchestrator.py`
- [Guardrails and RAG Evaluation](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/guardrails_evals.py): `poc-netops-assistant/src/agent/guardrails_evals.py`
- [RBAC and Audit](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/governance.py): `poc-netops-assistant/src/agent/governance.py`
- [LLM Gateway](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/agent/llm_gateway.py): `poc-netops-assistant/src/agent/llm_gateway.py`

### Knowledge and Operations

- [PII Sanitizer](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/ingestion/sanitizer.py): `poc-netops-assistant/src/ingestion/sanitizer.py`
- [Dual Knowledge Retrieval](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/rag_engine.py): `poc-netops-assistant/src/retrieval/rag_engine.py`
- [Cloud KnowledgeBase Client](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/aws_kb_client.py): `poc-netops-assistant/src/retrieval/aws_kb_client.py`
- [CloudFront Gateway and Cache](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/cloudfront_gateway.py): `poc-netops-assistant/src/retrieval/cloudfront_gateway.py`
- [Approved NetOps SOPs](https://github.com/mesit-rathnayake/slt_soveregn_core/tree/main/poc-netops-assistant/data/approved_manuals): `poc-netops-assistant/data/approved_manuals`
- [Customer Accounts and Tickets](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/retrieval/account_service.py): `poc-netops-assistant/src/retrieval/account_service.py`

### Integration Channels

- [Lambda REST and MCP](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/lambda_function.py): `poc-netops-assistant/src/api/lambda_function.py`
- [FastAPI Account API](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/server.py): `poc-netops-assistant/src/api/server.py`
- [API Security](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/api/security.py): `poc-netops-assistant/src/api/security.py`
- [MCP Tools and Resources](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/mcp/slt_mcp_server.py): `poc-netops-assistant/src/mcp/slt_mcp_server.py`
- [Voice and IVR Agent](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/src/voice/voice_agent.py): `poc-netops-assistant/src/voice/voice_agent.py`

### Other components

- **Customer or Staff**
- **SLT KnowledgeBase API**
- **Bedrock and Gemini**
- [JSONL Audit Trail](https://github.com/mesit-rathnayake/slt_soveregn_core/blob/main/poc-netops-assistant/data/audit_trail.jsonl): `poc-netops-assistant/data/audit_trail.jsonl`

## Connections

- Customer or Staff → Web Application: uses (evidence: `poc-netops-assistant/frontend/src/App.jsx`)
- Web Application → Role Selection: selects role (evidence: `poc-netops-assistant/frontend/src/App.jsx`)
- Web Application → Chat View: shows chat (evidence: `poc-netops-assistant/frontend/src/App.jsx`)
- Web Application → Account and Tickets: shows account (evidence: `poc-netops-assistant/frontend/src/App.jsx`)
- Web Application → Officer Ticket Queue: shows queue (evidence: `poc-netops-assistant/frontend/src/App.jsx`)
- Chat View → Markdown Rendering: renders responses (evidence: `poc-netops-assistant/frontend/src/components/ChatView.jsx`)
- Account and Tickets → Markdown Rendering: renders content (evidence: `poc-netops-assistant/frontend/src/components/AccountTicketsView.jsx`)
- Customer or Staff → Streamlit Chat and Portal: submits queries (evidence: `README.md`)
- Streamlit Chat and Portal → Conversation Orchestrator: handles turns (evidence: `poc-netops-assistant/src/api/app.py`)
- Customer or Staff → Lambda REST and MCP: requests endpoints (evidence: `README.md`)
- Lambda REST and MCP → Conversation Orchestrator: dispatches chat (evidence: `poc-netops-assistant/src/api/lambda_function.py`)
- Customer or Staff → FastAPI Account API: uses account API (evidence: `README.md`)
- FastAPI Account API → API Security: checks requests (evidence: `poc-netops-assistant/src/api/server.py`)
- Conversation Orchestrator → PII Sanitizer: sanitizes input (evidence: `poc-netops-assistant/src/agent/orchestrator.py`)
- Conversation Orchestrator → Guardrails and RAG Evaluation: applies guardrails (evidence: `poc-netops-assistant/src/agent/orchestrator.py`)
- Conversation Orchestrator → MCP Tools and Resources: dispatches tools (evidence: `README.md`)
- Conversation Orchestrator → Dual Knowledge Retrieval: retrieves answers (evidence: `poc-netops-assistant/src/agent/orchestrator.py`)
- Conversation Orchestrator → Voice and IVR Agent: formats voice turns (evidence: `poc-netops-assistant/src/agent/orchestrator.py`)
- Conversation Orchestrator → RBAC and Audit: records governed turns (evidence: `README.md`)
- Conversation Orchestrator → LLM Gateway: uses language models (evidence: `README.md`)
- RBAC and Audit → JSONL Audit Trail: appends events (evidence: `poc-netops-assistant/src/agent/governance.py`)
- MCP Tools and Resources → PII Sanitizer: calls sanitizer (evidence: `poc-netops-assistant/src/mcp/slt_mcp_server.py`)
- MCP Tools and Resources → Dual Knowledge Retrieval: calls retrieval (evidence: `poc-netops-assistant/src/mcp/slt_mcp_server.py`)
- MCP Tools and Resources → Customer Accounts and Tickets: creates tickets (evidence: `poc-netops-assistant/src/mcp/slt_mcp_server.py`)
- MCP Tools and Resources → Voice and IVR Agent: formats IVR (evidence: `README.md`)
- Dual Knowledge Retrieval → Cloud KnowledgeBase Client: queries cloud KB (evidence: `README.md`)
- Dual Knowledge Retrieval → Approved NetOps SOPs: retrieves SOP guidance (evidence: `README.md`)
- Cloud KnowledgeBase Client → CloudFront Gateway and Cache: checks and caches (evidence: `poc-netops-assistant/src/retrieval/aws_kb_client.py`)
- CloudFront Gateway and Cache → SLT KnowledgeBase API: routes retrieval (evidence: `README.md`)
- Cloud KnowledgeBase Client → SLT KnowledgeBase API: requests chunks (evidence: `README.md`)
- LLM Gateway → Bedrock and Gemini: invokes models (evidence: `README.md`)
- Lambda REST and MCP → Voice and IVR Agent: serves voice endpoint (evidence: `README.md`)
- FastAPI Account API → Customer Accounts and Tickets: uses account gateway (evidence: `poc-netops-assistant/src/api/server.py`)
