https://github.com/alimusawir/support-ticket-agent
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.4%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: AliMusawir
- Language: Python
- Default Branch: main
- Size: 36.1 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
🛠️ Support Ticket Resolution Agent with Multi-Step Review Loop
This project is an AI-powered support ticket agent built with LangGraph, Azure OpenAI, and FAISS + Hugging Face Transformers for context-aware ticket resolution. It classifies, drafts, reviews, and escalates support tickets through a multi-step reasoning loop using LangGraph’s dynamic state machine.
🚀 Features
- Ticket Classification: Categorizes incoming support tickets using an LLM.
- Context Retrieval: Uses FAISS + Hugging Face embeddings to retrieve relevant support knowledge.
- LLM Drafting: Automatically drafts a response using Azure OpenAI based on category and context.
- Review & Feedback Loop: Simulates a quality reviewer that can approve or reject drafts with feedback.
- Escalation Path: If a draft is rejected more than twice, the ticket is escalated and logged.
📁 Project Structure
.
├── main.py # Graph definition and execution
├── nodes/
│ ├── classify_node.py # Classifies ticket category
│ ├── retrieve_node.py # Retrieves relevant context using FAISS
│ ├── draft_node.py # Drafts response using LLM
│ ├── review_node.py # Simulates LLM review of draft
│ └── escalate_node.py # Escalates and logs tickets after 2 failed reviews
├── utils/
│ └── rag_utils.py # FAISS setup with HuggingFace embeddings
├── .env # Azure OpenAI credentials
├── escalation_log.csv # Log of escalated tickets
└── README.md
🧠 Technologies Used
- 🧩 LangGraph: To model the reasoning flow between nodes.
- 🤖 Azure OpenAI: For classification, drafting, and review.
- 🔍 FAISS + Hugging Face: For semantic search using
all-MiniLM-L6-v2. - 🧪 LangChain: For LLM chaining and prompt management.
⚙️ Setup
- Clone this repo:
bash
git clone https://github.com/your-org/support-ticket-agent.git
cd support-ticket-agent
- Create and activate Python 3.10 virtual environment:
bash
py -3.10 -m venv venv
venv\Scripts\activate # Windows
- Install dependencies:
bash
pip install -r requirements.txt
- Add your
.envfile:
OPENAI_API_KEY=
OPENAI_API_BASE=
OPENAI_API_VERSION=
OPENAI_API_TYPE=
OPENAI_DEPLOYMENT_NAME=
- Run the app:
bash
python main.py
🧪 Example
python
ticket = {
"subject": "Charged twice for subscription",
"description": "I was billed twice this month for the same plan."
}
Depending on review outcomes, the agent will loop through retrieve → draft → review. If rejected twice, it logs the issue via escalate_node.
📌 Notes
- FAISS is initialized once in
rag_utils.pyusing Hugging Face sentence transformers. - You can expand the knowledge base by editing the
docs_by_categorydictionary. - Escalated tickets are saved to
escalation_log.csv.
Owner
- Name: Musafar Ali Soomro
- Login: AliMusawir
- Kind: user
- Repositories: 1
- Profile: https://github.com/AliMusawir
Student at Sukkur IBA University
GitHub Events
Total
- Member event: 1
- Push event: 3
- Fork event: 1
- Create event: 3
Last Year
- Member event: 1
- Push event: 3
- Fork event: 1
- Create event: 3
Dependencies
- langchain *
- langchain-community *
- langchain-openai *
- langgraph *
- openai *
- python-dotenv *