Devtoolwatch BoardGet it every Monday

LEANN review

LEANN is a Python vector database and RAG library that recomputes embeddings on demand to keep indexes small on personal devices.

Updated Nov 1, 2026. Review written Nov 1, 2026 from the project's own sources; usage data refreshed every Monday.

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.

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 | sh

With uv from PyPI

uv pip install leann

Clone the repository

git clone https://github.com/StarTrail-org/LEANN.git leann

Requirements

  • 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

  1. Create and activate a virtual environment with uv venv and source .venv/bin/activate, then install leann.
  2. Build an index in Python with LeannBuilder(backend_name="hnsw"), add text, and call build_index with an index path.
  3. Search the index with LeannSearcher and its search method, passing a query and top_k.
  4. 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.

New GitHub stars per week for LEANN12 weeks from Aug 9, 2026: 10, 45, 22, 53, 49, 13, 30, 50, 16, 20, 78, 644 new stars, an average of 86 a week.Aug 9week of Oct 25
New GitHub stars per week for the last 12 weeks, from GitHub's stargazer history (today's stargazers by the week they starred).
Show the weekly numbers
New GitHub stars per week for LEANN
Week ofNew stars
Aug 9, 202610
Aug 16, 202645
Aug 23, 202622
Aug 30, 202653
Sep 6, 202649
Sep 13, 202613
Sep 20, 202630
Sep 27, 202650
Oct 4, 202616
Oct 11, 202620
Oct 18, 202678
Oct 25, 2026644

On Hacker News

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:

RAG, data and memory ranked by momentum, the week of Oct 25–31, 2026
RankToolStarsDownloads/wk
#1XERJXERJ is a local-first search engine and MCP server for AI agents, packaged as one Rust binary with an Elasticsearch-compatible API.17.9k–
#2MemvidMemvid is a single-file memory layer for AI agents that packages data, embeddings, search indexes, and metadata into one portable .mv2 file.17.3k–
#4GraphifyGraphify is an AI coding assistant skill that turns a codebase, with its docs, PDFs, images and videos, into a queryable knowledge graph.140k480.7k
#5MarkItDownMarkItDown is a lightweight Python utility from Microsoft that converts PDFs, Office documents, images, audio and other files to…193.2k4.7M
#6FirecrawlFirecrawl is an API and open source project to search, scrape, crawl, and interact with web pages, returning LLM-ready markdown or JSON…197.4k2.9M
#7Mem0Mem0 is a memory layer for AI agents and apps that stores and retrieves user, session, and agent context across interactions.68.2k884.1k

All RAG, data and memory tools, ranked

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

  1. StarTrail-org/LEANN on GitHub
  2. LEANN README
  3. LEANN website
  4. Release v0.3.8 (Sep 28, 2026)
  5. Release v0.3.7 (Mar 8, 2026)
  6. Release v0.3.6 (Jan 11, 2026)
  7. Hacker News: Successful room temperature ambient-pressure magnetic levitation of LK-99
  8. Hacker News: The first room-temperature ambient-pressure superconductor?
  9. Hacker News: DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via RL
  10. Devtoolwatch Board, the week of Oct 25–31, 2026

LEANN README badge

Maintainers can show the tool's weekly Board rank in their README:

Devtoolwatch badge for LEANN

[![Devtoolwatch](https://index.devtoolwatch.com/badge/startrail-org-leann.svg)](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].