ai-agent

LEANN: Cut storage 97% and run private RAG locally

LEANN lets founders deploy a fast, accurate retrieval‑augmented generation engine on their own device, keeping data fully private and storage minimal. 13k+ GitHub stars.

From the repo · “[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.”

intermediate⏱ 30 minutes💵 Free (self-hosted)
13,812 stars+11★ this week1,289 forksPythonGuide quality 9/10 · reviewed Oct 6Updated 11/20/2026100% free · open source
What it is

Run a fast and private RAG app on your device.

Real use case example

"A founder wants to build a chatbot for their company's website. They install LEANN, add their company's knowledge base to the app, and then deploy it to their self-hosted server. After a 30-minute setup, the chatbot is live, answering user queries quickly and accurately without draining device resources."

Best insideClaude DesktopCursorCodex CLI
When to use it
  • •When you need to deploy AI models on devices with limited storage capacity
  • •When you require a high level of data privacy for your AI application
  • •When you want to reduce the latency and improve the responsiveness of your RAG application
Ready-to-paste prompt
python -m leann.run --model-name my_rag_model --dataset my_dataset --storage-size 0.03
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

✅ Light setup

Installs with a command or two; your AI agent can do it for you.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/leann && curl -fsSL https://workflowstacks.com/api/skills/leann/claude-skill -o ~/.claude/skills/leann/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How LEANN: Cut storage 97% and run private RAG locally works
Codeflow
Free to inspect

LEANN: Cut storage 97% and run private RAG locally is a large Python project (~41k lines across 131 code files, plus 50 test files). Setup is light: runs with Docker. Last commit this month, MIT license, has a test suite.

Size
Large codebase
~41k lines · 131 code files · ~6 h to skim
Setup
Light setup
Runs with Docker.
Runs on
Python · Docker
No API keys detected
Python 99%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    CLAUDE.md
    The instructions the AI actually follows
  3. 3
    pyproject.toml
    Dependencies and the commands it exposes
  4. 4
    skills/leann-memory/README.md
    Inside skills/ — an example of what the AI is told to do
  5. 5
    examples/__init__.py
    A worked example — copy this to get going
What's in each folder
skills/Prompts, skills & agent definitions3 files
packages/Sub-packages / plugins58 files
apps/Sub-packages / plugins47 files
docs/Documentation28 files
examples/Examples you can copy8 files
benchmarks/Evaluations & benchmarks43 files
scripts/Helper scripts5 files
data/Data files4 files
READMEHas testsDocumentedCI checksDocker readyExamples includedMIT licenseUpdated this month
Quick Actions
Details
Creator
StarTrail-org
Language
Python
Category
ai-agent
Published
6/9/2025

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/leann.svg)](https://workflowstacks.com/skills/leann?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.

Do this with a working workflow

Pages we wrote and tested that put a skill like this to work — importable n8n templates, outcome guides and Claude Desktop configs.