// rag · StarTrail-org/LEANN

LEANN

LEANN — проект с открытым исходным кодом из категории «RAG и базы знаний» от StarTrail-org (StarTrail-org/LEANN на GitHub). У него 13 012 звёзд на GitHub и 1 179 форков, он распространяется по лицензии MIT и последний раз обновлялся на GitHub 29 сентября 2026.

The smallest vector index in the world: private RAG over everything on your laptop with 97% less storage.

★ 13,0 тыс. звёзд⑂ 1,2 тыс. форковMITобновлено сент. 2026
▦ визуал — в README этого проекта нет встраиваемого скриншота,
поэтому здесь заглушка. Руководство ниже в любом случае полное.
// факты о проекте

Факты о проекте

Репозиторий
StarTrail-org/LEANN
Звёзды GitHub
13 012
Форки
1 179
Лицензия
MIT
Последнее обновление на GitHub
29 сентября 2026
Тип страницы
Полное руководство по установке
Официальный сайт
Official site
// как это работает

Как это работает

  1. Choose what to RAG over

    Pick a source: documents, email, browser history, chat exports, a codebase, or live data from platforms such as Slack via MCP servers.

  2. Install LEANN

    Install uv if needed, clone the repo for the examples, and install the leann package from PyPI into a fresh virtual environment.

  3. Build your index

    Use the builder API or the leann build CLI to index your data - the graph index stays dramatically smaller than a conventional embedding store.

  4. Search and chat

    Query with LeannSearcher, chat with LeannChat using a local or API model, or plug LEANN into Claude Code as its semantic-search MCP service.

// возможности

Почему его любят

97% storage savings

Graph-based selective recomputation with high-degree-preserving pruning avoids storing every embedding, while the project reports no accuracy loss versus heavyweight solutions.

RAG on everything

Ready-made support for files (PDF, TXT, Markdown), Apple Mail, browser history, WeChat and iMessage, ChatGPT and Claude conversations, codebases, and live data via MCP servers.

Completely private

Your data never leaves your laptop: no cloud, no OpenAI requirement - local Hugging Face or Ollama models cover embedding and generation.

Declarative Python API

Build, search and chat in a few lines with LeannBuilder, LeannSearcher and LeannChat, plus a full CLI for scripting.

MCP semantic search for coding agents

Acts as a drop-in semantic search MCP service for Claude Code; the project's ContextBench comparison reported 2.1x the initial relevant-code recall of BM25 on 30 SWE-Bench Pro tasks.

Portable knowledge bases

The tiny index makes it cheap to copy your entire personal knowledge base between devices or share it with others.

Advertisement
// запустите сами

Запустите сами

  1. Clone the repository

    Clone LEANN (the README clones the original yichuan-w repository into a folder named leann) to access all examples and apps.

    git clone https://github.com/StarTrail-org/LEANN.git
    cd LEANN
  2. Install from PyPI

    Create a uv virtual environment and install the leann package into it.

    uv venv
    uv pip install leann
  3. Build and search an index

    Follow the README quick start: build an index with LeannBuilder, then query it with LeannSearcher or chat with LeannChat.

    python demo.py  # adapt the README quick-start snippet - see README for the exact code
// сценарии использования

Что можно создать

Advertisement
// вопросы и ответы

Вопросы и ответы

Who maintains LEANN?

LEANN is maintained by StarTrail-org and contributors; the underlying research paper (arXiv 2506.08276) received a best paper award at MLSys 2026, per the project.

Is LEANN free to use?

Yes. It is MIT-licensed and runs on your own machine with zero cloud costs.

Does it need a paid API key?

No: embedding and generation can run fully locally (Hugging Face models, Ollama, LM Studio and others). API providers such as OpenAI are optional and use your own key.

How does LEANN compare with FAISS, Chroma or Milvus?

Those store full embedding vectors for every chunk; LEANN recomputes embeddings on demand from a pruned graph, trading some compute for roughly 97% less storage at personal scale.

How do I get started?

Install uv, clone the repo, uv pip install leann, and run the quick-start snippet to build and search your first index.

// продолжить изучение

Похожие инструменты

RAG и базы знаний

autoflow

Graph RAG conversational knowledge base built on TiDB Serverless vector storage

★ 3,0 тыс. звёздApache-2.0
Смотреть руководство →
RAG и базы знаний

ragapp

RAGApp: deploy a RAG app over your documents with Docker — configure it like a custom GPT

★ 4,4 тыс. звёздApache-2.0
Смотреть руководство →
RAG и базы знаний

graphrag

Microsoft's graph-based RAG: index a corpus into a knowledge graph, then query it with an LLM

★ 36,3 тыс. звёздMIT
Смотреть руководство →
RAG и базы знаний

turbovec

A blazing-fast vector index in Rust, built on TurboQuant - with Python bindings

★ 17,4 тыс. звёздMIT
Смотреть руководство →
RAG и базы знаний

deep-searcher

DeepSearcher — open-source deep research over your private data, with reasoning models and Milvus retrieval.

★ 8,3 тыс. звёздApache-2.0
Смотреть руководство →
RAG и базы знаний

qdrant-loader

Free rag & knowledge tool that enterprise-ready vector database toolkit for building s.

★ 55 звёздApache-2.0
Смотреть руководство →
// альтернативы

Альтернативы: RAG и базы знаний

Другие проекты из категории «RAG и базы знаний» с наибольшим числом звёзд в каталоге LibreAI — реалистичный список альтернатив, если LEANN вам не подходит.

// ещё в категории rag

Больше проектов: RAG и базы знаний

Соседние проекты из категории «RAG и базы знаний» в каталоге, ближайшие по числу звёзд к LEANN — продолжайте изучать полку по обе стороны от него.

Получить LEANN

Бесплатно и открыто — забирайте исходный код, ставьте звезду репозиторию и начинайте создавать.