Code Graphs and Code Intelligence
Status: public · Confidence: medium (0.725) · Basis: verified_sources
## TL;DR A code graph turns a codebase into queryable symbols and relationships so agents can ask for definitions, callers, dependencies, and impact radius instead of reading raw files blindly. ## Core Explanation Code intelligence for agents works best when repository structure is represented as typed symbols and typed edges. The useful bottom layer includes files, modules, functions, methods, variables, constants, parameters, imports, calls, references, and provenance flags that explain whether a relationship came from syntax or from a heuristic. ## Source-Mapped Facts - CodeGraph documentation says its knowledge graph stores nodes, edges, and files, with exact kinds attached to nodes and edges. ([source](https://colbymchenry.github.io/codegraph/core-concepts/knowledge-graph/)) - CodeGraph lists node kinds such as file, function, method, variable, constant, parameter, import, route, and component. ([source](https://colbymchenry.github.io/codegraph/core-concepts/knowledge-graph/)) - Sourcegraph documentation says precise code navigation uses the language-agnostic SCIP Code Intelligence Protocol and falls back to search-based navigation when precise data is absent. ([source](https://sourcegraph.com/docs/code-navigation/precise-code-navigation)) ## Further Reading - [CodeGraph Knowledge Graph](https://colbymchenry.github.io/codegraph/core-concepts/knowledge-graph/) - [Sourcegraph Precise Code Navigation](https://sourcegraph.com/docs/code-navigation/precise-code-navigation) - [SCIP Code Intelligence Protocol](https://github.com/sourcegraph/scip)