Skip to main content
Krolik

CODE INTELLIGENCE FOR AI AGENTS · 2026

Krolik gives
AI agents eyes
that grep never had.

Tree-sitter ASTs across 13 languages, an Apache AGE knowledge graph, and a live observability bridge from Prometheus alert to file:function in 5 seconds. 28 MCP tools, plus two optional Rust companions — ox-embed-server (ONNX embeddings + cross-encoder rerank + SPLADE) and ox-codes (deeper dead-code / health). Open source, top to bottom.

Languages
13
MCP tools
28
Install
5 min

KNOWLEDGE GRAPH

What Krolik sees.

Your code as a property graph, indexed for agents. Every symbol, every call edge, every import, every test relationship. Queried in natural language via Cypher.

debug_investigate

From Prometheus alert
to file:function in 5 seconds.

Six-phase async pipeline: failure spikes, Jaeger failed traces, symbol resolution, callgraph walks upstream and downstream, log excerpts, LLM fusion. Returns ranked hypotheses with body excerpts. No one else does this.

Cypher via
natural language.

Apache AGE property graph on PostgreSQL. Every symbol, call edge, import, route handler, test relationship. Query the graph from plain English: Krolik translates to Cypher and returns structured results.

Generated Cypher
MATCH (caller:Symbol)-[:CALLS]->(fn:Symbol)
WHERE fn.name = 'ValidateToken'
  AND fn.package = 'auth'
OPTIONAL MATCH (fn)-[:TESTED_BY]->(test:Symbol)
RETURN caller.name,
       caller.file,
       caller.line,
       test.name AS test_coverage
ORDER BY caller.file;
37 callers · 12 untested
auth package — 3 files, 6 symbols, 3 tests. Apache AGE on PostgreSQL.

dataflow_analyze + rewrite

Taint tracking.
Structural codemods.

IL/CFG analysis traces values from source to sink. Detects dead stores, unescaped user input reaching SQL or command execution. Rewrite applies AST search-replace patterns across all 13 languages with wildcard matching, survives multi-line code that regex can't touch.

rewrite — errors.New to fmt.Errorf · 247 matches
Go · AST search-replace 247 files
@@ auth/token.go:88 @@
 return errors.New(msg)
 return fmt.Errorf("%s: %w", msg, err)

@@ db/query.go:44 @@
 return nil, errors.New(queryErr)
 return nil, fmt.Errorf("query: %w", queryErr)

@@ cache/store.go:71 @@
 return errors.New(cacheErr)
 return fmt.Errorf("cache: %w", cacheErr)

... +244 more
Pattern errors.New($MSG) → fmt.Errorf("%s: %w", $MSG, err)
247 matches
13 languages
dry-run safe preview

positioning

Where the tools live.

grep sees text. LSP sees one file's types. Sourcegraph indexes repos for humans. Datadog sees runtime metrics. Krolik sees all four layers simultaneously, for agents. No one else is in that quadrant.

Krolik sits at the intersection no other tool occupies: structural depth (AST + call graph + type resolution) at multi-repo scale, with a live observability bridge. The top-right quadrant belongs to agents.

quickstart

Five minutes from clone
to first MCP call.

Requires OpenAI-compatible LLM endpoint
Unlocks more PostgreSQL + AGE pgvector ox-embed-server ox-codes Redis

Just an LLM endpoint and you have repo analysis, call tracing, structural rewrite, dataflow, and PR review. Add Postgres + AGE for code_graph; ox-embed-server + pgvector for semantic_search and code_research reranking; ox-codes for stricter dead_code + full code_health grades. Redis is just an L2 cache. All companions are open source.

krolik quickstart
$ docker compose -f krolik.yml up -d
Starting go-code ... done

$ curl -X POST http://localhost:8897/mcp \
    -H 'Content-Type: application/json' \
    -d '{"tool":"semantic_search","query":"auth context deadline bug"}'

 12 results in 380ms

Full quickstart on GitHub

Frequently asked
questions.

What languages does Krolik support?

Go, Python, TypeScript, TSX, Rust, Java, C, C++, Ruby, C#, PHP, Svelte, and Astro — 13 total. Type-aware analysis is live today on Go via go/types. SCIP backend is in flight for the other 11.

How does it integrate with Claude Code or Cursor?

Krolik exposes 28 MCP tools over Streamable HTTP. Add the URL to your MCP config — Claude Code, Cursor, Windsurf, Aider, Cline, or any client implementing the Model Context Protocol.

Do I need ox-embed-server and ox-codes?

Both are optional Rust companions (open source, same author). ox-embed-server is a unified ONNX sidecar — multilingual-e5-large (1024d, default), jina-code-v2 (768d, code), a gte-multi-rerank cross-encoder, and SPLADE — speaking OpenAI `/v1/embeddings`, Cohere `/v1/rerank`, and TEI `/embed_sparse`. It unlocks `semantic_search` and the reranker used by `code_research`. ox-codes deepens `dead_code` and `code_health` with structural + symbol-graph analysis. Without them those tools degrade to AST-only heuristics; the other ~23 tools work unchanged.

How is this different from Sourcegraph?

Sourcegraph indexes code for humans. Krolik indexes code for AI agents. We add a knowledge graph (Apache AGE), a runtime observability bridge (Prometheus + Jaeger → file:function), and an MCP-native protocol. Sourcegraph has none of these.

What infrastructure do I actually need?

Just an OpenAI-compatible LLM endpoint (LiteLLM, CLIProxyAPI, or any wrapper). That's the only hard requirement. Add PostgreSQL with Apache AGE to enable `code_graph`. Add pgvector + ox-embed-server to enable `semantic_search` and reranking. Add ox-codes for stricter dead-code verdicts and full A–F repo grades. Redis is optional for L2 cache. Everything else is in-process Go — no JVM, no Node, no cloud service.

Self-hosted only?

Yes. Apache 2.0, every component. Bring your own LLM endpoint (mandatory) and optionally PostgreSQL + our Rust companions for the tools that need them. No SaaS lock-in, no telemetry, no phone-home.

What's the licence?

Apache 2.0 across the stack. Engine: github.com/anatolykoptev/go-code. Companions: github.com/anatolykoptev/ox-codes, github.com/anatolykoptev/ox-embed-server.