LEANN
LEANN is a local-first vector database and RAG runtime that recomputes embeddings on demand. It indexes millions of personal documents in gigabytes, preserves accuracy with graph pruning, and supports OpenAI-compatible or local LLMs for fast, private, portable retrieval.
Overview
Point LEANN at documents or personal data sources, pick HNSW or DiskANN, and configure an LLM backend. At query time it traverses a pruned graph, computes missing embeddings, and ranks neighbors before handing context to your model for search and chat, with no cloud required.
Capabilities and architecture
LEANN suits engineers, researchers, and privacy-conscious professionals who need fast, accurate retrieval over sprawling personal or team knowledge without renting a vector database. It is equally useful for indie developers prototyping agents, enterprise labs validating on-device RAG, and teams curating portable, durable knowledge bases across laptops and workstations.
- Index millions of chunks with HNSW or DiskANN on consumer hardware.
- Recompute embeddings on demand using a pruned, high-degree preserving graph.
- Search personal mail, chats, browser history, documents, and code securely offline.
- Use OpenAI-compatible APIs or local engines like Ollama and vLLM.
- Export indexes, move devices, and keep identical retrieval quality reproducibly.

Highlights
Editor’s take
Install via uv and pip (uv pip install leann), or build from source to enable DiskANN. Create an index with LeannBuilder, or run example CLIs for documents, code, emails, browser history, WeChat, iMessage, and chat exports. Configure OPENAI_API_KEY and optionally OPENAI_BASE_URL for compatible providers, or use local engines like Ollama or LM Studio. On macOS, grant Full Disk Access for Mail and Messages. Tune backend, graph degree, and search complexity for your hardware. LEANN collects no telemetry and keeps data on-device.
Local-first RAG that trades disk for compute without sacrificing retrieval quality.
Getting started
LEANN combines a pruned similarity graph with on-demand embeddings to deliver compact, portable indexes and consistent retrieval on personal machines. With flexible backends, OpenAI-format compatibility, rich example pipelines, and zero telemetry, it is a pragmatic foundation for private, large-scale RAG without managing cloud vector stores.
Open the tool and review its core product experience.
Create your account or access your existing workspace.
Use your own task to judge speed, quality, and fit.
Check similar AI tools before making a final decision.



Comments (0)
No Comments Found