insecure-default. The server binds to all interfaces by default and every endpoint is public without auth, so configure authentication or bind to 127.0.0.1 first.
Who it is forA researcher who wants answers that connect people, companies and events across many documents.
The problemPlain vector RAG returns fragments and misses how entities relate across files.
The outcomeA local LightRAG server where you insert documents, ask questions and see the knowledge graph.
What you need first
- Python with uv (recommended) or pip, or Docker Compose
- An LLM and an embedding model configured in .env
- Optional: storage backends such as PostgreSQL, Neo4j or OpenSearch
Steps
- Install the server as a tool with
uv tool install "lightrag-hku[api]" - Copy the example config with
cp env.example .envand set your LLM and embedding settings - Start it with
lightrag-server - Open the WebUI to insert documents, query them and visualize the graph
- Before exposing it on a network, set LIGHTRAG_API_KEY or AUTH_ACCOUNTS with TOKEN_SECRET in .env
Prompt for your agent
Install HKUDS/LightRAG Server with uv, configure .env for <LLM> and <embedding model>, bind it to 127.0.0.1, and load <documents>. Then ask <question> and show me the entities and relations it used.
Caveat. Graph extraction quality depends heavily on the LLM; the README notes improvements for open models such as Qwen3-30B-A3B.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for HKUDS/LightRAG and "Run a knowledge-graph RAG server with a web UI"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer