InspirationHere is the complete project story formatted for Devpost and GitHub submission:InspirationIT support teams spend hundreds of hours every month answering the exact same routine questions: password resets, VPN setups, printer configurations, and standard software troubleshooting. While these requests are simple, they flood helpdesk queues and force critical L2 and L3 incidents to wait in line.Existing IT automated tools usually fall into two frustrating extremes:Dumb chatbots that send unhelpful links and annoy users.Unconstrained LLM wrappers that hallucinate fixes or bypass internal security protocols.We were inspired to build TicketDesk as a middle ground: a safe, autonomous IT support engine that acts like a disciplined junior engineer. It reads internal runbooks, makes deterministic routing decisions based on strict corporate policies, auto-resolves low-risk issues, and seamlessly defers to human experts whenever confidence is low. Best of all, we wanted it to run 100% locally on standard laptops without requiring expensive cloud APIs.What it doesTicketDesk is an autonomous IT ticketing and triage platform built around a human-in-the-loop workflow.Automated Triage & Routing: Ingests incoming tickets, classifies their priority level (L1, L2, L3), and assigns safe categories.Knowledge Retrieval: Searches official Markdown runbooks using BM25 keyword search to ensure every response is grounded in real company documentation.Smart Policy Engine: Automatically resolves low-risk, high-confidence L1 tickets (e.g., password or MFA resets) without human intervention. Escalates L2/L3 tickets directly to specialized engineering teams with a contextual diagnosis note.Human-in-the-Loop Gate: If the model's confidence drops below threshold ($C < 0.8$) or touches sensitive areas, execution pauses. The ticket appears on a real-time web dashboard where an IT agent can review, edit, redraft, or approve the response with one click.Flexible Execution ("Dual Brain"): Runs entirely offline using a free local model (gemma3:4b via Ollama), connects to high-tier cloud models (Claude 3.5 Sonnet), or blends both to optimize speed and cost.How we built itTicketDesk is designed as an event-driven, graph-based engine using LangGraph and Python:State Machine (graph.py): We mapped the entire lifecycle into an 11-node state graph:$$\text{Intake} \longrightarrow \text{Triage} \longrightarrow \text{Retrieve (Runbooks)} \longrightarrow \text{Solve} \longrightarrow \text{Draft} \longrightarrow \text{Gate}$$Policy Enforcement (policy.py): Enforces hard category level floors. A model can escalate an issue (e.g., recognizing an MFA reset ticket is actually an active breach), but it can never lower a ticket's classification below its category floor.Local & Hybrid Models (models.py): Built a unified abstraction layer supporting Ollama (gemma3:4b) and Anthropic Claude APIs. If an API times out or fails, the graph seamlessly falls back to a zero-network keyword engine (fake:rules).Interactive Dashboard (app.py & ui/): Utilized LangGraph's native interrupt() pattern and SQLite persistence to handle asynchronous human approvals through an HTML/JS frontend without blocking background workers.Integrations (adapters/): Built modular connectors to simulate tickets locally via JSON or plug directly into enterprise platforms like Freshservice, Zendesk, or ServiceNow.Challenges we ran intoGating Probabilistic Models with Deterministic Rules:Language models often express high confidence even when wrong. Standardizing a safe gate required combining self-reported confidence $C \in [0, 1]$ with hardcoded policy lists:$$\text{AutoReply} = \big( \text{Category} \in \text{SafeList} \big) \land (L = \text{L1}) \land (C \ge C_{\text{min}})$$If $\text{AutoReply}$ evaluates to False, execution halts immediately for human review.Managing Interrupts and State Persistence:Pausing a graph mid-execution to wait for a human to review or edit a draft required careful state management. Using SQLite checkpoints in LangGraph allowed us to pause, store the exact state, and resume execution instantly when the user interacted with the UI.Designing Zero-Downtime Fallbacks:Network calls to cloud APIs or local model crashes shouldn't bring down an entire IT queue. Building the deterministic fake:rules safety net ensured that every ticket gets triaged and resolved even if LLM services completely fail.Accomplishments that we're proud ofTrue Privacy-First AI: Built a solution that runs entirely offline on a standard laptop with under 4 GB VRAM/RAM using Ollama.End-to-End Evaluation Framework: Built an evaluation suite (eval.bat / eval.sh) that benchmarks triage and routing accuracy across 30 real-world sample tickets.Graceful Human-in-the-Loop UX: Created a dashboard experience where human agents retain full control without feeling bogged down by manual data entry.What we learnedRules + AI > AI Alone: LLMs excel at processing unstructured human input and drafting responses, but safety gates, level floors, and escalation rules belong in hardcoded code.Small Models Are Ready for Production: Local 4B models like gemma3:4b are fast and reliable enough for intent classification and triage tasks, cutting API costs to zero.Human-in-the-Loop is the Gold Standard: Building safe enterprise AI isn't about removing humans; it's about making human intervention seamless when safety thresholds aren't met.What's next for TicketdeskMulti-Modal Support: Allow agents and users to attach screenshots, log files, and error dumps for automated visual analysis.Enterprise Adapters: Expand out-of-the-box adapters to support native, bi-directional syncing with Jira Service Management, Zendesk, and ServiceNow.Active Learning Loop: Log human edits made in the dashboard to automatically fine-tune local models and improve runbook matching accuracy over time.

Built With

Share this project:

Updates

Submission history