Sketchbook / case study · see it on its sheet
Why-Graph
Agents that must prove why production broke as a graph path, then block the next agent from repeating it.
- Dates
- 15–18 Oct 2026
- Event
- Graph Hacks 2026 (WeMakeDevs × FalkorDB)
- Team
- team of 2: me, Shoban Ravichandran
- My part
- Agent runtime and the four agents, ingest, MCP server, PR Guard, UI, demo app, live deploy, demo video
- Stack
- Python · FastAPI · FalkorDB (Cypher) · Claude (tool loop) · MCP (FastMCP) · React + Vite · SSE
- Verified
- 453 ms safe minimum the guard enforced167 passing tests5 MCP tools for other agents~950 nodes in the demo graph
- Result
- judging pending
The problem
AI coding agents ship around the clock, so they also break production around the clock. An LLM's root-cause story can't be checked, and nothing stops a second agent from repeating the first agent's mistake on another service.
How it works
A deterministic Python orchestrator in FastAPI runs four agents: Triage and Memory in parallel, then Cause, then Memory again, then Comms. They share one FalkorDB graph as a blackboard: an investigation has findings, and findings have evidence.
- Agents may only call named Cypher queries from a catalog (root alert, blast radius, suspect changes, config versus reality, similar incidents, who knows). There is no free-form query writing.
- Every finding is re-verified. Recording a finding re-runs the cited query and rejects any claim whose nodes and edges are not in the result. Confidence comes from graph signals, never from the model.
- Confirmed incidents become memory. A lesson and a detector are stored as Cypher, backtested against past changes, and exposed to outside coding agents as MCP tools and as a pull-request guard.
What happened in the demo
An agent opened a pull request on our astro-shop demo app to "reduce checkout latency" by cutting the payment timeout from 800 ms to 200 ms, below payment's p99 of 446 ms. The guard honestly reported no known risk, because the graph had never seen that failure. It merged, and the staged incident took checkout errors to 62%.
The agents proved the cause as a graph path, and one click turned it into a lesson: a caller's timeout must be at least 1.5× the callee's p99. Then a fresh agent tried the same mistake on a different service and was blocked with a safe minimum of 453 ms.
Decisions
- The graph decides, not the model. A "graph-only" switch turns the LLM off and every verdict stays the same. That's the test that the graph isn't decoration.
- Honest guard output. Before the lesson existed, the guard said "no known risk" instead of guessing.
My part
I built the agent runtime and the four agents, ingest, the MCP server, the PR guard and the SDE agents, plus the UI, the demo shop and its simulator, the live deploy and the demo video. Shoban Ravichandran built the graph and memory layer: seed data, the Cypher catalog, similarity and detectors.
- what happened
- evidence, and what you can change
- a verdict, always with a word
Act 1 of 5
An AI agent ships a timeout cut
In the live run, the team's AI coding agent wg-chaos opened PR #1 on the astro-shop demo app to “reduce checkout latency”. It cut checkout's timeout on payment from 800 ms to 200 ms. Payment's p99 at the time was 446 ms.
wg-reviewer asks Why-Graph: check_change_risk
No known risk
“No known risk: no lesson or detector matches this change.”
That answer was honest. The seeded history deliberately leaves this failure pattern out, so the graph had never seen it and no detector could fire. The PR merged.
Team build with Shoban Ravichandran at Graph Hacks 2026 (judging pending). Shoban built the seed graph, query catalog, lessons and detectors; Solai built the agents, PR Guard and MCP tools, the astro-shop demo app and its simulator.
Act 1 of 5. PR #1 cuts the checkout to payment timeout from 800 to 200 ms, below payment p99 446 ms. Guard: no known risk. Merged.
Show the numbers as a table
| What | Value | Source |
|---|---|---|
| checkout → payment timeout before PR #1 | 800 ms | https://github.com/redwing-381/astro-shop/pull/1 |
| checkout → payment timeout after PR #1 | 200 ms | https://github.com/redwing-381/astro-shop/pull/1 |
| payment p99 at PR #1 | 446 ms | redwing-381/we-make-devs-hack · README |
| checkout error rate, staged INC-1031 | 62% | redwing-381/we-make-devs-hack · README (staged on the astro-shop demo app) |
| frontend error rate, staged INC-1031 | 41% | redwing-381/we-make-devs-hack · README |
| root_alert query | 11.0 ms | redwing-381/we-make-devs-hack · README (query catalog table) |
| blast_radius query | 4.3 ms | redwing-381/we-make-devs-hack · README (query catalog table) |
| suspect_changes query | 10.6 ms | redwing-381/we-make-devs-hack · README (query catalog table) |
| config_vs_reality query | 16.9 ms | redwing-381/we-make-devs-hack · README (query catalog) |
| L-1 factor | 1.5× | redwing-381/we-make-devs-hack · whygraph/memory/lessons.py |
| D-1 backtest | 1 of 39 | redwing-381/we-make-devs-hack · README |
| shipping → quote timeout before | 600 ms | redwing-381/we-make-devs-hack · scenarios/act2.md |
| shipping → quote timeout the agent proposed | 100 ms | redwing-381/we-make-devs-hack · scenarios/act2.md |
| quote p99, seed baseline | 300 ms | redwing-381/we-make-devs-hack · seed/data/core.json (CALLS svc:shipping→svc:quote) |
| quote p99 at the recorded Act 2 run | ≈302 ms(derived) | redwing-381/we-make-devs-hack · README (safe_min 453) + whygraph/memory/lessons.py (ceil 1.5×p99) |
| safe_min returned when Act 2 was blocked | 453 ms | redwing-381/we-make-devs-hack · README; scenarios/act2.md |
| Your shipping → quote timeout | 600 ms | this simulation |
| safe_min computed here, ceil(1.5 × quote p99) | 453 ms | this simulation |
| Guard verdict | OK · within L-1 | this simulation · after L-1 |