RAG-Anything

RAG & Memory 💻 Python ⚖️ MIT 🟢 Actively maintained
23.2k stars

RAG-Anything is an all-in-one multimodal RAG framework built on LightRAG that processes and queries documents containing text, images, tables, equations, and charts through a single interface. It solves the problem of traditional text-only RAG systems failing on mixed-content documents, targeting developers and enterprises dealing with academic papers, technical docs, and financial reports.

RAG-Anything demo
🎞️ Demo from the project README

✨ Key features

  • End-to-end multimodal pipeline from ingestion to query answering
  • Universal document support: PDFs, Office, images, and more
  • Specialized processors for images, tables, equations, and text
  • Multimodal knowledge graph with entity extraction and cross-modal links
  • Adaptive parsing with MinerU or direct content list insertion
  • Hybrid retrieval combining vector search and graph traversal

🎯 Use cases

  • Querying academic papers with figures, tables, and formulas
  • Analyzing financial reports with charts and structured data
  • Building enterprise knowledge bases from mixed-format documents
  • Enabling multimodal Q&A on technical documentation
  • Integrating with LightRAG for enhanced multimodal retrieval

📦 Installation

🧰 Requirements: Requires Python, API keys for LLM and vision models (e.g., OpenAI), and optionally LibreOffice for Office documents.

Option 1: Install from PyPI (Recommended)
pip install raganything
With optional dependencies:
pip install 'raganything[all]'   # All optional features
pip install 'raganything[image]' # Image format conversion
pip install 'raganything[text]'  # Text file processing
Option 2: Install from Source
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/HKUDS/RAG-Anything.git
cd RAG-Anything
uv sync
Run commands with uv
uv run python examples/raganything_example.py --help

🚀 Usage

import asyncio
from raganything import RAGAnything, RAGAnythingConfig
from lightrag.llm.openai import openai_complete_if_cache, openai_embed

async def main():
    config = RAGAnythingConfig(
        working_dir="./rag_storage",
        parser="mineru",
        parse_method="auto",
        enable_image_processing=True,
        enable_table_processing=True,
        enable_equation_processing=True,
    )
    rag = RAGAnything(config)
    # Add documents and query
    await rag.ainsert("path/to/document.pdf")
    result = await rag.aquery("What is the main finding?")
    print(result)

asyncio.run(main())

❓ FAQ

What document formats are supported?

PDFs, Office documents (DOC/DOCX/PPT/PPTX/XLS/XLSX), images, and text files (TXT, MD) are supported, with optional dependencies for image and text formats.

Do I need to install MinerU separately?

MinerU is integrated and used as the default parser. You can verify installation with mineru --version and check via the RAGAnything class.

Can I use my own LLM and vision models?

Yes, you can define custom model functions for LLM and vision, as shown in the usage example, by passing them to the configuration.

How does RAG-Anything handle images in documents?

It uses a vision model to generate context-aware captions and integrates them into the knowledge graph, enabling multimodal queries.

📊 Repository

Stars★ 23,220
Forks🍴 2,690
Open issues🐛 96
Last commit🕒 Sep 2, 2026
Created📅 Jun 2025
Language💻 Python
License⚖️ MIT

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.