leann

Index codebases with anchor-based RAG for offline semantic search.

7|3|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/Zpankz/mcp-skillset --skill leann
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: leann
Source: https://github.com/Zpankz/mcp-skillset/tree/main/leann
Command: npx skills add https://github.com/Zpankz/mcp-skillset --skill leann

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, bc, leann, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Local RAG indexing for large codebases with anchor-based lazy recomputation to dramatically reduce storage while preserving fast retrieval.

Core Features & Use Cases

  • Graph-based selective embedding storage enables memory-efficient code search.
  • Suitable for monorepos, IDE integrations, and edge/air-gapped environments.
  • Real-world scenario: self-hosted code search without cloud dependencies.

Quick Start

Start the embedding server and run the index creation workflow to build a lean anchor-based code index.

Frequently Asked Questions about leann

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run local semantic code search on a large monorepo without cloud dependencies?

You can run local semantic code search on large monorepos offline by building a memory-efficient anchor-based index. This approach uses an anchor-graph storage model with lazy reconstruction to enable self-hosted retrieval without cloud dependencies.

What is the best way to perform memory-efficient RAG indexing for large codebases?

Memory-efficient RAG indexing for large codebases is achieved using an anchor-based approach with selective embedding storage. It dramatically reduces storage requirements by leveraging an anchor-graph model with lazy recomputation while preserving fast retrieval.

Can I use graph-based backends like HNSW or DiskANN for offline code retrieval?

Yes, you can use graph-based backends like HNSW or DiskANN for offline code retrieval. These backends support the anchor-graph storage model, enabling production-grade indexing and fast semantic retrieval in memory-constrained environments.

Does anchor-based code search support incremental delta updates for new commits?

Anchor-based code search supports incremental delta updates for new commits. This allows the index to incorporate changes efficiently without requiring a full rebuild, maintaining up-to-date retrieval for continuous self-hosted workflows.

How does lazy reconstruction reduce storage in local code search indexes?

Lazy reconstruction reduces storage in local code search indexes by selectively storing embeddings using an anchor-graph model. Instead of keeping all embeddings in memory, it recomputes them on demand, which dramatically lowers storage overhead while supporting fast retrieval.

Is local semantic code search suitable for memory-constrained or air-gapped environments?

Local semantic code search is highly suitable for memory-constrained and air-gapped environments. It targets edge deployments and self-hosted workflows, utilizing graph-based selective embedding storage and disk-based backends to maintain retrieval capabilities offline.