Favicon of LEANN

LEANN

Local vector database for searching personal data and AI retrieval. Runs on macOS, Windows and Linux under MIT, with Ollama and OpenAI-compatible backends.

LEANN is a local vector database for people building AI search over personal files, research collections or codebases. Its main distinction is a smaller search index: it computes embeddings on demand rather than storing every embedding, reducing the disk space needed for retrieval-augmented generation (RAG).

It runs on macOS, Windows and Linux and is open source under the MIT license. Linux supports CPU-only use. Local model backends can keep document processing and answers on your machine, and LEANN collects no telemetry. It also supports cloud providers such as OpenAI and Anthropic, so privacy depends on which embedding and generation services you choose.

LEANN searches by meaning across PDFs, text and Markdown files, Apple Mail, browser history and conversations from WeChat, iMessage, ChatGPT and Claude. You can ask questions over indexed material or give a coding assistant access to relevant code through its Claude Code MCP integration. MCP connections also bring in live data from Slack and Twitter; exported data can work offline.

For local generation, it works with HuggingFace and Ollama, plus OpenAI-compatible servers such as LM Studio, vLLM and llama.cpp. Embedding support includes sentence-transformers, MLX and Ollama. ColQwen2 and ColPali add PDF retrieval that considers figures, diagrams and page layout alongside text, with MPS acceleration on Apple Silicon. You can transfer indexes between devices.

Similar to LEANN