Skip to content

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.

Try to break shipping
frontendcartcatalogcheckoutshippingpaymentp99 446 msquotetimeouts_ms.paymentconfig key on checkoutcommit b9f6186PR #1 · AI agenttimeout800 → 200 mstimeout600 ms
  • 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.

Simulation using recorded numbers from the Why-Graph repo (README, scenarios/act2.md, lessons.py)
Show the numbers as a table
Recorded numbers behind the Why-Graph guard simulation, and the current simulated verdict
WhatValueSource
checkout → payment timeout before PR #1800 mshttps://github.com/redwing-381/astro-shop/pull/1
checkout → payment timeout after PR #1200 mshttps://github.com/redwing-381/astro-shop/pull/1
payment p99 at PR #1446 msredwing-381/we-make-devs-hack · README
checkout error rate, staged INC-103162%redwing-381/we-make-devs-hack · README (staged on the astro-shop demo app)
frontend error rate, staged INC-103141%redwing-381/we-make-devs-hack · README
root_alert query11.0 msredwing-381/we-make-devs-hack · README (query catalog table)
blast_radius query4.3 msredwing-381/we-make-devs-hack · README (query catalog table)
suspect_changes query10.6 msredwing-381/we-make-devs-hack · README (query catalog table)
config_vs_reality query16.9 msredwing-381/we-make-devs-hack · README (query catalog)
L-1 factor1.5×redwing-381/we-make-devs-hack · whygraph/memory/lessons.py
D-1 backtest1 of 39redwing-381/we-make-devs-hack · README
shipping → quote timeout before600 msredwing-381/we-make-devs-hack · scenarios/act2.md
shipping → quote timeout the agent proposed100 msredwing-381/we-make-devs-hack · scenarios/act2.md
quote p99, seed baseline300 msredwing-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 blocked453 msredwing-381/we-make-devs-hack · README; scenarios/act2.md
Your shipping → quote timeout600 msthis simulation
safe_min computed here, ceil(1.5 × quote p99)453 msthis simulation
Guard verdictOK · within L-1this simulation · after L-1