
To reduce how much code AI agents read, Gortex claims token reductions of up to 98.9% in its maker’s benchmarks. The software lets you query code relationships without loading whole files into an agent’s context. As reported by Better Stack, it can also trace connections between front-end and backend repositories. You’ll also discover how setup works without a separate database service and why the dashboard’s savings estimates are not proof of lower usage, while local indexing does not necessarily mean your code stays on your machine.
Gortex: Local Code Graphs for Coding Agents
TL;DR Key Takeaways :
- Gortex is an open source code-intelligence tool free for commercial use under the Apache 2.0 license.
- Gortex indexes code relationships in a local SQLite graph and supports 257 languages and grammars, with analysis depth varying by language.
- In a Claude Code test, graph queries narrowed an investigation of a payment-function signature change without loading entire files into context.
- Gortex’s maker claims an illustrative edit used 688 tokens versus 11,480 for file reads and search, a 94.0% reduction.
- Indexing stays local, but coding agents or configured model providers may send retrieved code or source-derived prompts off the machine.
Gortex is an open source code-intelligence tool by Andrey Kumanyaev that gives coding agents a map of a repository instead of relying only on file searches. It is free, including for commercial use, under the Apache 2.0 license.
Its maker lists v0.64.11, released on October 26, 2026, as the latest release. Gortex is relatively new, has a couple of thousand GitHub stars and runs as a native binary with a background daemon that can handle more than one repository.
Query Code Relationships Instead of Whole Files
Gortex indexes source code into a local SQLite knowledge graph, recording functions, classes, interfaces, imports and their relationships. An agent can query the graph for callers, dependencies, change impact and data flow without placing entire files in its context.
Gortex uses Tree-sitter to parse code and, for major languages, deeper resolution techniques such as language server integration to connect code elements. It supports 257 languages and grammars, although the depth of analysis differs by language.
A daemon watches tracked files and updates the relevant parts of the graph as code changes, rather than rebuilding the whole index. You can access the graph through a command-line interface, an MCP server, an HTTP API and a web interface; Gortex can also preview edits without writing them to disk.
Here are more guides from our previous articles and guides related to AI coding tools that you may find helpful.
- Cursor vs Bolt vs Replit vs v0 AI Coding Showdown
- Trae AI: The Free AI Coding Tool That’s Smarter Than Your IDE
- Best AI Coding Tools of 2025 : Say Goodbye to Coding Frustrations
Set Up Gortex and Track a Repository
Gortex publishes self-contained binaries for Linux and macOS on x86-64 and ARM64, and for Windows on x86-64; Windows on ARM uses x64 emulation. It requires Linux kernel 3.7 or later, macOS 11 or later, or Windows 10 or later; the Windows daemon requires version 1803 or later.
In Better Stack’s Mac setup, the project’s installer downloaded the required components, a new terminal was opened so the binary was on the path, and agent integrations were configured with:
gortex install
After the daemon started in detached mode, the setup tracked a repository with gortex track and then initialized the project with the analyze flag to build the first index and create the agent configuration. The setup did not require Docker, a virtual environment or a separate database service.
Gortex integrates with Claude Code, Cursor, Codex CLI, Gemini CLI, GitHub Copilot, Kiro and Windsurf. Its Claude Code plugin requires the Gortex binary, and the project warns against registering the same integration twice.
Trace Changes Across Repositories
An agent can use Gortex’s MCP tools to find the code that calls a function, identify dependent code and locate potentially relevant tests. In a test with Claude Code instructed to use graph tools first, the graph narrowed down where to investigate a signature change to a payment-processing function by tracing its call chain without putting entire files into context, although the identified tests still needed to be run and would not necessarily break.
Gortex can also keep cross-repository references and contracts in one graph. With a front end calling a payment endpoint in a backend repository, Claude Code could use Gortex to investigate API contract mismatches and find where the front end called the endpoints.
Cross-repository analysis is not unique to Gortex: GitNexus offers it too, along with a browser-based graph explorer, while Graphify can connect code with project documents such as PDFs. Better Stack sees Gortex’s difference in how it is packaged, as one native binary with a shared daemon, live updates, API contract analysis and the savings dashboard, and does not call it automatically better than the others.
Read Token Savings as Estimates
Gortex’s dashboard estimates savings by comparing graph queries with what a file-reading workflow might consume, with estimates available per call, per session and across restarts. The dashboard is not proof of actual savings: Gortex cannot know exactly what the model provider would have done without it.
In an illustrative edit, Gortex’s maker claims the tool used 688 tokens versus 11,480 for file reads and search, a 94.0% reduction. The project also published a benchmark on its own repository dated May 18, 2026, comparing Gortex with ripgrep plus full-file reads. Its claimed results include:
- AddObservation: 972 versus 31,530 tokens, 96.9% fewer.
- IsSymbolQuery: 577 versus 23,027 tokens, 97.5% fewer.
- FileCoherenceSignal: 151 versus 14,268 tokens, 98.9% fewer.
- alphaFuse: 534 versus 14,574 tokens, 96.3% fewer.
- Rerank-pipeline query: 97 versus 415 tokens, 76.6% fewer.
- Indexer Index method query: 28 versus 415 tokens, 93.3% fewer.
- MCP-server-start query: 372 versus 415 tokens, 10.4% fewer.
Savings were not universal: the maker says a natural-language savings-dashboard query used 1,825 tokens versus 415, or 339.8% more. Across identifier queries, the project claims median recall, the proportion of relevant results found, of 1.00 versus 0.00 for ripgrep at a 2,000-token budget.
Retrieval and Response Formats Affect Results
In a 156-case retrieval test, the maker reports that Gortex’s lexical search found relevant results at rates of 42.3%, 55.1% and 63.5% within the first 1, 5 and 20 results, respectively. The corresponding ripgrep figures were 0.0%, 17.3% and 29.5%.
The project reports recall within the first five results of 96.8% for exact-name queries, compared with 25.4% for concept queries and 30.0% for queries involving connections across steps. These figures describe the project’s retrieval cases rather than a guarantee for every codebase.
Gortex’s maker also claims its GCX1 response format saved a median 27.4% of tokens against JSON across 20 response fixtures, all of which round-tripped successfully. Results varied: a large find-usages fixture used 351 tokens versus 569 for JSON, while a cycles fixture used 90 versus 87.
Keep Local Indexing and Agent Access in Mind
Indexing stays local, but a coding agent may still send retrieved code to its model provider. Gortex’s security policy also says a configured hosted or subprocess model provider can send source-derived prompts off the machine, and warns that repository content can influence an agent’s tool calls through prompt injection.
Large repositories can demand substantial memory: the project’s Linux kernel benchmarks involve several gigabytes. On Linux, the static binary skips custom Tree-sitter grammars; those require a dynamically linked source build. Better Stack also notes that the young project has had reported issues with Git worktrees and agent integration.
In our view, the real value is not the headline saving but the cleaner context. An agent that asks a graph who calls a function, rather than reading whole files, has more room to reason about the change itself. We would treat the savings figure as a rough guide, not a receipt, since it compares against a guessed file-reading routine. Check which tools your agent actually calls, because it can still fall back to plain searching.
Better Stack recommends trying Gortex for everyday coding-agent work across repositories, but considers it overkill for tiny projects. In the Claude Code test, graph queries narrowed the investigation of a function change, which showed help with locating relevant code rather than proof of the dashboard’s estimated token savings.
Media Credit: Better Stack
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.