ai-agent

LEANN: Private RAG App

Run a fast RAG app with 97% storage savings.
intermediate⏱ 30 minutesπŸ’΅ Free (self-hosted)
12,947 stars1,170 forksPythonUpdated 9/19/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: Private RAG App works
Codeflow
Free to inspect

LEANN: Private RAG App 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.