LEANN is a vector database designed to enable retrieval-augmented generation on personal devices with exceptional storage efficiency. The repository demonstrates that semantic search and RAG capabilities can operate with 97% less storage than traditional vector database solutions while maintaining search accuracy. The system achieves this through graph-based selective recomputation with high-degree preserving pruning, computing embeddings on-demand rather than storing them persistently.
The project supports RAG across diverse personal data sources including PDF, text, and markdown documents, Apple Mail, Google Search History, WeChat conversations, ChatGPT and Claude chat histories, iMessage conversations, and live data streams through Model Context Protocol servers such as Slack and Twitter. This breadth of data source integration positions LEANN as a comprehensive personal knowledge indexing system. The repository includes specific application examples for semantic search across file systems, email archives, browser history, chat histories, and codebases, with Claude Code integration providing MCP-compatible semantic search capabilities.
LEANN prioritizes privacy by design, ensuring all data remains on the user's device without transmission to cloud services or third-party APIs. The system is lightweight and portable, allowing users to transfer entire knowledge bases between devices with minimal overhead. The architecture uses graph-based recomputation combined with CSR format storage to minimize both storage and memory requirements while handling messy personal data at scale.
The codebase is written in Python and supports versions 3.9 through 3.13 across multiple platforms including Ubuntu, Arch Linux, macOS with both ARM64 and Intel processors, and Windows. The project includes native MCP integration and maintains zero telemetry tracking. Installation is available through PyPI or from source, with platform-specific build instructions provided for Linux distributions, macOS, and Windows environments.
According to GitGenius activity tracking, the repository has processed 117 issues and pull requests with a median response latency of zero hours and a mean response latency of 23.5 hours, indicating active and responsive maintenance. The most active contributor is yichuan-w with 255 tracked events, followed by andylizf with 69 events and ASuresh0524 with 68 events. Enhancement requests represent the most common issue type with 30 tracked items, followed by good first issue labels with 24 items and bug reports with 18 items. The repository overlaps contributors with yichuan-w/leann, sgl-project/sglang, and kubeflow/pipelines.
The project is associated with an MLsys2026 publication and references a research paper at arxiv.org/abs/2506.08276 detailing the technical approach. The system supports multiple LLM and embedding providers through OpenAI API compatibility, including local inference engines like Ollama, LM Studio, vLLM, llama.cpp, and SGLang, as well as cloud providers. A demo notebook is available and can be run in Google Colab for immediate experimentation. The project maintains an active Slack community and conducts user surveys to guide feature development priorities such as GPU acceleration and additional integrations.