Developer Tools
Repository Tool Cuts LLM Context 97.5%
CodeGraph indexes a repository’s files, functions and calls so an AI agent retrieves only the context a question needs.
Explore codebases through interactive graphs and question-specific retrieval.
Structure & source. Inspect source on demand and trace direct callers and architectural communities.
I designed and built CodeGraph independently during summer 2026, before the school year began. My work spans the full system: repository ingestion and parsing, the graph and retrieval pipeline, the API, and the interactive dashboard.
97.5% less LLM context
Built with
- React / TypeScript
- Python / FastAPI
- Tree-sitter
- Neo4j
- LangGraph
Ingest: the tiangolo/fastapi repository, in full from its default branch or as the files a push or pull request changed at that commit, merges into one stream of supported source files: the fastapi package, its tests and documentation examples, and the documentation’s JavaScript. Files such as README.md and uv.lock are skipped, and every source file is token-counted.
Parse: Tree-sitter reads Python, JavaScript, TypeScript, Go and Java. In fastapi/dependencies/utils.py it extracts the function analyze_param, its call to the external is_typealiastype, and its call to create_model_field.
Graph: inside the tiangolo/fastapi boundary, files define functions and functions call functions; calls to code outside the repository, such as run_in_threadpool and deepcopy, are marked external. Every function carries an embedding, and clustering groups functions into labeled subsystems, shown here as Request Routing, Dependency Injection and OpenAPI Schema.
Answer: asked “What breaks if I change create_model_field?”, a Claude agent finds create_model_field by semantic search, walks to its 3 callers (analyze_param and _get_body_field, and _populate_api_route_state in the routing subsystem), and reads the Dependency Injection subsystem, repeating until it has enough context.
Context sent to the model: ≈737K tokens for the full repository against ≈18K tokens of retrieved context, 97.5% fewer.
By Aansh Singh · Solo project · Summer 2026