Ticket Triage Agent
An autonomous support-triage agent — hand-rolled, no LangChain.
The problem
Support teams drown in repetitive tickets, but full automation is risky: a wrong auto-reply on a billing issue, or one leaking a card number, is worse than a slow human.
The solution
A from-scratch agent that classifies a ticket, enriches it via tool-use lookups, then auto-resolves, drafts for review, or escalates. Confidence thresholds and guardrails decide when a human must stay in the loop.
What it does
- ▹Hand-rolled agent loop — no framework
- ▹Tool-use with validated schemas + Pydantic v2 structured output
- ▹Confidence-gated escalation & human-in-the-loop
- ▹Guardrails: PII detection, prompt-injection heuristics, output filtering
- ▹Offline eval harness — 45 tests, 98% coverage, no API key required
How it works
- 1
Guard the input
Incoming tickets pass input guardrails; injection or invalid content is escalated immediately.
- 2
Loop with tools
The LLM backend proposes steps; a ToolRegistry validates arguments and executes knowledge-base and CRM lookups.
- 3
Decide by policy
A policy engine gates the terminal action on confidence and category — safe & confident auto-resolves, billing/legal drafts for review, PII leaks escalate.
Architecture
Click a node to see what it does.
How it looks
Tech stack
- Python 3.11
- Pydantic v2
- Tool-use
- pytest