lightrag-hku
LightRAG: Simple and Fast Retrieval-Augmented Generation
Decision gist · record as of 2026-08-14
Yes. LightRAG is actively maintained, has no known vulnerabilities, installs with low friction, and offers a mature feature set (knowledge graphs, multimodal parsing, multiple backends, evaluation integration). The MIT license is permissive. Install it if you need a production-ready RAG framework with flexibility in storage and LLM choice; skip it only if you need a simpler, lighter-weight alternative or have strict offline requirements without pre-configured backends.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10.
- LLM and embedding provider credentials (e.g., Google GenAI API key) must be configured via .env file before queries will work.
- Low install friction with a wheel distribution.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions beyond attribution.
last release 2026-08-06 (8 days) · last repo commit 2026-08-13 · 38,864 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 277,360 downloads/mo, #8,147 on PyPI
Alternatives
Verify before relying
pip install 'lightrag-hku[api]'
from lightrag import LightRAG
rag = LightRAG(working_dir="./rag_storage")
rag.insert("Your document text here")
result = rag.query("Your question here")- Whether the package works offline or requires live API calls to external LLM/embedding providers by default.
- Performance characteristics (latency, throughput) for typical document sizes and query patterns.
- Storage backend requirements and whether nano-vectordb is sufficient for production use or if PostgreSQL/Neo4j/MongoDB are recommended.
- Whether multimodal support (images, tables, equations) requires additional system dependencies beyond Python packages.
What it is and what it does
LightRAG is a Python framework for building retrieval-augmented generation (RAG) systems that combine knowledge graph extraction with semantic search. It ingests documents, extracts entities and relationships into a graph structure, and answers queries by retrieving relevant context from that graph and passing it to an LLM for synthesis. The package supports multiple storage backends (PostgreSQL, Neo4j, MongoDB, OpenSearch, nano-vectordb), multiple LLM providers (Google GenAI, OpenAI-compatible APIs), and multimodal document parsing (text, images, tables, PDFs).
The framework is designed for developers building question-answering systems, document analysis pipelines, or knowledge management applications. It handles chunking strategy selection, role-specific LLM configuration (separate models for extraction, querying, keyword generation, and vision tasks), reranking, and citation tracking. Installation is straightforward via pip, and a web UI and Docker Compose deployment option are available for rapid prototyping.
Use it for
- Build a Q&A system over internal documentation or knowledge bases by ingesting PDFs and Office documents, then querying them with natural language.
- Extract structured knowledge graphs from unstructured text to support downstream analytics, recommendation, or compliance workflows.
- Deploy a multimodal RAG service that processes mixed document types (text, images, tables) and returns cited answers with source traceability.
- Evaluate RAG quality using integrated RAGAS evaluation and trace query execution with Langfuse for debugging and optimization.
- Run a local RAG server with Docker Compose using open-source LLMs (Qwen, Ollama) and PostgreSQL for air-gapped or privacy-sensitive environments.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
LightRAG is actively maintained, has no known vulnerabilities, installs with low friction, and offers a mature feature set (knowledge graphs, multimodal parsing, multiple backends, evaluation integration). The MIT license is permissive. Install it if you need a production-ready RAG framework with flexibility in storage and LLM choice; skip it only if you need a simpler, lighter-weight alternative or have strict offline requirements without pre-configured backends.
Install
lightrag-hku on PyPI
Before you install
Low install friction with a wheel distribution. Active maintenance with a recent release (8 days old) and strong repository signals (38864 stars, last commit 2026-08-13). Requires Python >=3.10 and pulls in 19 runtime dependencies including aiohttp, pydantic, and google-genai, but all are standard packages.
Requires Python >=3.10. LLM and embedding provider credentials (e.g., Google GenAI API key) must be configured via .env file before queries will work.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects, with minimal restrictions beyond attribution.
Quickstart
pip install 'lightrag-hku[api]'
from lightrag import LightRAG
rag = LightRAG(working_dir="./rag_storage")
rag.insert("Your document text here")
result = rag.query("Your question here")
Verify before relying
- Whether the package works offline or requires live API calls to external LLM/embedding providers by default.
- Performance characteristics (latency, throughput) for typical document sizes and query patterns.
- Storage backend requirements and whether nano-vectordb is sufficient for production use or if PostgreSQL/Neo4j/MongoDB are recommended.
- Whether multimodal support (images, tables, equations) requires additional system dependencies beyond Python packages.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 19 packagesaiohttpconfigparsergoogle-api-coregoogle-genaijson_repairnano-vectordbnetworkxnumpypackagingpandaspipmasterpydanticpypinyinPyYAMLpython-dotenvsetuptoolstenacitytiktokenxlsxwriter |
| Maintenance | Actively maintained 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 277,360 / month, #8,147 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules |
Evidence: lightrag_hku-1.5.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “graph-based information retrieval”
- lightrag-hkuLightRAG is a retrieval-augmented generation framework that builds…
- langchain-graph-retrieverRetrieves documents from a graph structure using vector similarity…
- graph-retrieverCombines vector similarity search with graph traversal over metadata…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also graphrag · FlagEmbedding · neo4j-graphrag · voyageai · langchain-graph-retriever · llama-index-core · langchain-chroma · graph-retriever · llama-index-vector-stores-qdrant · needle-python