<?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: Aaryan</title>
    <description>The latest articles on DEV Community by Aaryan (@aaryn01).</description>
    <link>https://dev.to/aaryn01</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%2F4192256%2F5f5af0d6-bf60-4d15-8b2a-3c624551a13f.png</url>
      <title>DEV Community: Aaryan</title>
      <link>https://dev.to/aaryn01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aaryn01"/>
    <language>en</language>
    <item>
      <title>I built a "company brain" on FalkorDB in a weekend and the graph found risks the org chart hides</title>
      <dc:creator>Aaryan</dc:creator>
      <pubDate>Sun, 18 Oct 2026 14:18:32 +0000</pubDate>
      <link>https://dev.to/aaryn01/i-built-a-company-brain-on-falkordb-in-a-weekend-and-the-graph-found-risks-the-org-chart-hides-1ibd</link>
      <guid>https://dev.to/aaryn01/i-built-a-company-brain-on-falkordb-in-a-weekend-and-the-graph-found-risks-the-org-chart-hides-1ibd</guid>
      <description>&lt;p&gt;&lt;em&gt;Built for Graph Hacks 2026 (WeMakeDevs × FalkorDB), Company Brain track.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Live demo: &lt;a href="https://teambrain-n1kt.onrender.com" rel="noopener noreferrer"&gt;https://teambrain-n1kt.onrender.com&lt;/a&gt; · Code: &lt;a href="https://github.com/aaryn01/teambrain" rel="noopener noreferrer"&gt;https://github.com/aaryn01/teambrain&lt;/a&gt; · Video: &lt;a href="https://youtu.be/1q945ylk8Pg" rel="noopener noreferrer"&gt;https://youtu.be/1q945ylk8Pg&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The problem I wanted to solve
&lt;/h2&gt;

&lt;p&gt;I work as a backend engineer at a bank. Every few months someone joins the team, or someone leaves, and the same questions come up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who owns this project?&lt;/li&gt;
&lt;li&gt;Why did we decide that? Wasn't it different last quarter?&lt;/li&gt;
&lt;li&gt;Who should I talk to about the ledger migration?&lt;/li&gt;
&lt;li&gt;If this person leaves, what do we lose?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The answers exist. They're just spread across old meeting notes, Confluence pages, Slack threads and — mostly — people's heads. A document search can find a page that &lt;em&gt;mentions&lt;/em&gt; the fraud threshold. It can't tell you that the threshold was changed in September, by whom, in which meeting, and what the previous value was.&lt;/p&gt;

&lt;p&gt;Those are questions about &lt;em&gt;relationships&lt;/em&gt;, not documents. So for the hackathon I built TeamBrain: a company's knowledge as a graph, with an AI agent that walks it.&lt;/p&gt;
&lt;h2&gt;
  
  
  The graph
&lt;/h2&gt;

&lt;p&gt;I made up a small fintech, Northwind Pay: 10 people, 4 teams, 4 projects, 6 meetings, 6 decisions, 5 documents. Six node types, thirteen relationship types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(Person)-[:MEMBER_OF]-&amp;gt;(Team)        (Team)-[:OWNS]-&amp;gt;(Project)
(Person)-[:LEADS]-&amp;gt;(Project)         (Person)-[:WORKS_ON]-&amp;gt;(Project)
(Person)-[:ATTENDED]-&amp;gt;(Meeting)      (Meeting)-[:ABOUT]-&amp;gt;(Project)
(Person)-[:DECIDED]-&amp;gt;(Decision)      (Decision)-[:DECIDED_IN]-&amp;gt;(Meeting)
(Decision)-[:ABOUT]-&amp;gt;(Project)       (Decision)-[:SUPERSEDES]-&amp;gt;(Decision)
(Person)-[:AUTHORED]-&amp;gt;(Document)     (Document)-[:ABOUT]-&amp;gt;(Project)
(Document)-[:REFERENCES]-&amp;gt;(Decision)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The one I'm most attached to is &lt;code&gt;SUPERSEDES&lt;/code&gt;. When a decision changes, the old one isn't deleted — it gets &lt;code&gt;status: superseded&lt;/code&gt; and an edge pointing to its replacement. The history stays in the graph, so "why is it 0.78 now?" can be answered with "because it was 0.85, and here's the meeting where that changed."&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%2Fbrll7n9prucaxath287u.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%2Fbrll7n9prucaxath287u.png" alt="TeamBrain answering a question with citations and the graph path highlighted" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The agent: tools, not free-form queries
&lt;/h2&gt;

&lt;p&gt;My first instinct was "let the LLM write Cypher." I kept that as a fallback, but the main design is a set of &lt;strong&gt;tools that are each one parameterised Cypher query&lt;/strong&gt;: find entities, project overview, decision trail, person profile, who-knows ranking, shortest connection between two nodes. The LLM picks a tool and fills in the ids; FalkorDB does the actual work.&lt;/p&gt;

&lt;p&gt;Two rules make the answers trustworthy:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Every fact must cite a node id.&lt;/strong&gt; The UI turns &lt;code&gt;[d-4]&lt;/code&gt; into a clickable chip that highlights the node in the graph, and shows the exact Cypher that ran under each answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All reads go through &lt;code&gt;GRAPH.RO_QUERY&lt;/code&gt;.&lt;/strong&gt; FalkorDB's read-only mode rejects any write server-side, so even the free-form Cypher tool can't mutate anything. This turned out to be a great safety primitive for LLM agents.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Keeping the brain current
&lt;/h2&gt;

&lt;p&gt;A company brain that goes stale is useless. So the second feature: paste meeting notes, and the agent extracts a plan — which existing people attended, which new people appeared, what was decided, and whether a decision &lt;em&gt;replaces&lt;/em&gt; an existing one. You review the plan, then it's written with idempotent &lt;code&gt;MERGE&lt;/code&gt;s and deterministic ids, so applying the same notes twice doesn't duplicate anything.&lt;/p&gt;

&lt;p&gt;The nice moment in the demo: write the notes, ask "what's the current autopay limit?", and the answer is already the new one — with the old decision shown as superseded, not gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part a document search can't do
&lt;/h2&gt;

&lt;p&gt;The feature I'm proudest of came from a question I asked myself on day one: &lt;em&gt;who are our single points of failure?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;People never point at each other in the raw data — only at projects, meetings, decisions and documents. So first I derive a collaboration graph with one Cypher query: two people are connected if they share any project, meeting, decision or document, with a &lt;code&gt;shared&lt;/code&gt; count on the edge. It's rebuilt after every ingest.&lt;/p&gt;

&lt;p&gt;Then FalkorDB's built-in &lt;strong&gt;betweenness centrality&lt;/strong&gt; runs on that projection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;&lt;span class="k"&gt;CALL&lt;/span&gt; &lt;span class="n"&gt;algo.betweenness&lt;/span&gt;&lt;span class="ss"&gt;({&lt;/span&gt;&lt;span class="py"&gt;nodeLabels:&lt;/span&gt; &lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'Person'&lt;/span&gt;&lt;span class="ss"&gt;],&lt;/span&gt; &lt;span class="py"&gt;relationshipTypes:&lt;/span&gt; &lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'COLLABORATES_WITH'&lt;/span&gt;&lt;span class="ss"&gt;]})&lt;/span&gt;
&lt;span class="k"&gt;YIELD&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Betweenness answers: how often does the shortest path between two &lt;em&gt;other&lt;/em&gt; people run through this person? A high score means they're a bridge between groups.&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%2Fuottrixev5cjevmoxfuq.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%2Fuottrixev5cjevmoxfuq.png" alt="Key-person risk view: project leads score zero, the real risks are the brokers between teams" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result surprised me even though I wrote the data. The three project leads — Meera, Priya, Neha — all score &lt;strong&gt;zero&lt;/strong&gt;. They're hubs inside one project, not bridges between projects. The real risks are &lt;strong&gt;Sana&lt;/strong&gt;, a data engineer who turns out to be Platform's only link into two other teams' projects, and &lt;strong&gt;Kabir&lt;/strong&gt;, the compliance officer who is Risk's only link into two Payments projects. An org chart would never show you that. The graph does.&lt;/p&gt;

&lt;p&gt;Three more pattern queries explain &lt;em&gt;why&lt;/em&gt; each person is risky: projects they lead alone, projects where they're their team's only link, and artifacts where they're the only person attached. Click a person and the graph lights up exactly what depends on them.&lt;/p&gt;

&lt;p&gt;I tried PageRank first. It just rediscovered the leads — the most-connected people. Betweenness finds the people &lt;em&gt;between&lt;/em&gt; clusters, which is where the hidden risk lives. That one choice is the whole feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Graphs earn their place when the question is a chain.&lt;/strong&gt; "Decision → replaced decision → meeting → attendees → their other projects" is one query in Cypher and a nightmare anywhere else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Directed edges matter for algorithms.&lt;/strong&gt; My first betweenness run returned 0 for everyone, because people only have outgoing edges — no shortest path ever passes &lt;em&gt;through&lt;/em&gt; a person. The fix was the bidirectional collaboration projection. Obvious in hindsight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the agent show its work.&lt;/strong&gt; Citations plus the visible query turned "trust me" into "check for yourself." Judges, teammates and future me all benefit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the scope small enough to explain.&lt;/strong&gt; 35 nodes, 16 queries, one algorithm. I can walk anyone through every piece.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Stack and honesty
&lt;/h2&gt;

&lt;p&gt;FalkorDB Cloud (free tier, Mumbai region), Python + FastAPI, Gemini via the OpenAI-compatible API, vis-network for the graph view, deployed on Render. All data is synthetic.&lt;/p&gt;

&lt;p&gt;I used Claude as a coding assistant throughout — for generating and reviewing code — and said so in the README. I designed the graph model and the features with it, tested every query against FalkorDB, and the explanations above are mine. The hackathon rules allow this with disclosure, and I think that's the right norm: use the tools, own the understanding.&lt;/p&gt;

&lt;p&gt;If you want to try it: clone the repo, point it at a free FalkorDB Cloud instance and a Gemini key, run &lt;code&gt;python seed.py&lt;/code&gt;, and ask it who you can't afford to lose.&lt;/p&gt;

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