LEANN

[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% priva

What is LEANN?

[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

Overview of LEANN

What it is

LEANN is an open-source vector database that enables retrieval-augmented generation (RAG) on personal devices. It indexes and searches through millions of documents while using 97% less storage than traditional solutions, according to the project's claims. LEANN achieves this through graph-based selective recomputation with high-degree preserving pruning, computing embeddings on-demand instead of storing them all. It received the MLsys2026 Best Paper award.

Key features

  • 97% storage savings compared to traditional vector databases
  • Graph-based selective recomputation and high-degree preserving pruning
  • Supports semantic search over file system, emails, browser history, chat history, agent memory (ChatGPT, Claude), live data (Slack, Twitter), codebases, and external knowledge bases
  • Drop-in semantic search MCP service compatible with Claude Code
  • No accuracy loss while using less storage
  • Portable: transfer knowledge bases between devices

Use cases

  • Semantic search over personal files, emails, browser history, and chat history (WeChat, iMessage)
  • Agent memory retrieval for ChatGPT and Claude
  • Live data search from Slack and Twitter
  • Codebase semantic search for coding agents (e.g., Claude Code)
  • Indexing large external knowledge bases (e.g., 60 million documents)

Getting started

Clone the repository and install with uv:bashgit clone https://github.com/yichuan-w/LEANN.git leanncd leannuv venvsource .venv/bin/activateuv pip install leann

License and pricing

LEANN is licensed under MIT and is open-source. The license is stated in the project metadata.

這是什麼

LEANN 是一個開源的向量資料庫,旨在讓個人裝置上的檢索增強生成 (RAG) 普及化。根據該專案的說法,它能夠索引和搜尋數百萬份文件,同時比傳統解決方案節省 97% 的儲存空間。LEANN 透過基於圖形的選擇性重算與高節點度保留剪枝來實現此效果,按需計算嵌入向量,而非全部儲存。該專案獲得了 MLsys2026 最佳論文獎。

主要功能

  • 與傳統向量資料庫相比,可節省 97% 的儲存空間
  • 基於圖形的選擇性重算與高節點度保留剪枝技術
  • 支援對檔案系統、電子郵件、瀏覽器歷史記錄、聊天記錄、代理記憶 (ChatGPT, Claude)、即時資料 (Slack, Twitter)、程式碼庫及外部知識庫進行語意搜尋
  • 可與 Claude Code 相容的即插即用語意搜尋 MCP 服務
  • 在不犧牲準確度的情況下減少儲存空間使用
  • 可攜帶:可在裝置之間轉移知識庫

使用情境

  • 針對個人檔案、電子郵件、瀏覽器歷史記錄及聊天記錄 (微信、iMessage) 進行語意搜尋
  • 為 ChatGPT 和 Claude 檢索代理記憶
  • 搜尋 Slack 和 Twitter 的即時資料
  • 為程式碼代理 (例如 Claude Code) 進行程式碼庫語意搜尋
  • 索引大規模外部知識庫 (例如 6000 萬份文件)

快速開始

複製儲存庫並使用 uv 安裝:bashgit clone https://github.com/yichuan-w/LEANN.git leanncd leannuv venvsource .venv/bin/activateuv pip install leann

授權與價格

LEANN 採用 MIT 授權條款,為開源軟體。授權條款已在專案中標示。

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/startrail-orgleann.svg)](https://yunodb.com/tools/startrail-orgleann?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/startrail-orgleann?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/startrail-orgleann.svg" alt="Featured on YunoDB" height="20"></a>