Knowledge graph and search by meaning over a corpus of 7,000 Grasshopper files, built for AI agents.
Graphe de connaissances et recherche par le sens sur un corpus de 7 000 fichiers Grasshopper, conçus pour des agents IA.
Eighteen years of Grasshopper definitions turned into a knowledge graph and a skill that AI agents can query, audit and build from.
Twenty years of computational design and ten years of teaching it leave a trace: more than 7,000 Grasshopper files, of which 6,442 definitions and 962 user objects, the oldest from 2008. That is where the know-how sits, in binary files that cannot be searched, that depend on plugins nobody remembers, and that an AI agent cannot read. Left to itself, the same agent invents component names. gh-graph is the answer to both problems: it turns the corpus into data, then teaches agents to use it.
Read without Rhino
A parser written in standard-library Python reads .gh and .ghx files, saved clusters and user objects directly: components, wires, embedded scripts, clusters, Hops calls, and the description, date and author saved in each document.
Audit
One command tells where a definition is used and what breaks if it moves, which files still hold Python 2 scripts (2,620 legacy scripts against 50 in Python 3), which plugins a file needs, and which 186 definitions Hops or Rhino Compute can call today.
Upgrade
Fewer than 200 definitions had a description. 5,925 of the 6,442 now have one, nearly all written by AI agents, from an inspection of the canvas for the first 4,693 and from a digest of the file's content for the 1,197 added since, and stored in the file itself without re-saving it, with a check that components and wires are unchanged.
Build
Before placing anything, the agent picks components from a catalog of nearly 10,700 across 59 libraries, core Grasshopper first, and looks for past definitions that already do the job. Every definition it builds is parsed again and compared with its plan.
Explore
A 2D and 3D viewer shows what the practice really uses: components sized by use, one node per file, linked to the files it calls through Hops or embeds as clusters, every filter kept in the URL, and a timeline that replays the corpus from 2008. The map of files can also be read by meaning: coloured by topic, laid out so that files with a near description sit together, or lit up by a question typed in plain words.
Search by meaning
The graph is now paired with RAG: the descriptions, the scripts written in the definitions and the component catalog are embedded with a model that runs on the workstation, and stored next to the graph in a single file. A question, in English or in French, is ranked by meaning and by keywords and narrowed by what the graph knows, such as the definitions Hops can call or those that hold a given component. The graph says how things connect, retrieval finds what a definition is about.
Stack: Python (standard library for the parser), SQLite with FTS5 and sqlite-vec, sentence-transformers, three.js and 3d-force-graph, Claude skills, McNeel Rhino MCP.