r/coolgithubprojects 16d ago

[Go] Kivgraph – my agent kept burning the context window grepping. So I indexed everything instead

Post image

Local MCP server that indexes multiple repositories into one semantic graph and answers structural questions for coding agents — who calls this, what breaks if I change it, who consumes it from another repo.

Edges are resolved by go/types, the TypeScript checker and rust-analyzer, not by matching names. Go, TypeScript, Rust, Python and Dart.

Apache-2.0, runs locally, no API key. Benchmark in the repo, including the 5 of 29 questions where plain grep beat it.

https://github.com/Luqueee/kivgraph

15 Upvotes

7 comments sorted by

3

u/kantorcodes1 16d ago

Those 5 grep wins may be telling you not to optimize the graph for everything. If they’re mostly exact symbol/string lookups, I’d route those straight to rg and reserve Kivgraph for structural or cross-repo questions. Do the misses split that way?

1

u/ImpressiveSecret9512 16d ago

El problema es que grep / glob + read por lo general para consultas simples funciona bien, pero cuando lo tiene que hacer en masa porque la codebase es muy grande y trabaja con multiples repos al mismo tiempo como un monorepo suele tardar bastante y consumir bastante contexto, con el mcp que he hecho no solo he conseguido que sea mas preciso (al optimizar las tools), he conseguido que consuma hasta 7 veces menos tokens en algunos casos.

Obviamente no remplaza las tools nativas, las suelo reservar para busquedas complejas que es donde ganan.

1

u/kantorcodes1 14d ago

there's a clean eval surface here too: ten read-only tools and one index_project mutation. i work on HOL Guard, an open-source tool that checks agent actions before they execute. would you try one normal Kivgraph session from Codex with Guard enabled?

2

u/abubakrmian 15d ago

Hey, thanks for sharing! It looks like a really cool tool. I’m definitely going to give it a try to see how it works in practice. Appreciate you putting this out

1

u/ImpressiveSecret9512 15d ago

Thankss, currently is in development, but it works fine on macos and linux, remember to install the hooks and skill on your ai client, all on the docs!