<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Karan Jakhar</title>
    <description>The latest articles on DEV Community by Karan Jakhar (@karanjakhar88).</description>
    <link>https://dev.to/karanjakhar88</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F299568%2F1add193d-71c1-4a3a-bd09-a3d42f0aa209.jpg</url>
      <title>DEV Community: Karan Jakhar</title>
      <link>https://dev.to/karanjakhar88</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karanjakhar88"/>
    <language>en</language>
    <item>
      <title>The root cause is two hops away: building on-call agents on a graph</title>
      <dc:creator>Karan Jakhar</dc:creator>
      <pubDate>Sun, 18 Oct 2026 17:17:45 +0000</pubDate>
      <link>https://dev.to/karanjakhar88/the-root-cause-is-two-hops-away-building-on-call-agents-on-a-graph-onk</link>
      <guid>https://dev.to/karanjakhar88/the-root-cause-is-two-hops-away-building-on-call-agents-on-a-graph-onk</guid>
      <description>&lt;p&gt;&lt;em&gt;How I built Blastwave for FalkorDB Graph Hacks: three local-LLM agents that triage, investigate and page, using FalkorDB as their context, memory and shared state.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/1F_YKCy3Lkk" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvimqtocly1ahlt54ck37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvimqtocly1ahlt54ck37.png" alt="Blastwave UI: the agent trace highlights the evidence path from checkout-service to the bad ledger deploy" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 a.m., again
&lt;/h2&gt;

&lt;p&gt;The alert says &lt;code&gt;checkout-service&lt;/code&gt; is returning 5xx errors at 18%. Nothing changed in checkout. You open dashboards, scroll Slack, check deploy logs for five services, and twenty minutes later find it: &lt;code&gt;ledger-service&lt;/code&gt; shipped a DB client refactor 38 minutes ago and quietly dropped its connection pool from 50 to 10. Checkout calls payments-api, and payments-api calls ledger, so the failure surfaced two hops from where it started.&lt;/p&gt;

&lt;p&gt;What makes it worse is that &lt;strong&gt;this already happened in March&lt;/strong&gt;. Priya on the Payments team fixed it. There's a postmortem and an ADR that says "ledger pool must stay ≥ 50". Nobody found any of it during the incident, because the relevant facts weren't in any single record. They were spread across the links between records.&lt;/p&gt;

&lt;p&gt;That's the problem with putting an LLM agent on top of an incident: it sees pieces, not connections, and it forgets everything once the session ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put the context in a graph
&lt;/h2&gt;

&lt;p&gt;Each question an on-call engineer asks is a traversal:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Graph pattern&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;What breaks if this goes down?&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(:Service)-[:DEPENDS_ON*1..6]-&amp;gt;(x)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What changed near the symptom?&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;(symptom)-[:DEPENDS_ON*0..5]-&amp;gt;(:Service)&amp;lt;-[:OF]-(:Deploy)&lt;/code&gt; in a time window&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Has this happened before?&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(:Incident)-[:AFFECTED]-&amp;gt;(…neighbourhood…)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;How did we fix it?&lt;/td&gt;
&lt;td&gt;&lt;code&gt;(:Procedure)-[:FIXES]-&amp;gt;(:Service)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who actually knows this system?&lt;/td&gt;
&lt;td&gt;`(:Person)-[:WORKED_ON&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Why is it configured like this?&lt;/td&gt;
&lt;td&gt;{% raw %}`(:Decision)-[:SOURCED_FROM]-&amp;gt;(:Doc&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So I modelled a small company in FalkorDB: teams, people, 29 services and datastores, dependencies, deploys, incidents, runbooks, tickets, ADRs and decisions. Then I gave a team of agents tools that each run one of those traversals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three agents, one blackboard
&lt;/h2&gt;

&lt;p&gt;Blastwave runs a pipeline of three agents:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Triage&lt;/strong&gt; sizes the blast radius (upstream traversal plus PageRank), checks memory, and sets severity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Investigator&lt;/strong&gt; walks &lt;em&gt;downstream&lt;/em&gt; from the symptom looking for recent risky deploys, matches past incidents, and pulls the recorded fix procedure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comms&lt;/strong&gt; works out who to page (on-call, plus the strongest expert by evidence), pages them, and posts a status update.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The design choice I'm happiest with is that &lt;strong&gt;agents don't pass findings to each other in prompts.&lt;/strong&gt; Each agent gets only an incident id. It writes its conclusions to the shared {% raw %}&lt;code&gt;Incident&lt;/code&gt; node (&lt;code&gt;severity&lt;/code&gt;, &lt;code&gt;hypothesis&lt;/code&gt;, &lt;code&gt;-[:SUSPECTED_CAUSE]-&amp;gt;(:Deploy)&lt;/code&gt;, &lt;code&gt;-[:PAGED]-&amp;gt;(:Person)&lt;/code&gt;) and records a &lt;code&gt;(:Agent)-[:HANDED_OFF {note}]-&amp;gt;(:Agent)&lt;/code&gt; edge. The next agent calls &lt;code&gt;incident_state&lt;/code&gt; and reads everything back from FalkorDB.&lt;/p&gt;

&lt;p&gt;This sounds like ceremony, but it gives you three things for free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Any agent can resume any incident&lt;/strong&gt;, in this session or next week, because state never lived in a prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The handoff chain is queryable&lt;/strong&gt;: &lt;code&gt;MATCH (a)-[h:HANDED_OFF {incident:$id}]-&amp;gt;(b) RETURN a, b, h.note&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Humans see the same state&lt;/strong&gt; the agents see.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Memory that compounds
&lt;/h2&gt;

&lt;p&gt;Memory lives in the same graph, in three kinds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Episodic&lt;/strong&gt;: every agent turn becomes an &lt;code&gt;Episode&lt;/code&gt;, NEXT-chained inside its &lt;code&gt;Session&lt;/code&gt; and linked with &lt;code&gt;MENTIONS&lt;/code&gt; to every service, person or incident it touched. Ask "what do we remember about ledger-service?" and you get episodes from &lt;em&gt;every&lt;/em&gt; past session in a single hop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic&lt;/strong&gt;: &lt;code&gt;Fact&lt;/code&gt; nodes the chat agent stores when you tell it something.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Procedural&lt;/strong&gt;: when a human resolves an incident, the fix becomes a &lt;code&gt;Procedure -[:FIXES]-&amp;gt; Service -[:LEARNED_FROM]-&amp;gt; Incident&lt;/code&gt;, or, if one already exists, its &lt;code&gt;uses&lt;/code&gt; counter goes up. Next time, the investigator finds it via &lt;code&gt;procedures_for&lt;/code&gt;, which also searches downstream dependencies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because memory is attached to the same nodes as the operational data, recall doesn't need embeddings or a separate vector store. It's just graph neighbourhood.&lt;/p&gt;

&lt;h2&gt;
  
  
  Small model, honest guardrails
&lt;/h2&gt;

&lt;p&gt;I wanted it to run fully local: Qwen3-4B on an 8 GB laptop GPU. Small models are good at choosing a tool and bad at writing correct Cypher against a schema they've never seen, so:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The LLM never writes Cypher.&lt;/strong&gt; It picks from 19 typed tools, each a parameterized query.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each tool returns evidence&lt;/strong&gt;: the rows, the exact Cypher and params, and the subgraph it touched. The UI highlights that subgraph live, and you can click any step to replay it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guardrails&lt;/strong&gt;: each agent declares the checks it &lt;em&gt;must&lt;/em&gt; run. If the model skips one (4B models do), the runtime runs it with arguments taken from the graph, feeds the result back, and labels that step &lt;code&gt;guardrail&lt;/code&gt; in the trace. You can always tell what the model did from what the system enforced.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Graph queries take milliseconds, so this costs essentially nothing. A full three-agent run issues dozens of queries, and FalkorDB time doesn't register next to LLM time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things I learned about FalkorDB
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;shortestPath&lt;/code&gt; goes in &lt;code&gt;WITH&lt;/code&gt;/&lt;code&gt;RETURN&lt;/code&gt;, not in &lt;code&gt;MATCH&lt;/code&gt;: &lt;code&gt;WITH shortestPath((a)-[:DEPENDS_ON*1..8]-&amp;gt;(b)) AS p&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Algorithms are built in and very useful as agent tools: &lt;code&gt;algo.pageRank('Service','DEPENDS_ON')&lt;/code&gt;, &lt;code&gt;algo.betweenness({...})&lt;/code&gt; (single points of failure), &lt;code&gt;algo.labelPropagation({...})&lt;/code&gt;, &lt;code&gt;algo.WCC&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Multigraph made multi-tenancy trivial: &lt;code&gt;bw_acme&lt;/code&gt; and &lt;code&gt;bw_globex&lt;/code&gt; sit in one instance with full isolation.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GRAPH.RO_QUERY&lt;/code&gt; (&lt;code&gt;graph.ro_query&lt;/code&gt; in Python) is a clean way to guarantee read-only agent tools.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Everything is local: &lt;code&gt;docker compose up -d falkordb&lt;/code&gt;, &lt;code&gt;ollama create blastwave-qwen -f Modelfile&lt;/code&gt;, &lt;code&gt;python -m blastwave.seed&lt;/code&gt;, &lt;code&gt;uvicorn blastwave.server:app&lt;/code&gt;. Then click &lt;strong&gt;Run triage → investigate → comms&lt;/strong&gt; and watch the graph light up from checkout to ledger to the deploy that caused it, and to the person who knows how to fix it.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/karanjakhar/blastwave" rel="noopener noreferrer"&gt;https://github.com/karanjakhar/blastwave&lt;/a&gt; · Demo: &lt;a href="https://youtu.be/1F_YKCy3Lkk" rel="noopener noreferrer"&gt;https://youtu.be/1F_YKCy3Lkk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built for &lt;a href="https://www.wemakedevs.org/hackathons/falkordb" rel="noopener noreferrer"&gt;FalkorDB Graph Hacks&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>falkordb</category>
      <category>ai</category>
      <category>agents</category>
      <category>graphdatabase</category>
    </item>
  </channel>
</rss>
