Gortex Feeds AI Agents Graph Slices, Not File Blobs
Gortex indexes your code into a queryable knowledge graph so AI agents can ask for exactly the context they need instead of wasting tokens on full-file reads.

What it does
Gortex parses repositories into an in-memory knowledge graph of functions, classes, call chains, and cross-service API contracts. It exposes the graph to AI coding agents via MCP, CLI, and HTTP APIs so they query precise context instead of reading entire files. The README claims this cuts per-response token usage by up to 50×.
The interesting bit
Agents query a precomputed depth-3 reach index to ask “what breaks if I change this?” in O(seeds × reach) map lookups rather than chaining file reads. It auto-detects cross-repo contracts—HTTP routes, gRPC, GraphQL, Kafka topics—and matches providers to consumers across repository boundaries. A custom GCX1 wire format reportedly shaves another 27% off JSON token costs.
Key highlights
- Indexes 257 languages via tree-sitter; deep compiler-grade resolution is available for a subset including Python, TypeScript, Go, Rust, and Java, while others fall back to regex or signature heuristics.
- Battle-tested scale: the Linux kernel (~70k files, 1.7M nodes) indexes in roughly three minutes with a peak heap near 5 GB; a VS Code-sized repo takes about a minute and 580 MB.
- Ships as a single static binary with zero external dependencies; semantic search runs offline using an embedded 3.8 MB GloVe model with hybrid BM25 + vector ranking.
- Supports 19 coding agents out of the box, plus speculative execution tools like
preview_editandsimulate_chainthat let agents reason about changes before touching disk. - Live editor overlays push unsaved buffers into a shadow graph, so tools see work-in-progress context without a save.
Caveats
- Language support is tiered: only a subset gets deep compiler-grade resolution, while many of the 257 supported grammars rely on tree-sitter AST or regex heuristics.
- Peak memory use scales with repository size; massive monorepos like the Linux kernel can push heap usage past 5 GB.
Verdict
Worth a look if you run AI agents across large or multi-repo codebases and want to stop paying for context-window bloat. Skip it if your workflow is small single-file scripts where reading the whole file is already the cheapest option.
Frequently asked
- What is zzet/gortex?
- Gortex indexes your code into a queryable knowledge graph so AI agents can ask for exactly the context they need instead of wasting tokens on full-file reads.
- Is gortex open source?
- Yes — zzet/gortex is open source, released under the Apache-2.0 license.
- What language is gortex written in?
- zzet/gortex is primarily written in Go.
- How popular is gortex?
- zzet/gortex has 1k stars on GitHub.
- Where can I find gortex?
- zzet/gortex is on GitHub at https://github.com/zzet/gortex.