npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@boazlai/n8n-nodes-lightrag

v0.2.2

Published

n8n community node for LightRAG Knowledge Graph indexing and retrieval via CosmosDB vCore

Readme

n8n-nodes-lightrag

This package provides n8n community nodes for LightRAG-style knowledge graph indexing and retrieval backed by Azure Cosmos DB for MongoDB vCore.

It currently includes two nodes:

  • LightRAG: a standard workflow node for indexing, querying, deleting documents, inspecting graph stats, and initializing a database.
  • LightRAG Tool: an AI Agent tool node that performs hybrid knowledge-graph retrieval and returns structured entities, relations, and chunks directly to the agent.

Installation

Follow the n8n community nodes installation guide, then install:

npm install @boazlai/n8n-nodes-lightrag

Operations

The LightRAG node supports:

  • Insert Text
  • Insert Chunks
  • Query
  • Create Database
  • Delete Document
  • Graph Stats

The LightRAG Tool node is retrieval-only and designed for AI Agent tool use. It connects directly to the agent's tool bus (AiTool output) alongside an Embeddings model and an optional Reranker.

Retrieval modes available on both nodes:

| Mode | Description | | ------------- | ------------------------------------------------------------ | | Hybrid KG | Hybrid chunk retrieval + knowledge graph expansion (default) | | Hybrid Chunks | Hybrid vector + full-text chunk retrieval only | | KG + Vector | Entity vector retrieval + graph context | | Naive | Vector chunk retrieval only | | Entity Only | Entity vector retrieval only |

The tool node returns three structured fields to the agent per invocation:

  • entities — matched knowledge-graph entities (name, type, description)
  • relations — matched graph relations (source, target, description, weight)
  • chunks — matched document chunks (docId, chunkIndex, content, chunkDoc metadata)

Credentials

Use the LightRAG Cosmos DB credential with:

  • a MongoDB connection string for Azure Cosmos DB for MongoDB vCore
  • a default workspace name

The database is selected on the node itself so one credential can be reused across multiple databases.

Usage Notes

  • Create Database initializes the collections required by the node.
  • Query can combine vector retrieval, full-text retrieval, and graph augmentation.
  • The tool node is intended for agent flows where you want structured retrieval results instead of a final generated answer.
  • The tool node uses a two-phase architecture: supplyData() registers the tool schema with the agent at setup, and execute() runs the actual retrieval at invocation time. This matches the pattern used by native n8n vector store tool nodes.
  • Connect an Embeddings model to the Embeddings input and optionally a Reranker to the Reranker input.

Resources

Version History

0.2.0

  • LightRAG Tool: refactored to the two-phase AiTool architecture matching native n8n vector store tool nodes (supplyData for schema registration, execute for retrieval at runtime).
  • LightRAG Tool: switched from DynamicTool to DynamicStructuredTool with a plain JSON Schema — fixes Bad request errors from OpenAI caused by Zod cross-instance mismatches.
  • LightRAG Tool: execute() now returns structured items (entities, relations, chunks) directly instead of wrapping everything in a JSON string, making results usable in downstream nodes without parsing.
  • LightRAG Tool: embeddings and reranker connections are resolved inside execute() on each invocation rather than being captured in a closure at setup time.

0.1.0

Initial release with standard LightRAG and LightRAG Tool nodes for Cosmos DB MongoDB vCore.