LEANN review
LEANN is a Python vector database and RAG library that recomputes embeddings on demand to keep indexes small on personal devices.
TL;DR
LEANN is an open-source vector index and RAG toolkit for running private semantic search on a laptop. It is for developers who want local retrieval over documents, chat histories, or codebases. Instead of storing all embeddings, LEANN recomputes them on demand with graph-based selective recomputation and pruning, which keeps index storage low.
- 13.7kGitHub stars
- +644new stars, week of Oct 25
- #3in RAG, data and memory this week
LEANN at a glance
- Category
- RAG, data and memory
- Maintained by
- StarTrail (organization, @StarTrail-org on GitHub)
- License
- MIT
- Language
- Python, Shell, CMake
- Repository
- github.com/StarTrail-org/LEANN
- Website
- arxiv.org/abs/2506.08276
- Latest release
- v0.3.8 on GitHub, Sep 28, 2026
- First published
- Jun 9, 2025
What LEANN does
- LEANN builds a vector index and recomputes embeddings on the fly instead of storing them, which reduces index storage.
- LEANN indexes documents in .pdf, .txt and .md formats, plus Apple Mail, Google Search History, WeChat, iMessage, ChatGPT and Claude conversations.
- LEANN pulls live data from platforms such as Slack and Twitter through MCP (Model Context Protocol) servers.
- LEANN runs as a semantic search MCP service for Claude Code, adding semantic retrieval beyond grep-style keyword search.
- LEANN offers a Python API with LeannBuilder, LeannSearcher and LeannChat to build indexes, search them and chat with your data.
- LEANN connects to HuggingFace, Ollama, Anthropic and any OpenAI-compatible API for generation and embeddings.
- LEANN supports HNSW and DiskANN backends for the index.
How it works
LEANN installs as a Python package and runs on your own machine. You build an index from your data with the Python API or the leann CLI, then search it or chat with it. Embeddings are computed on demand from a pruned proximity graph. Generation and embedding models come from local engines such as Ollama, LM Studio or vLLM, or from OpenAI-compatible cloud APIs.
How to install and start using LEANN
Install uv (prerequisite)
curl -LsSf https://astral.sh/uv/install.sh | shWith uv from PyPI
uv pip install leannClone the repository
git clone https://github.com/StarTrail-org/LEANN.git leannRequirements
- Python with the uv package manager installed.
- An OpenAI API key in OPENAI_API_KEY when using the default OpenAI LLM. Local engines such as Ollama avoid this.
- DiskANN builds on macOS require macOS 13.3 or later.
- Windows source builds require Visual Studio 2022 Build Tools with the C++ desktop development workload, plus vcpkg.
First steps
- Create and activate a virtual environment with uv venv and source .venv/bin/activate, then install leann.
- Build an index in Python with LeannBuilder(backend_name="hnsw"), add text, and call build_index with an index path.
- Search the index with LeannSearcher and its search method, passing a query and top_k.
- Chat with your data using LeannChat with an llm_config, such as a HuggingFace model, then call ask.
Who LEANN is for
- Developers who want private, local RAG over personal data such as files, email and chat histories.
- Claude Code users who want semantic code search through an MCP service.
- Projects that need vector search on devices with limited storage.
Limitations to know
- LEANN recomputes embeddings at query time instead of storing them, trading compute for storage.
- Building LEANN from source requires many system libraries, and Ubuntu 20.04 may need a newer Abseil and a pinned Protobuf.
- On Linux, uv's default hardlink installs can make leann build fail. Reinstalling with UV_LINK_MODE=copy fixes this.
- LEANN's data stays private only with local models. Cloud LLM or embedding providers receive your data under their own terms.
Is LEANN growing? Usage data
In the week of Oct 25–31, 2026, LEANN ranked #30 on the Devtoolwatch Board and #3 in RAG, data and memory, with a momentum score of 84 out of 100.
Show the weekly numbers
| Week of | New stars |
|---|---|
| Aug 9, 2026 | 10 |
| Aug 16, 2026 | 45 |
| Aug 23, 2026 | 22 |
| Aug 30, 2026 | 53 |
| Sep 6, 2026 | 49 |
| Sep 13, 2026 | 13 |
| Sep 20, 2026 | 30 |
| Sep 27, 2026 | 50 |
| Oct 4, 2026 | 16 |
| Oct 11, 2026 | 20 |
| Oct 18, 2026 | 78 |
| Oct 25, 2026 | 644 |
On Hacker News
- Successful room temperature ambient-pressure magnetic levitation of LK-99, 2408 points and 1199 comments (Aug 4, 2023)
- The first room-temperature ambient-pressure superconductor?, 1690 points and 877 comments (Jul 25, 2023)
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via RL, 1351 points and 1056 comments (Jan 25, 2025)
- ArXiv now offers papers in HTML format, 1204 points and 312 comments (Dec 21, 2023)
- The Era of 1-bit LLMs: ternary parameters for cost-effective computing, 1040 points and 447 comments (Feb 28, 2024)
The Board ranks tools by four signals each week: new stars, new stars for the repo's size, added downloads and download growth beyond the market. How the ranking works.
LEANN alternatives
Other RAG, data and memory tools on the Board in the week of Oct 25–31, 2026, by momentum:
| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | XERJXERJ is a local-first search engine and MCP server for AI agents, packaged as one Rust binary with an Elasticsearch-compatible API. | 17.9k | – |
| #2 | MemvidMemvid is a single-file memory layer for AI agents that packages data, embeddings, search indexes, and metadata into one portable .mv2 file. | 17.3k | – |
| #4 | GraphifyGraphify is an AI coding assistant skill that turns a codebase, with its docs, PDFs, images and videos, into a queryable knowledge graph. | 140k | 480.7k |
| #5 | MarkItDownMarkItDown is a lightweight Python utility from Microsoft that converts PDFs, Office documents, images, audio and other files to… | 193.2k | 4.7M |
| #6 | FirecrawlFirecrawl is an API and open source project to search, scrape, crawl, and interact with web pages, returning LLM-ready markdown or JSON… | 197.4k | 2.9M |
| #7 | Mem0Mem0 is a memory layer for AI agents and apps that stores and retrieves user, session, and agent context across interactions. | 68.2k | 884.1k |
Recent LEANN releases
LEANN FAQ
Is LEANN free and open source?
Yes. LEANN's source code is on GitHub (StarTrail-org/LEANN) under the MIT license, so you can use it for free.
How do I install LEANN?
Run curl -LsSf https://astral.sh/uv/install.sh | sh. The install section above has the other options from the project's README.
Is LEANN still maintained?
Yes. The StarTrail-org/LEANN repository was last updated on Oct 30, 2026, and the latest release, v0.3.8 on GitHub, came out on Sep 28, 2026.
How popular is LEANN?
LEANN has 13.7k GitHub stars as of Nov 1, 2026. It gained 644 new stars in the week of Oct 25–31, 2026, against a 12-week average of 86 a week. That made it #3 among RAG, data and memory tools on the Devtoolwatch Board.
What are the best alternatives to LEANN?
Other RAG, data and memory tools on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: XERJ (#1), Memvid (#2), Graphify (#4), MarkItDown (#5), Firecrawl (#6). The alternatives table above has their numbers.
How does LEANN reduce storage?
LEANN uses graph-based selective recomputation with high-degree preserving pruning. LEANN computes embeddings on demand instead of storing them all, and it compresses proximity graph indices using CSR format.
Can LEANN run fully offline and private?
Yes, if you pair LEANN with a local inference engine. The README recommends Ollama or other local engines such as LM Studio, vLLM or llama.cpp for full privacy. The project also states it tracks zero telemetry.
Does LEANN work with Claude Code?
Yes. LEANN provides a semantic search MCP service that works with Claude Code. It adds semantic retrieval on top of Claude Code's grep-style keyword search, without changing your workflow.
Can I use a different provider for embeddings than for the LLM?
Yes. With the leann build command, set --embedding-mode openai and pass --embedding-api-base and --embedding-api-key to use a separate embedding provider, such as Jina AI.
Is there a research paper behind LEANN?
Yes. The paper is "LEANN: A Low-Storage Vector Index" on arXiv (2506.08276). The repository describes it as an MLsys2026 Best Paper.
Sources
- StarTrail-org/LEANN on GitHub
- LEANN README
- LEANN website
- Release v0.3.8 (Sep 28, 2026)
- Release v0.3.7 (Mar 8, 2026)
- Release v0.3.6 (Jan 11, 2026)
- Hacker News: Successful room temperature ambient-pressure magnetic levitation of LK-99
- Hacker News: The first room-temperature ambient-pressure superconductor?
- Hacker News: DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via RL
- Devtoolwatch Board, the week of Oct 25–31, 2026
LEANN README badge
Maintainers can show the tool's weekly Board rank in their README:
[](https://index.devtoolwatch.com/tools/startrail-org-leann/)How this page is made: Devtoolwatch writes each review from the project's README, releases, package metadata and website, with an AI model, then checks every claim against the source it cites and drops what the sources don't support. The numbers come from Devtoolwatch's daily GitHub snapshots, GitHub's stargazer history, and the npm and PyPI download APIs. Spotted an error? Email [email protected].