---
title: "Code graph · Docs · SourceAnt"
description: "Documentation: Build a local graph of files, symbols and relationships from your working tree, or import SCIP when another indexer covers your language better."
url: "https://sourceant.ai/docs/code-graph/"
---

# Code graph

SourceAnt parses your repository into files, symbols and relationships. A local graph follows your working tree. Review code is pinned to the reviewed commit. Your durable knowledge and system architecture keep their own lifecycles, then SourceAnt joins the relevant context when you or your agent asks.

## Build it here, or bring SCIP

SourceAnt indexes C, C++, C#, Go, Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust, TypeScript, TSX and common markup on your machine. It stores every registered repository in one local database without writing an index into each checkout.

For another language, use a SCIP indexer and load its output into the same graph. A SCIP import must name the revision it describes. Without one, SourceAnt refuses the import.

| Limit | Per index |
| --- | --- |
| Payload | 500 MB |
| Documents | 10,000 |
| Symbols | 1,000,000 |
| Occurrences | 5,000,000 |
| Relationships | 5,000,000 |

Past any of these the import fails rather than truncating. A half-loaded graph that looks whole is worse than one that refused.

## Edges

| Edge | From | To | Meaning |
| --- | --- | --- | --- |
| `DEFINES` | File | Symbol | The file where the symbol is declared |
| `IMPORTS` | File | Symbol | The file brings the symbol in from somewhere else |
| `REFERENCES` | File or Symbol | Symbol | Used here, but not declared or imported here |
| `IMPLEMENTS` | Symbol | Symbol | One symbol satisfies another |
| `TYPE_DEFINITION` | Symbol | Symbol | The type a symbol resolves to |

A file to symbol edge is typed from the role the indexer recorded. Symbol to symbol edges come from the relationships the indexer resolved.

## Related

To index repositories on your machine, see [Local setup](https://sourceant.ai/docs/local-setup). For the knowledge that sits on top of the code, see [Knowledge management](https://sourceant.ai/docs/knowledge-management).
