Graphify: Instant Knowledge Graph for Claude Code/Antigravity (FREE)
Understanding Claude Code and Graphify
Introduction to Claude Code
- The speaker introduces a scenario where a user is trying to understand the codebase in Claude Code by asking about the function of "browser-use."
- Before answering, Claude reads through the project README and multiple files to build a mental model, which incurs costs for each read.
Limitations of Claude Sessions
- Each new session starts from scratch; Claude has no memory of previous sessions, leading to repeated reading and searching.
- This process is likened to hiring a new employee who must learn everything anew with every session.
Introduction of Graphify
- Graphify is introduced as a tool that builds a knowledge graph after reading the project once, allowing Claude to reference this graph in future sessions instead of re-reading files.
- The speaker emphasizes that Graphify can be used not only for code but also for various types of documents like research papers and meeting recordings.
How Graphify Works
- The first pass involves analyzing code structure using a parser that reads all relevant syntax without external API calls.
- The second pass transcribes audio/video content locally using Faster-Whisper, ensuring privacy and efficiency.
- The third pass scans other document types (markdown, PDFs), extracting concepts and relationships while merging everything into one cohesive graph.
Efficiency Gains with Graphify
- A comparison between two identical sessions shows that using Graphify reduces token usage from 120,000 to 113,000 tokens—an approximate 8% savings.
- Despite minor token savings, the quality of responses improves significantly when using Graphify; detailed explanations are provided compared to simpler mentions without it.
Setting Up Graphify
- Instructions on how to install Graphify are given: users should run specific commands in their terminal based on their operating system.
- Users are advised on potential errors during installation on Windows due to command syntax differences.
This structured overview captures key insights from the transcript while providing timestamps for easy navigation.
Graphify: Enhancing Project Management with Graphs
Overview of Graphify's Functionality
- The process involves analyzing 357 code files, 53 documents, and seven images, requiring selection of subdirectories due to a threshold limit of 200 files.
- After approximately 12 minutes, the output includes a directory named
graphify-out, which contains aGRAPH_REPORT.mdfile detailing the analysis results.
- The report identifies 4,041 nodes (concepts), 20,900 edges (relationships), and 185 communities within the project structure.
Understanding the Graph Visualization
- The graph visualization displays communities on the right side; users can select or deselect these communities for focused analysis.
- Each dot represents a concept such as classes or functions, while lines indicate relationships. Dot size correlates with connectivity—larger dots signify more connections.
Benefits of Using Graphify
- Maintaining an updated graph is crucial as projects evolve; users can run
graphify updateto refresh changes or set up git hooks for automatic updates upon commits or branch switches.
- When starting a new session in Claude (the AI tool), it automatically reads the graph report without needing additional commands from users.
Efficiency Metrics and Real-world Application
- A benchmark comparison shows that loading all files directly into Claude costs around 123,000 tokens versus only 1,700 tokens when using Graphify’s method—yielding a savings ratio of about 71.5 times.
- However, this benchmark may not reflect typical user behavior since most do not load large numbers of files at once; practical savings are more significant in mixed projects or lengthy sessions.
Broader Applications Beyond Code Projects
- Graphify proves beneficial beyond coding contexts; it was successfully applied to YouTube scripts and research notes without programming languages involved.
- Users can leverage Graphify for various document types like PDFs and meeting recordings to create interconnected maps that enhance information retrieval across diverse content types.