<?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: Graphify Labs Inc</title>
    <description>The latest articles on DEV Community by Graphify Labs Inc (graphify).</description>
    <link>https://dev.to/graphify</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%2Forganization%2Fprofile_image%2F15091%2F831bf484-c707-431a-85cf-c12370867d8b.png</url>
      <title>DEV Community: Graphify Labs Inc</title>
      <link>https://dev.to/graphify</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/graphify"/>
    <language>en</language>
    <item>
      <title>What is a code knowledge graph? (And why it beats grep for AI agents)</title>
      <dc:creator>Syed Fahad</dc:creator>
      <pubDate>Thu, 08 Oct 2026 11:40:45 +0000</pubDate>
      <link>https://dev.to/graphify/what-is-a-code-knowledge-graph-and-why-it-beats-grep-for-ai-agents-hf2</link>
      <guid>https://dev.to/graphify/what-is-a-code-knowledge-graph-and-why-it-beats-grep-for-ai-agents-hf2</guid>
      <description>&lt;p&gt;A code knowledge graph is a knowledge graph built from a codebase. Functions, classes, config, and docs are nodes. Calls, imports, and references are typed edges between them. An assistant follows those edges to see how the pieces connect, instead of searching the repo as flat text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does a code knowledge graph beat grep?
&lt;/h2&gt;

&lt;p&gt;A call can exist when the names do not match. A file can import &lt;code&gt;charge&lt;/code&gt; as &lt;code&gt;take_payment&lt;/code&gt; and then call &lt;code&gt;take_payment()&lt;/code&gt;. Grep for &lt;code&gt;charge&lt;/code&gt; finds the import. It does not find the call, because the call is named &lt;code&gt;take_payment&lt;/code&gt;. The import edge still connects that call to &lt;code&gt;charge&lt;/code&gt;. Tree-sitter read the alias in the syntax tree.&lt;/p&gt;

&lt;p&gt;Grep returns the lines that contain a string. A &lt;a href="https://graphify.com/glossary/code-graph" rel="noopener noreferrer"&gt;Code graph&lt;/a&gt; stores the relationship itself, a call or an import with a direction and a type. &lt;a href="https://graphify.com/glossary/knowledge-graph" rel="noopener noreferrer"&gt;Knowledge graph&lt;/a&gt; is the name for entities and the typed relationships between them.&lt;/p&gt;

&lt;p&gt;What calls this handler is a walk backward along call edges. A string search returns every line that mentions the handler, comments included. The call edges are the callers. A structural question, such as "what breaks if this changes," traces to a path through files. You can open those files and check the answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  When is grep still the right tool?
&lt;/h2&gt;

&lt;p&gt;Grep is the right tool when the question is really "find this string." A misspelled word in a comment, or a URL in a config file, is a string to find. The graph holds nodes and edges. A string that never became a node or an edge is still a search, and grep is how you run it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does an agent follow a path across files?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;graphify path "webhook" "database"&lt;/code&gt; walks the edges between those two nodes. A path from the webhook to the database takes more than one hop. It can run from the handler, through the function that handler calls, to the table that function writes. Each hop is one typed edge. The agent starts at one node, follows the edges, and answers from the chain. Each node on the chain names a file.&lt;/p&gt;

&lt;p&gt;You can check an edge before you trust the hop. Every edge is tagged. EXTRACTED means the syntax tree produced it. INFERRED means the model proposed it. AMBIGUOUS means the evidence did not resolve, as with dynamic dispatch or an import built from a string. An AMBIGUOUS edge stays in the graph and keeps the tag. &lt;a href="https://graphify.com/concepts" rel="noopener noreferrer"&gt;How Graphify works&lt;/a&gt; explains the tags.&lt;/p&gt;

&lt;p&gt;The comparison with retrieval over similar passages is &lt;a href="https://graphify.com/blog/code-knowledge-graph-vs-rag" rel="noopener noreferrer"&gt;Code knowledge graph vs RAG&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you build one?
&lt;/h2&gt;

&lt;p&gt;Code is parsed locally with tree-sitter, across 36 languages. Call and import edges come from the syntax tree. That pass does not call a model. Docs and other non-code files can be folded in by the model you already use. Those connections are tagged INFERRED.&lt;/p&gt;

&lt;p&gt;In the project, &lt;code&gt;/graphify .&lt;/code&gt; writes three files under &lt;code&gt;graphify-out/&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;graph.html&lt;/code&gt;: a map you can open in a browser&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GRAPH_REPORT.md&lt;/code&gt;: a written brief&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;graph.json&lt;/code&gt;: the raw structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can run the queries from the shell.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;graphify query &lt;span class="s2"&gt;"what calls this handler"&lt;/span&gt;
graphify path &lt;span class="s2"&gt;"webhook"&lt;/span&gt; &lt;span class="s2"&gt;"database"&lt;/span&gt;
graphify explain &lt;span class="s2"&gt;"APIRouter"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;graphify query&lt;/code&gt; answers over the structure. &lt;code&gt;graphify path&lt;/code&gt; traces how two nodes connect. &lt;code&gt;graphify explain&lt;/code&gt; walks why a node matters.&lt;/p&gt;

&lt;p&gt;When the code changes, &lt;code&gt;graphify update .&lt;/code&gt; re-extracts the changed files. Inside the assistant, &lt;code&gt;/graphify . --update&lt;/code&gt; re-scans what changed. You run the refresh. Until then, the files in &lt;code&gt;graphify-out/&lt;/code&gt; stay as they were written.&lt;/p&gt;

&lt;p&gt;There is no telemetry.&lt;/p&gt;

&lt;p&gt;Graphify is open source, Apache 2.0. Graphify Cloud at &lt;a href="https://app.graphify.com" rel="noopener noreferrer"&gt;https://app.graphify.com&lt;/a&gt; is the hosted map, and it is a different product from this on-device setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;The package on PyPI is &lt;code&gt;graphifyy&lt;/code&gt; (two y's).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv tool &lt;span class="nb"&gt;install &lt;/span&gt;graphifyy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;pipx install graphifyy&lt;/code&gt; also works. If the &lt;code&gt;graphify&lt;/code&gt; command is missing after uv, run &lt;code&gt;uv tool update-shell&lt;/code&gt; and open a new terminal.&lt;/p&gt;

&lt;p&gt;Then, in the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/graphify .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First graph: &lt;a href="https://docs.graphify.com/guides/first-graph" rel="noopener noreferrer"&gt;docs.graphify.com/guides/first-graph&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>agents</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
