StarTrail-org/LEANN

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

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 2 minutes ago
Added to GitGenius on December 23rd, 2025
Created on June 9th, 2025
Open Issues & Pull Requests: 47 (-2)
Number of forks: 1,148
Total Stargazers: 12,821 (+0)
Total Subscribers: 77 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 8.5 hours
Mean response time: 9.0 days
90th percentile: 14.7 days
Tracked items: 110

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 40% of open issues come from outside the core team, a mix of external reports and the maintainers' own roadmap. Work labelled "bug" is answered fastest, typically in about 12 hours, while "enhancement" waits about 4 days. Only 8% of issues opened in the past year have been closed. Three people close 92% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 35
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 209 days
Stale 30+ days: 35
Stale 90+ days: 35

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (30)
  • good first issue (24)
  • bug (19)
  • Good issue for first PR (4)
  • help wanted (4)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

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.

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.