An AI support agent stops guessing: it walks a Relate graph of past tickets, symptoms, root causes and fixes, then recommends the exact resolution.
Live demo (no install): https://abdullahsaami.github.io/triage-graph/
Support teams and AI support agents answer new tickets by searching text. Text search fails when the customer describes the same problem with different words, or when one symptom has several root causes. The answer is not in any one ticket — it is in the connections between tickets, symptoms, causes, fixes and runbooks.
triage-graph stores a support history as a Relate graph and answers:
- Triage — given a free-text ticket, which root causes are most likely, with what confidence?
- Fix — which fix is verified, current (not superseded), and documented in which runbook?
- Similar tickets — which past tickets share a symptom, cause, product or component?
- Gaps — which tickets are still unresolved, which symptoms have no verified fix, which fixes are outdated?
Who benefits: support agents, on-call engineers, and AI agents that resolve tickets without access to a live LLM or paid API. No customer data is used — the bundled dataset is entirely fictional.
Example:
$ python -m triage_graph triage "webhook retries and duplicate events"
Query: webhook retries and duplicate events
Matched: webhook retries, duplicate notifications
Cause: idempotency key missing (6 tickets, confidence 50%)
Fix: Enable idempotency keys on retries
Verified: yes | successes: 10 | team: Billing Team
Cause: webhook signature mismatch (6 tickets, confidence 50%)
Fix: Reload webhook signing secret
Verified: yes | successes: 12 | team: Integrations Team
Recommendation: idempotency key missing -> Enable idempotency keys on retries
Runbook: Payment retry policy (Idempotency)
-
Mode: single file (
graph/support.rl), committed to this repository. -
Why this mode: the graph is the product. One
.rlfile is portable, inspectable by judges with the Relate CLI, safe to open read-only for agents, and needs no server, signup or deployment. Relate is embedded, so the whole tool runs locally. -
What the graph models:
Node Meaning Ticketone support ticket: title, body, severity, status, tier, channel, created Product,Componentthe product and component the ticket is about Symptomnormalized symptom, e.g. login loopCausediagnosed root cause, e.g. expired session cookieFixresolution steps, verified flag, effective date, success count Docrunbook that documents a fix Teamteam that usually handles a cause Edge Meaning Ticket -[:REPORTS]-> Symptomreported symptom Ticket -[:DIAGNOSED_AS]-> Causediagnosed cause Ticket -[:RESOLVED_BY]-> Fixapplied fix Ticket -[:ABOUT]-> Product,-[:IN_COMPONENT]-> Component,-[:ROUTED_TO]-> Teamrouting context Ticket -[:DUPLICATE_OF]-> Ticketduplicate tickets Symptom -[:INDICATES]-> Causeinferred only when 2+ tickets agree Cause -[:HANDLED_BY]-> Teaminferred only when 2+ resolved tickets agree Fix -[:FIXES]-> Cause,-[:DOCUMENTED_IN]-> Docresolution knowledge Fix -[:SUPERSEDES]-> Fixa newer fix replaces an older one
Relate does the real work: variable-length and multi-hop Cypher walks, uniqueness constraints and MERGE for idempotent rebuilds, read-only opens, and MCP access. Runtime uses only the Python standard library; the documented Relate CLI is driven through subprocess.
Prerequisites: Python 3.10+ and Relate 1.5+. Tested with Python 3.14 and Relate 1.5.0. No API key is needed.
Windows (PowerShell):
irm https://relatedb.ai/install.ps1 | iex # install Relate once
python -m pip install pytest # only for tests
.\scripts\setup.ps1 # builds graph/support.rl
python -m triage_graph triage "login loop" -d graph/support.rl
.\scripts\demo.ps1 # opens the web explorermacOS / Linux:
curl -sSfL https://relatedb.ai/install.sh | bash
python3 -m pip install pytest
sh scripts/setup.sh
python3 -m triage_graph triage "login loop" -d graph/support.rl
sh scripts/demo.shShortcuts:
scripts/setup.*— install dependencies and build the committed graph.scripts/demo.*— open the local browser explorer at http://localhost:8765.mcp/test_client.py— smoke-test the named-tool MCP server.
The persistent store is committed at graph/support.rl (68 tickets, 12 symptoms, 11 causes, 12 fixes, 11 docs, 4 teams). It was built from data/tickets.json by python -m triage_graph build. Inspect it directly:
relate --database graph/support.rl --read-only --mode table \
"MATCH (t:Ticket)-[:REPORTS]->(s:Symptom) RETURN s.name, count(*) AS n ORDER BY n DESC LIMIT 5"docs/graph.json is a JSON snapshot exported from the same store for the static demo. Regenerate it with python scripts/export_graph.py.
- Static demo — https://abdullahsaami.github.io/triage-graph/ : click a symptom, see the cause → fix → runbook path.
- Live explorer —
scripts/demo.ps1/scripts/demo.sh: the same interface querying the.rlstore live. - CLI — the six commands below.
- MCP — named tools for an agent, plus generic
read_cyphervia Relate. - Tests — 28 tests: dataset integrity, graph derivation, idempotent loading, query semantics, CLI and MCP.
python -m triage_graph build [--dataset FILE] [--db graph/support.rl] [--json]
python -m triage_graph triage "free text" [--limit N] [--db ...] [--json]
python -m triage_graph similar T-1001 [--limit N] [--db ...] [--json]
python -m triage_graph fix "cause name" [--limit N] [--db ...] [--json]
python -m triage_graph gaps [--db ...] [--json]
python -m triage_graph stats [--db ...] [--json]
python -m triage_graph ticket T-1001 [--db ...] [--json]
-d is an alias for --db. All query commands open the store read-only.
python -m mcp.server --db graph/support.rl starts a small stdio JSON-RPC server with named tools: triage_ticket, find_similar, list_fixes, coverage_gaps, graph_stats, get_ticket. Host configs and four copy-paste Cypher recipes are in mcp/README.md. Relate itself can also serve the same store generically:
relate serve --mcp stdio --database graph/support.rl --read-onlydata/tickets.json fictional, deterministic support history
scripts/ dataset generator, export graph, setup/demo shortcuts
triage_graph/
dataset.py JSON -> graph, with two-ticket rule for inferred links
model.py Node / Edge / Graph dataclasses
load.py Relate loader: constraints, MERGE, idempotent rebuild
query.py triage / similar / fix / gaps / ticket / stats
relate.py CLI subprocess wrapper
__main__.py CLI
web/ live browser explorer (stdlib server + vanilla JS)
docs/ GitHub Pages static demo + graph.json
graph/support.rl committed persistent Relate store
mcp/ named-tool MCP server + Cypher recipes + client
tests/ 28 pytest tests
python -m pip install pytest
python -m pytest -qTests needing Relate skip with a clear reason when it is absent; CI installs Relate and runs the full suite on every push.
Relate CLI · single-file .rl store · embedded Cypher engine · variable-length and multi-hop path queries · uniqueness constraints and MERGE · read-only opens · relate serve --mcp (read_cypher, get_schema), plus a thin named-tool MCP server. No LLM, no paid service, no API key.
This project was built with AI coding assistance. All generated code was reviewed, executed and validated by the team; the committed graph and test results come from running the tool itself.
The dataset is synthetic, so recommendations demonstrate the graph method, not real-world accuracy. Matching is deterministic token overlap over symptom/cause names — no embeddings or LLM. INDICATES and HANDLED_BY links require two agreeing tickets. SUPERSEDES reflects the dataset's explicit ordering. The tool reads its own dataset; it does not connect to a live helpdesk.
MIT — see LICENSE. Relate is Apache-2.0; this project only uses its CLI and documented surfaces.