Knowledge graph tools - graphs from many sources
Our tools for building knowledge graphs from code, documents, and articles: topic clusters, an audit trail for every relationship, and exports ready for RAG.
Python · networkx · Claude · Whisper · Neo4j · GraphML · MCP
These are our own research tools. We develop and use them in our daily work. They are neither a client commission nor a boxed product: they are a workshop built because we needed it, and now support our work on RAG.
What it is
A toolset that turns a directory of files into a searchable knowledge graph, with concepts as nodes and relationships as edges.
- Supported sources: code, documents, articles, notes, screenshots, recordings, and selected web addresses.
- Community detection groups nodes into topic clusters, showing real connections even across files where nobody would look for them.
- Every relationship is auditable. An edge is marked as found in a source, inferred, or uncertain, with a confidence assessment.
- Three outputs: an interactive graph, RAG-ready JSON, and a human-readable text report.
- The graph persists in a file, so it survives a session and can be queried later without rereading everything.
- Graph queries support traversal, the shortest path between concepts, and a plain-language explanation of a node.
What problem it solves
- “Knowledge lives in people’s heads and fifty folders.” Keyword search finds a file; a graph shows how that file connects to the rest.
- Entering unfamiliar code. A dependency graph explains what relies on what before anything is changed.
- A model that invents. Separating what was found from what was inferred applies the same discipline as RAG: an answer needs a source.
- Content and information-architecture planning. Clusters expose natural themes and places where materials cannibalise each other.
How we built it
The tool is written in Python and has two extraction modes. For code, relationships come from the syntax tree without a language model, making that path inexpensive, fast, and deterministic. For documents, images, and notes, a model performs extraction; recordings are first transcribed with Whisper.
We store the graph in networkx: nodes, weighted edges, and hyperedges for relationships involving more than two concepts. On top of that we run community detection and centrality measures to identify overloaded hub nodes. Updates are incremental: a post-commit hook recalculates changed files, and a directory-watch mode is available. Exports include JSON, GraphML, SVG, and Cypher for Neo4j; an agent may also access the graph through an MCP server.
The rule embedded in the tool is simple: never present an inferred relationship as fact. If a source is ambiguous, the edge remains marked uncertain rather than being deleted or promoted to fact.
What it demonstrates
It demonstrates that we can organise another organisation’s knowledge into a structure that supports AI answers, with a clear distinction between fact and inference. It is evidence for second brain for companies: RAG and knowledge graphs on client data.
The MCP server and graph queries also underpin multi-agent systems, giving an agent a clear dependency structure instead of only a single text fragment.
