title: The Knowledge Graph
CodeGraph stores three things: nodes (symbols and files), edges (relationships between them), and files. Every node and edge carries an exact kind, drawn from a fixed vocabulary so queries are consistent across languages.
file, module, class, struct, interface, trait, protocol, function, method, property, field, variable, constant, enum, enum_member, type_alias, namespace, parameter, import, export, route, component.
contains, calls, imports, exports, extends, implements, references, type_of, returns, instantiates, overrides, decorates.
Most edges come straight from the AST. A few — at dynamic-dispatch boundaries that static parsing can't follow — are synthesized and marked with provenance: 'heuristic' plus the wiring site that created them. These are surfaced inline in explore and the node trail, so an agent can see exactly where a connection came from.
See the CLI and MCP Server references for how to run these.