# CodeLattice: Code Knowledge Graph Search

> Index your codebase into a local knowledge graph for semantic search and dependency tracing.

CodeLattice: Code Knowledge Graph Search is a free AI agent skill on Agensi by Reza Farzanmehr, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Reza Farzanmehr](https://www.agensi.io/creators/smrf1093)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/codelattice-code-knowledge-graph-search
- Tags: llm-ops, python, typescript, javascript, mcp, search

## About this skill

Stop wasting context window on large file reads and recursive greps. This skill integrates a local code knowledge graph to help you navigate and query your codebase using semantic search and dependency tracing.

### What it does
- **Semantic search** finds code by meaning rather than exact string matching for complex queries.
- **Symbol tracing** locates functions, classes, or variables along with their callers and callees.
- **Dependency mapping** identifies what a file imports or inherits from to understand coupling.
- **Impact analysis** finds dependents to see what will break before you start a refactor.
- **Structural summaries** provide file overviews without consuming tokens on full file content.

### How it works
1. **Initialize** the index for your current directory or a specific path to build the graph.
2. **Query** the codebase using natural language to locate relevant logic via semantic search.
3. **Trace** relationships between symbols to navigate the call graph and inheritance trees.
4. **Analyze** impact by checking for dependents before modifying shared components or APIs.

### Frameworks & tools
Built for Python, TypeScript, and JavaScript. It utilizes `tree-sitter` for parsing and local embeddings for semantic retrieval.

### Why this beats prompting it yourself
Standard agents rely on expensive file reads and hit-or-miss grepping that eats your token budget. This skill offloads the "understanding" to a local graph, allowing the agent to pinpoint exact line ranges instead of reading entire directories.

### Use cases
- Map out an unfamiliar repository by tracing service-to-controller dependencies.
- Find specific logic like "where do we handle exponential backoff" without knowing the filename.
- Perform safe refactors by listing every file that depends on a specific utility function.
- Get a high-level summary of a 2,000-line file without actually reading it into context.

### Known limitations
Only supports Python, TypeScript, and JavaScript. Requires a local installation of the CodeLattice CLI and a one-time 90MB model download.

## Requires

- Python
- uv (Python tool runner)
- CodeLattice CLI

Install first: uv tool install codelattice && codelattice install, then restart Claude Code once. First index downloads a ~90 MB local model.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the CodeLattice: Code Knowledge Graph Search skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does Codelattice help reduce token consumption compared to standard file reading?

Codelattice offloads codebase navigation to a local knowledge graph, allowing your AI to pinpoint specific code segments via dependency tracing and semantic search rather than wasting thousands of tokens reading entire files.

### Which programming languages and frameworks are supported by this skill?

Currently, Codelattice provides full support for Python, TypeScript, and JavaScript, using tree-sitter to accurately parse symbols and relationships within these specific ecosystems.

### Does my source code need to be uploaded to a cloud service for the semantic search to work?

Yes, Codelattice operates entirely locally; it builds a local index and uses a one-time 90MB model download for embeddings, ensuring your proprietary code never leaves your machine for indexing purposes.

### What are the technical requirements for setting up Codelattice on my machine?

You will need to install the Codelattice CLI locally and run a one-time initialization to index your directory, after which any compatible AI agent or MCP-enabled tool can query the graph.

### Can this skill help me understand the impact of a refactor before I change any code?

Beyond basic search, Codelattice identifies callers, callees, and inheritance patterns, allowing you to perform impact analysis to see exactly which files will break before you modify a shared function or API.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
