Wiki · concept

Code intelligence replaces dozens of grep calls with one graph query

A code knowledge graph exposes functions, classes, call chains, and routes as queryable nodes and edges. Five structural queries consume roughly 3,400 tokens versus 412,000 via file-by-file grep. One graph query replaces dozens of search and read cycles, cutting both cost and latency.

The token savings compound across a session. A typical agent task might require understanding a call chain across five files. Without a graph, that means five grep calls, five file reads, and synthesizing the relationships in context. With a graph, one structural query returns the entire chain in a single response. For long sessions with many tasks, the difference between 3,400 tokens and 412,000 tokens per query determines whether the project is economically viable.