TRIAGE-FLOW
A self-hosted AI support-triage system built as production workflow engineering, not a demo.
- Status
- Production-grade
- Role
- Solo — workflow design, custom nodes, evaluation, chaos testing
- Timeline
- 2026
At a glance
An n8n-based pipeline that ingests support tickets from email, forms, and Slack, then classifies, enriches, and drafts responses for human approval. Workflows are stored as code with custom linting, two-tier retries with dead-letter queues, JSON-Schema output validation, and a 200-ticket evaluation harness.
- Workflows live in Git with a custom linter that fails CI on missing error handling, absent retry policies, or hardcoded secrets.
- Two-tier retry with exponential backoff and dead-letter queues; idempotency keys prevent duplicate processing.
- A proprietary TypeScript n8n node wraps a RAG service; a classification service adds TF-IDF retrieval and prompt-injection guards.
- Structured outputs are validated against JSON Schema before they can move downstream.
- Grafana dashboards track deflection rate, edit rate, time-to-first-response, SLA compliance, and per-ticket cost.
Key numbers
200 tickets
Eval harness
Synthetic, with explicitly documented metrics
5
Chaos drills
One found and fixed a real bug
As code
Workflows
Git-tracked, linted, CI-validated
7 stages
Pipeline
Ingest → dedup → classify → enrich → draft → approve → deliver
Tech stack
- Orchestration
- n8n (queue mode)Node.js / TypeScriptDocker Compose
- Data
- PostgreSQLRedisPostgres views for reporting
- Reliability
- Two-tier retry + exponential backoffDead-letter queuesIdempotency guaranteesJSON Schema validation
- Ops
- Grafana dashboardsGitHub Actions CICustom workflow linter5 chaos drills
The problem
'Automate support with AI' is easy to prototype and hard to run. The prototype breaks on duplicate tickets, malformed model output, a provider timeout, or a prompt-injection attempt buried in a customer message.
TRIAGE-FLOW is built to show what production-grade looks like for this class of system.
The pipeline
Tickets arrive from email, web forms, and Slack. They are deduplicated, classified, enriched with retrieved context, and turned into a draft response. A human approves or edits before anything is sent, and SLA timers run throughout.
Engineering rigour
Every workflow is code in Git. A custom linter enforces error handling, retry policies, and no hardcoded secrets, and CI validates schemas and lints before merge. Retries are two-tier with exponential backoff and dead-letter queues; idempotency keys guarantee a ticket is never processed twice.
Model outputs are validated against JSON Schema. The classification service uses TF-IDF retrieval and includes prompt-injection guards. A custom TypeScript node wraps the RAG service so retrieval is a first-class, testable step.
Proving it
A 200-ticket synthetic evaluation harness measures the pipeline with metrics that are documented explicitly rather than implied. Five chaos drills deliberately break dependencies — one of them surfaced a real bug that was then fixed. Postgres views feed Grafana dashboards for volume, deflection, edit rate, time-to-first-response, SLA compliance, and per-ticket cost.
Want the details?
The full source, READMEs, evaluation harnesses, and results are on GitHub.
github.com/dariyaDeepanshu/TRIAGE-FLOW