LightRAG

Updated Published

LightRAG is an MIT-licensed knowledge-graph RAG framework from HKUDS that stores a graph and vector embeddings together, with incremental updates, document deletion, citations and a server with a web UI.

LightRAG is the HKUDS project at github.com/HKUDS/LightRAG, published at EMNLP 2025. It describes itself as an alternative to Microsoft GraphRAG, which has its own profile.

Best for: teams that want a self-hosted graph RAG they can keep updating and query from several apps over REST

LightRAG official site

What is LightRAG?

LightRAG is an open-source, MIT-licensed knowledge-graph RAG framework from HKUDS. It keeps a knowledge graph and vector embeddings side by side, and describes itself as a lightweight, efficient alternative to Microsoft GraphRAG.

Compared with GraphRAG, which can also update an index incrementally and reference its sources, LightRAG adds document deletion with graph regeneration and a server with a web UI and REST API. It runs only where you host it, and its defaults are for testing, so production use needs a database such as PostgreSQL.

How does LightRAG work?

  1. You run LightRAG as a Python library, as LightRAG Server, or with Docker Compose, and choose storage backends such as PostgreSQL, MongoDB, OpenSearch, Neo4j or Memgraph.
  2. Documents are uploaded or inserted and parsed with MinerU, Docling or the native parser.
  3. An LLM extracts entities and relations into the knowledge graph, and text is embedded into the vector store.
  4. Queries combine graph and vector retrieval, and answers can carry citations back to source documents.
  5. New documents update the graph incrementally. Deleting a document regenerates the affected graph.

How much does LightRAG cost?

As of 30 October 2026, LightRAG is free under the MIT licence with no hosted plan. You pay for the LLM, the embedding model and the databases you run it on.

Who is LightRAG for, and who is it not for?

LightRAG suits an engineering team that wants self-hosted graph RAG over documents that change, with citations and a REST server that several applications can share, and is prepared to run and secure its own database.

It fits poorly if you want a managed service, vendor support or compliance statements, or if agents need time-aware facts or a review step before knowledge is used. Teams that may change embedding models later should plan for a full re-embed.

What does LightRAG do well?

  • Incremental updates and selective deletion, with the knowledge graph regenerated automatically after a document is removed
  • Citation support for source attribution and document traceability
  • A ready server with a web UI and REST API, so several apps can query one store
  • Production backends documented: PostgreSQL on its own, MongoDB or OpenSearch, with Neo4j or Memgraph for the graph
  • MIT licence and active development (last push 29 October 2026); document parsing through MinerU, Docling or a native parser

LightRAG on our criteria

LightRAG: what we found, by criterion
CriterionWhat we found
Pricing Free MIT software, and we found no paid plan; the README says it needs LLMs in four roles, an embedding model and four types of backend storage, which you supply Verified
Free plan The whole project is free: the MIT licence grants use free of charge Verified
Open source MIT (HKUDS/LightRAG) Verified
Human approval Not publicly documented
Cites sources Yes: the README says it supports citation functionality for source attribution and document traceability Verified
Versioning and history Not publicly documented
Shared across agents Any client of the LightRAG Server REST API reads and writes the same store Verified
Context graph Yes: a knowledge graph of entities and relations kept alongside vector embeddings, stored in Neo4j, Memgraph, PostgreSQL, MongoDB or OpenSearch Verified
Enterprise sources Not publicly documented
Deployment Self-hosted: Python package, LightRAG Server, or Docker Compose; no hosted service Verified
Compliance Not publicly documented
Interface Python library, REST API, and a WebUI (/webui for admin, /workspace for queries) Verified

What are LightRAG's limits?

  • The default storage is meant only for small-scale testing and the README says it is not suitable for production, so you must set up a database
  • Changing the embedding model means re-embedding every chunk, entity and relationship; the README points to a `lightrag-rebuild-vdb` command for this, which needs the server stopped
  • Server endpoints are public unless you configure auth, and hiding the admin UI is not a security boundary
  • We found no temporal model for facts (what was true when) and no approval step for extracted entities and relations, and we found no user- or agent-level memory scopes (only workspace isolation)
  • We found no mention of an MCP server, a hosted service or connectors to company sources; documents are uploaded or inserted

Mentioned in

FAQ

Is LightRAG ready for production?

Its defaults are not. The README says the default stores are intended only for small-scale testing and are not suitable for production, and recommends PostgreSQL, which can serve all four storage types on its own. You also need to configure auth, since without it every endpoint is public.

Can LightRAG delete or update documents?

Yes. The README lists incremental updates and selective deletion, and says document deletion triggers automatic knowledge graph regeneration. We found no mention of a version history for graph content or a way to roll back a deletion, so keep your own copies of source documents.

LightRAG vs Graphiti?

Both are open source and build a knowledge graph for retrieval. Graphiti, Zep's Apache-2.0 framework, stores time-stamped facts so agents can ask what was true at a point in time; we found no temporal fact model in LightRAG. LightRAG focuses on documents, with citations, deletion and a web UI and REST server.

Sources checked

Show 3 sources