How gokul-hawk/email_tickets works
This repository implements an AI customer-support email assistant, with a LangGraph workflow for handling customer requests and a separate evaluation framework. The main path accepts an email, detects intents, checks identity, routes relevant actions, and drafts a reply; the live inbox listener can supply emails asynchronously. The README also documents ticketing, plan management, general Q&A, MongoDB storage, and evaluation. Some of those implementation details are not present in the excerpts, so those links rely on README documentation rather than inspected source.
Main entry points: main.py Response Generator · evaluation_system.py Workflow Evaluator · inbox_listener.py IMAP Inbox Listener · data.json Evaluation Dataset
Components 16
Email Intake
- IMAP Inbox Listener
inbox_listener.py - Email Processing Queue
main.py
Support Workflow
- Support Agent Entry
main.py - Intent Router
main.py - Identity Gate
main.py - Response Generator
main.py - MongoDB
Business Actions
- Refund Processor
main.py - Issue Resolver
main.py - Plan Manager
main.py - General Assistant
main.py
Evaluation
- Workflow Evaluator
evaluation_system.py - Evaluation Dataset
data.json - Static Report Generator
ev.py
Other components
- Customer
- Groq LLM
Connections 23
- Customer → IMAP Inbox Listener: sends email
readme.md - IMAP Inbox Listener → Email Processing Queue: queues payload
inbox_listener.py - Email Processing Queue → Support Agent Entry: processes email
main.py - Customer → Support Agent Entry: submits request
readme.md - Support Agent Entry → Intent Router: starts workflow
main.py - Intent Router → Identity Gate: routes intents
main.py - Intent Router → General Assistant: routes general
main.py - Identity Gate → Refund Processor: routes refund
readme.md - Identity Gate → Issue Resolver: routes issue
readme.md - Identity Gate → Plan Manager: routes plan
readme.md - Refund Processor → Groq LLM: checks policy
readme.md - Plan Manager → Groq LLM: recommends tier
readme.md - General Assistant → Groq LLM: answers questions
readme.md - Response Generator → Groq LLM: generates reply
readme.md - Refund Processor → Response Generator: provides action
readme.md - Issue Resolver → Response Generator: provides ticket
readme.md - Plan Manager → Response Generator: provides plan
readme.md - General Assistant → Response Generator: provides answer
readme.md - Response Generator → MongoDB: stores result
readme.md - Workflow Evaluator → Support Agent Entry: invokes workflow
evaluation_system.py - Workflow Evaluator → Evaluation Dataset: loads cases
evaluation_system.py - Workflow Evaluator → Groq LLM: judges output
evaluation_system.py - Static Report Generator → Evaluation Dataset: summarizes scores