<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Automations.]]></title><description><![CDATA[Automations.]]></description><link>https://ritikthedev.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 24 Oct 2026 22:09:54 GMT</lastBuildDate><atom:link href="https://ritikthedev.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Giving AI Agents Real Context: How We Built Hopwise Using FalkorDB for Multi-Hop Graph Reasoning
]]></title><description><![CDATA[Hopwise uses FalkorDB to give AI agents relational context for fraud detection, cloud blast radius analysis, and multi-hop graph reasoning.]]></description><link>https://ritikthedev.hashnode.dev/giving-ai-agents-real-context-how-we-built-hopwise-using-falkordb-for-multi-hop-graph-reasoning</link><guid isPermaLink="true">https://ritikthedev.hashnode.dev/giving-ai-agents-real-context-how-we-built-hopwise-using-falkordb-for-multi-hop-graph-reasoning</guid><category><![CDATA[AI]]></category><category><![CDATA[database]]></category><category><![CDATA[hackathon]]></category><category><![CDATA[graph database]]></category><dc:creator><![CDATA[Ritik Joshi]]></dc:creator><pubDate>Sun, 18 Oct 2026 13:14:24 GMT</pubDate><content:encoded><![CDATA[<p>Over the past two years, the AI ecosystem has poured millions of engineering hours into Retrieval-Augmented Generation (RAG). The standard recipe is well-known: chunk documents, generate vector embeddings, run cosine similarity search, and stuff the top-k text snippets into an LLM context window.</p>
<p>This recipe works reasonably well when a user asks: <em>"What is our company's refund policy?"</em></p>
<p>However, it completely collapses the moment an autonomous agent is tasked with real-world, relational questions:</p>
<ul>
<li><p><em>"Which bank accounts are linked to this flagged transaction through shared devices or proxy networks?"</em></p>
</li>
<li><p><em>"If an attacker compromised this developer's API key, what production databases are within their blast radius?"</em></p>
</li>
<li><p><em>"Who made the architectural decision on this legacy microservice, and what downstream services break if it goes down?"</em></p>
</li>
</ul>
<p>These are not vector similarity problems—they are <strong>topological problems</strong>. The answers depend on how entities—people, machines, credentials, IP addresses, transactions, and permissions—connect across 3, 4, or 6 degrees of separation.</p>
<p>When agents lack a native relational model, they fall into <strong>the flat-context trap</strong>: they hallucinate connections, miss circular patterns entirely, and operate as black boxes that cannot explain their actions.</p>
<p>To solve this, we built <strong>Hopwise</strong> for the <strong>Graph Hacks Hackathon by WeMakeDevs and FalkorDB</strong>. Hopwise is an autonomous investigation agent that leverages FalkorDB as its live context and decision engine.</p>
<hr />
<h2>Why FalkorDB?</h2>
<p>When designing an agent that must navigate relationships dynamically, traditional storage engines hit clear walls:</p>
<ol>
<li><p><strong>Relational SQL Databases fail on multi-hop depth</strong>: Joining 5 or 6 tables recursively results in Cartesian blowups, slow query performance, and brittle query generation for an LLM.</p>
</li>
<li><p><strong>Vector Stores lose topological structure</strong>: Nearest-neighbor search retrieves semantically similar text, but cannot understand directional dependencies or cyclical loops (e.g., A paid B, B paid C, C paid A).</p>
</li>
<li><p><strong>Traditional Graph Databases have high latency</strong>: Traditional graph engines struggle to maintain the single-digit millisecond response times required when an agent executes iterative query-and-reason loops in real time.</p>
</li>
</ol>
<p><strong>FalkorDB</strong> changes this dynamic. Because it operates on index-free adjacency and leverages sparse matrix linear algebra (GraphBLAS), multi-hop Cypher traversals execute in sub-millisecond to single-digit millisecond timeframes. This makes it fast enough to sit directly inside an agent's inner loop—reading, traversing, and validating graph state on every step.</p>
<hr />
<h2>Architecture: How Hopwise Works</h2>
<pre><code class="language-text">[User Objective / Incident Trigger]
                │
                ▼
      ┌──────────────────┐
      │  Agent Planner   │
      └────────┬─────────┘
               │  Selects Tool / Cypher Strategy
               ▼
      ┌──────────────────┐     OpenCypher     ┌────────────────────┐
      │   Tool Router    │ ─────────────────▶ │ FalkorDB Graph DB  │
      └────────┬─────────┘                    │ (Nodes &amp; Edges)    │
               │                              └─────────┬──────────┘
               │ Returns Graph Evidence                 │
               ▼                                        ▼
      ┌──────────────────┐                    ┌────────────────────┐
      │ Evidence Parser  │                    │ Graph Algorithms   │
      │ &amp; Visual Tracer  │                    │ • Shortest Path    │
      └────────┬─────────┘                    │ • Centrality       │
               │                              │ • Components       │
               ▼                              └────────────────────┘
  [Force-Directed Canvas] ◀── Path Highlighting
               │
               ▼
      ┌──────────────────┐
      │ Action Executor  │ ──▶ [Quarantine Cluster / Revoke IAM]
      └────────┬─────────┘
               │
               ▼
      [Immutable Audit Log]
</code></pre>
<ol>
<li>The Autonomous Agent Loop</li>
</ol>
<p>Rather than outputting conversational text, the agent initiates an investigation plan with explicit goals. On each iteration:</p>
<p>It formulates an OpenCypher query or calls a Graph Algorithm tool (such as betweenness centrality or shortest path).</p>
<p>It executes the query against FalkorDB.</p>
<p>It parses the resulting subgraph (nodes, edges, properties, execution metrics).</p>
<p>It synthesizes relational evidence and determines whether the investigation goal has been satisfied.</p>
<ol>
<li>Live Path Highlighting on an Interactive Canvas</li>
</ol>
<p>Agents shouldn't operate behind closed doors. In Hopwise, we integrated a force-directed network canvas. As the agent navigates from node to node, the exact multi-hop traversal path animates and lights up on screen, providing immediate visual feedback on the agent's line of reasoning.</p>
<ol>
<li>Non-Blackbox Autonomous Actions &amp; Audit Log</li>
</ol>
<p>In production environments, an agent cannot be trusted to execute destructive mitigations without verified proof. When Hopwise triggers an action (e.g., freezing a bank account or revoking a compromised IAM credential), it binds the action directly to an immutable audit log citing the exact Cypher query, latency, node IDs touched, and relational evidence.</p>
<p>Three Real-World Demonstration Scenarios</p>
<p>We pre-loaded Hopwise with three complex real-world scenarios to demonstrate the breadth of FalkorDB's context layer:</p>
<p>Scenario 1: Financial Fraud &amp; Synthetic Identity Ring</p>
<p>The Challenge: A fraud ring uses synthetic identities (SSNs with mismatched issuance dates) and disguises laundering through circular transactions and offshore shell corporations.</p>
<p>The Graph Model: (:Person)-[:USES]-&gt;(:Device)-[:CONNECTED_FROM]-&gt;(:IP), (:Person)-[:OWNS]-&gt;(:Account), and (:Account)-[:TRANSFER]-&gt;(:Account).</p>
<p>The FalkorDB Query:</p>
<p>MATCH (p1:Person)-[:USES]-&gt;(d:Device)&lt;-[:USES]-(p2:Person) WHERE p1 &lt;&gt; p2 MATCH (d)-[:CONNECTED_FROM]-&gt;(ip:IP {tor: true}) RETURN p1.name, p2.name, d.name, ip.name</p>
<p>The Outcome: The agent detects that seemingly unrelated users share the exact same hardware fingerprint and connect through a known Tor exit node, transfers money to an offshore BVI shell, and immediately quarantines the entire account cluster.</p>
<p>Scenario 2: Cloud Infrastructure Security Breach &amp; Blast Radius</p>
<p>The Challenge: A developer's IAM access key leaks in a public GitHub gist. The security team needs to know immediately what databases and services could be compromised.</p>
<p>The Graph Model: (:Credential)-[:AUTHENTICATES_AS]-&gt;(:IAMRole)-[:CAN_ASSUME]-&gt;(:IAMRole)-[:HAS_ACCESS_TO]-&gt;(:Database).</p>
<p>The FalkorDB Query:</p>
<p>MATCH path = (c:Credential {status: "leaked"})-[:AUTHENTICATES_AS|CAN_ASSUME*1..4]-&gt;(target) RETURN path</p>
<p>The Outcome: The agent traces a privilege escalation path across two assumed roles, identifies that the credential can reach the production billing database via VPC peering, revokes the credential, and pages the on-call security engineer.</p>
<p>Scenario 3: Company Brain &amp; Decision Traceability</p>
<p>The Challenge: An incident strikes a critical payment gateway service. The incident commander needs to know who authored the service, what design decisions were documented, and who has active on-call escalation authority.</p>
<p>The Graph Model: (:Engineer)-[:AUTHORED]-&gt;(:RFC)-[:GOVERNS]-&gt;(:Microservice)-[:DEPENDS_ON]-&gt;(:System).</p>
<p>The Outcome: The agent executes a shortest-path traversal to trace the architecture back to the original design document and links the on-call engineer in seconds.</p>
<p>What We Learned Building with FalkorDB</p>
<p>Graph Queries are the Ideal Tool Calling Interface for LLMs: Teaching an LLM to generate Cypher is significantly cleaner than teaching it to chain dozens of REST APIs. Cypher syntax is declarative, human-readable, and naturally matches the way humans conceptualize relationships ((subject)-[predicate]-&gt;(object)).</p>
<p>Graph Algorithms Supercharge LLM Reasoning: LLMs are notoriously weak at topological calculations like calculating the shortest path across 1,000 nodes or identifying betweenness centrality. By exposing graph algorithms as callable tools, the agent offloads computational graph math to FalkorDB and focuses its reasoning on interpreting the findings.</p>
<p>Multi-tenancy and Isolation are Crucial: FalkorDB's multi-graph architecture allows spinning up isolated graph instances within a single deployment. In an agent context, this means every user, investigation session, or customer tenant can have their own isolated graph without infrastructure overhead.</p>
<p>Conclusion &amp; Links</p>
<p>AI agents are only as capable as the context they reason over. Moving from flat vectors to rich, connected knowledge graphs with FalkorDB transforms agents from probabilistic guessers into transparent, auditable investigators.</p>
<p>Live Demo: <a href="https://hopewise.ritik.biz">https://hopewise.ritik.biz</a></p>
<p>Project: <a href="https://github.com/Ritik-The-Dev/graphwise-agent-atlas">https://github.com/Ritik-The-Dev/graphwise-agent-atlas</a></p>
<p>Built for: Graph Hacks (WeMakeDevs &amp; FalkorDB)</p>
]]></content:encoded></item></channel></rss>