← Back to Catalog

yichuan-w/LEANN

↗ GitHub

[MLsys2026]: RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

10,564

Stars

928

Forks

74

Watchers

60

Open Issues

Python·MIT License·Last commit Apr 4, 2026·by @yichuan-w·Published April 5, 2026·Analyzed 3d ago
A

Safety Rating A

No security concerns identified. The repository is a legitimate open-source academic project from Berkeley Sky Computing Lab with a published arXiv paper. No hardcoded secrets, malicious code patterns, suspicious dependencies, or prompt injection attempts were detected. The README explicitly emphasizes privacy and local-only data processing, and the project encourages use of local LLM backends for maximum privacy. The installation instructions reference standard, well-known dependencies (faiss, langchain, llama-index, ollama, etc.).

AI-assisted review, not a professional security audit.

AI Analysis

LEANN is a storage-efficient vector index and RAG framework that uses graph-based selective recomputation with high-degree preserving pruning to achieve up to 97% storage savings compared to traditional vector databases like FAISS. Instead of storing all embeddings, it stores a pruned graph structure and recomputes embeddings on demand during search. It supports indexing personal data from diverse sources (documents, emails, browser history, WeChat, iMessage, ChatGPT/Claude exports, Slack, Twitter), runs fully locally for privacy, integrates with LLM backends (Ollama, OpenAI, HuggingFace, Anthropic), and includes native MCP server support for Claude Code integration. The project is backed by a peer-reviewed paper from Berkeley Sky Computing Lab.

Use Cases

  • Building local, privacy-preserving RAG systems on personal devices with minimal storage overhead
  • Semantic search across personal data sources such as emails, browser history, chat history, and documents
  • Indexing and querying large document corpora (up to 60M chunks) on consumer hardware
  • Integrating as a semantic search MCP service with Claude Code for codebase retrieval
  • Replacing heavyweight vector databases (FAISS, etc.) in memory-constrained or on-device deployments
  • Multimodal PDF retrieval using ColQwen/ColPali vision-language models

Tags

#rag#vector-database#embeddings#local-first#llm#memory#mcp#knowledge-graph#cli-tool#library#framework#self-hosted#privacy#data

Project Connections

Alternative to

HKUDS/LightRAG

Both are RAG frameworks with vector search capabilities; LightRAG combines vector search with knowledge graphs while LEANN focuses on storage-efficient graph-based recomputation for local/on-device use.

Alternative to

ruvnet/ruvector

Both are vector database solutions targeting AI/RAG workloads; ruvector is a feature-rich Rust-based platform while LEANN focuses specifically on extreme storage efficiency through embedding recomputation.

Complements

thedotmack/claude-mem

claude-mem provides persistent memory for Claude Code sessions using a hybrid vector DB backend; LEANN's MCP server integration could serve as a drop-in semantic search backend for such memory systems.

Complements

tirth8205/code-review-graph

code-review-graph provides structural code intelligence via MCP for AI coding assistants, while LEANN provides semantic search over codebases via MCP — the two could be combined for richer code retrieval.

Complements

BAI-LAB/MemoryOS

MemoryOS provides hierarchical memory management for AI agents using ChromaDB vector storage; LEANN could serve as a more storage-efficient vector backend for its long-term memory layer.