@catalogicus-international/n8n-nodes-light-rag
v0.1.4
Published
n8n workflow and AI Agent tool nodes for the LightRAG API server
Maintainers
Readme
@catalogicus-international/n8n-nodes-light-rag
An n8n community package that exposes a LightRAG API server to regular workflows and AI Agents.
Nodes
LightRAG
Use LightRAG in a regular n8n workflow. It has standard Main input and output
connections and processes every incoming item.
Choose an operation in the node UI. Operations that send JSON use the complete current
input item ({{$json}}) as the request body by default. For example, an input item for
the Query operation can be:
{
"query": "What does the knowledge base say about LightRAG?",
"mode": "mix",
"include_references": true
}You can replace the Request Body expression with a manually configured object or map individual fields from previous nodes. Responses are emitted through the normal Main output and retain n8n item pairing.
LightRAG Tool
Connect LightRAG Tool to the tool input of an n8n AI Agent. This node is dedicated
to querying the knowledge base, so the agent only sees one required Query field.
The endpoint is always POST /query.
Query the knowledge base:
{
"query": "What does the knowledge base say about LightRAG?"
}Use Add Field in the node UI to add optional request body parameters such as Mode,
Include References, and Include Chunk Content. The configured values are merged
with the agent's query automatically.
The regular LightRAG workflow node retains the full operation list for document
management and custom requests, but is not exposed as an AI Agent tool.
Supported operations
query—POST /query;queryData—POST /query/data;insertText—POST /documents/text;insertTexts—POST /documents/texts;trackStatus—GET /documents/track_status/{track_id};pipelineStatus—GET /documents/pipeline_status;listDocuments—POST /documents/paginated;scanDocuments—POST /documents/scan;deleteDocuments—DELETE /documents/delete_document;health—GET /health;customRequest— a request to any relative LightRAG API path.
Example custom request:
{
"operation": "customRequest",
"method": "GET",
"path": "documents/status_counts",
"queryParameters": {}
}Only relative paths are accepted, so credentials cannot be forwarded to another host.
Query modes
The query operations support LightRAG modes local, global, hybrid, naive,
mix, and bypass. mix is the LightRAG-recommended general-purpose mode.
All request fields supported by the LightRAG API can be passed in body, including
response_type, top_k, chunk_top_k, token budgets, keyword lists,
conversation_history, user_prompt, reranking options, and reference options.
Credentials
Create a LightRAG API credential:
Base URL: normallyhttp://localhost:9621;Authentication:API Key,Bearer Token, orNone;- API key authentication is sent using
X-API-Key; - include a configured reverse-proxy API prefix in the Base URL when applicable.
Development
pnpm install
pnpm run lint
pnpm test