{"_id":"@boazlai/n8n-nodes-lightrag","_rev":"4-e1141f4099f3ea26ad70eba242bc5e28","name":"@boazlai/n8n-nodes-lightrag","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@boazlai/n8n-nodes-lightrag","version":"0.1.0","keywords":["n8n-community-node-package","n8n","lightrag","rag","knowledge-graph","cosmosdb","mongodb"],"author":{"name":"boazlai","email":"game94049@gmail.com"},"license":"MIT","_id":"@boazlai/n8n-nodes-lightrag@0.1.0","maintainers":[{"name":"boazlai","email":"game94049@gmail.com"}],"homepage":"https://github.com/boazlai/n8n-nodes-lightrag","bugs":{"url":"https://github.com/boazlai/n8n-nodes-lightrag/issues"},"n8n":{"nodes":["dist/nodes/LightRAG/LightRAG.node.js","dist/nodes/LightRAGTool/LightRAGTool.node.js"],"strict":true,"credentials":["dist/credentials/LightRAGCosmosDB.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"1af9b281e943c42a94e4baa467a4eb90a834eb85","tarball":"https://registry.npmjs.org/@boazlai/n8n-nodes-lightrag/-/n8n-nodes-lightrag-0.1.0.tgz","fileCount":27,"integrity":"sha512-KVDBBC4j0bKa68BiyHAs+BbUYIbVe+gPcXN7D8/R9kjR6s9bwF7IAgvfkdJntTX2PMdqJYRUORi33fVQAfuUKw==","signatures":[{"sig":"MEQCIEIAfXKaXpK+ltT1dNVycqRMWVzsjByyPS6zJSDzuPRXAiANEywWSXi6PKlhJL9XvP7rHisV2NIikMzDe/LvYjNdlw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":235180},"gitHead":"a2e4e25603bae221d2d393e8c5cfee4ad49fe166","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","build":"node -e \"require('fs').rmSync('dist',{ recursive: true, force: true })\" && n8n-node build","release":"n8n-node release","lint:fix":"n8n-node lint --fix","build:watch":"tsc --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"boazlai","email":"game94049@gmail.com"},"repository":{"url":"git+https://github.com/boazlai/n8n-nodes-lightrag.git","type":"git"},"_npmVersion":"11.4.2","description":"n8n community node for LightRAG Knowledge Graph indexing and retrieval via CosmosDB vCore","directories":{},"_nodeVersion":"22.16.0","dependencies":{"mongodb":"^6.21.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.32.0","prettier":"3.6.2","release-it":"^19.0.4","typescript":"5.9.2","@n8n/node-cli":"*"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-lightrag_0.1.0_1775668474768_0.3594138603053576","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@boazlai/n8n-nodes-lightrag","version":"0.2.0","keywords":["n8n-community-node-package","n8n","lightrag","rag","knowledge-graph","cosmosdb","mongodb"],"author":{"name":"boazlai","email":"game94049@gmail.com"},"license":"MIT","_id":"@boazlai/n8n-nodes-lightrag@0.2.0","maintainers":[{"name":"boazlai","email":"game94049@gmail.com"}],"homepage":"https://github.com/boazlai/n8n-nodes-lightrag","bugs":{"url":"https://github.com/boazlai/n8n-nodes-lightrag/issues"},"n8n":{"nodes":["dist/nodes/LightRAG/LightRAG.node.js","dist/nodes/LightRAGTool/LightRAGTool.node.js"],"strict":true,"credentials":["dist/credentials/LightRAGCosmosDB.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"90ba26170ebcc23be6561d91e2ab4c7de87b33d4","tarball":"https://registry.npmjs.org/@boazlai/n8n-nodes-lightrag/-/n8n-nodes-lightrag-0.2.0.tgz","fileCount":27,"integrity":"sha512-4NaZX6r+ncHcpCgL49Nt7aInwe9K1sVuck9/zEmPZw/K014pwYSQAExz2Xd2G6Q/rQQGSO5zPKX2isVoGOw6Dg==","signatures":[{"sig":"MEUCIC/t8qGjlmgPUHxFndezDcdEp/SzZXDLxPjjPXbIyBTSAiEAiXLKjqWF8LeoKWBzmPuATFrZ0IqWzYEwp/31k/4r5co=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":266465},"gitHead":"acdedc0c86d9ae4b7abbf51bb1155c89c44d0aaf","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","build":"node -e \"require('fs').rmSync('dist',{ recursive: true, force: true })\" && n8n-node build","release":"n8n-node release","lint:fix":"n8n-node lint --fix","build:watch":"tsc --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"boazlai","email":"game94049@gmail.com"},"repository":{"url":"git+https://github.com/boazlai/n8n-nodes-lightrag.git","type":"git"},"_npmVersion":"10.9.7","description":"n8n community node for LightRAG Knowledge Graph indexing and retrieval via CosmosDB vCore","directories":{},"_nodeVersion":"22.22.2","dependencies":{"mongodb":"^6.21.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.32.0","prettier":"3.6.2","release-it":"^19.0.4","typescript":"5.9.2","@n8n/node-cli":"*"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-lightrag_0.2.0_1776226194543_0.26217393976487924","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@boazlai/n8n-nodes-lightrag","version":"0.2.1","keywords":["n8n-community-node-package","n8n","lightrag","rag","knowledge-graph","cosmosdb","mongodb"],"author":{"name":"boazlai","email":"game94049@gmail.com"},"license":"MIT","_id":"@boazlai/n8n-nodes-lightrag@0.2.1","maintainers":[{"name":"boazlai","email":"game94049@gmail.com"}],"homepage":"https://github.com/boazlai/n8n-nodes-lightrag","bugs":{"url":"https://github.com/boazlai/n8n-nodes-lightrag/issues"},"n8n":{"nodes":["dist/nodes/LightRAG/LightRAG.node.js","dist/nodes/LightRAGTool/LightRAGTool.node.js"],"strict":true,"credentials":["dist/credentials/LightRAGCosmosDB.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"e6de674ad4c2df0d7008d650c8b516cf01578a93","tarball":"https://registry.npmjs.org/@boazlai/n8n-nodes-lightrag/-/n8n-nodes-lightrag-0.2.1.tgz","fileCount":27,"integrity":"sha512-fwaj78OIWGk/FLD9gdGxyxyujWGHzge5CJ3rKHY44BgEebeotaQJOe9nlB5PQInly625C/BywVq/d2zWDFs37A==","signatures":[{"sig":"MEYCIQDXk5OR267E7px6b6X70vcGU7WUrbatBtwexlgO3t1ZlgIhAPDYrCkweqCGP7GrE4FWWmsfR235RIBJjWa5J61MEUpc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":268673},"gitHead":"acdedc0c86d9ae4b7abbf51bb1155c89c44d0aaf","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","build":"node -e \"require('fs').rmSync('dist',{ recursive: true, force: true })\" && n8n-node build","release":"n8n-node release","lint:fix":"n8n-node lint --fix","build:watch":"tsc --watch","prepublishOnly":"npm run build"},"_npmUser":{"name":"boazlai","email":"game94049@gmail.com"},"repository":{"url":"git+https://github.com/boazlai/n8n-nodes-lightrag.git","type":"git"},"_npmVersion":"10.9.7","description":"n8n community node for LightRAG Knowledge Graph indexing and retrieval via CosmosDB vCore","directories":{},"_nodeVersion":"22.22.2","dependencies":{"mongodb":"^6.21.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.32.0","prettier":"3.6.2","release-it":"^19.0.4","typescript":"5.9.2","@n8n/node-cli":"*"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-lightrag_0.2.1_1776226507297_0.3995034538138087","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@boazlai/n8n-nodes-lightrag","version":"0.2.2","description":"n8n community node for LightRAG Knowledge Graph indexing and retrieval via CosmosDB vCore","license":"MIT","homepage":"https://github.com/boazlai/n8n-nodes-lightrag","keywords":["n8n-community-node-package","n8n","lightrag","rag","knowledge-graph","cosmosdb","mongodb"],"author":{"name":"boazlai","email":"game94049@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/boazlai/n8n-nodes-lightrag.git"},"bugs":{"url":"https://github.com/boazlai/n8n-nodes-lightrag/issues"},"scripts":{"build":"node -e \"require('fs').rmSync('dist',{ recursive: true, force: true })\" && n8n-node build","build:watch":"tsc --watch","dev":"n8n-node dev","lint":"n8n-node lint","lint:fix":"n8n-node lint --fix","release":"n8n-node release","prepublishOnly":"npm run build"},"n8n":{"n8nNodesApiVersion":1,"strict":true,"credentials":["dist/credentials/LightRAGCosmosDB.credentials.js"],"nodes":["dist/nodes/LightRAG/LightRAG.node.js","dist/nodes/LightRAGTool/LightRAGTool.node.js"]},"dependencies":{"mongodb":"^6.21.0"},"devDependencies":{"@n8n/node-cli":"*","eslint":"9.32.0","prettier":"3.6.2","release-it":"^19.0.4","typescript":"5.9.2"},"peerDependencies":{"n8n-workflow":"*"},"_id":"@boazlai/n8n-nodes-lightrag@0.2.2","gitHead":"975c8a8f81241650fcf8ace4f2e2976e02842486","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-BUZVFegODBrYIQTx0Uel0lDhIraPX3I2f42ZQCB/8Au6vksFWq5bX4Ptspa/vUCdzrsOGOzSjmFe5fvaRbMBag==","shasum":"e6cde901eed8cdb0a394c4dcb84a65798d59dfa7","tarball":"https://registry.npmjs.org/@boazlai/n8n-nodes-lightrag/-/n8n-nodes-lightrag-0.2.2.tgz","fileCount":27,"unpackedSize":266888,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFN032GQu80dZJt2ghHCOiFNFrjIfVzTKBKLm+5f0N3WAiA2bhO+Y9AWLuvhAeH9ftqNKyRXgMRk8I94Q1EXPgI7Zg=="}]},"_npmUser":{"name":"boazlai","email":"game94049@gmail.com"},"directories":{},"maintainers":[{"name":"boazlai","email":"game94049@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-lightrag_0.2.2_1776228742378_0.7575131402486759"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T17:14:34.653Z","modified":"2026-04-15T04:52:22.662Z","0.1.0":"2026-04-08T17:14:35.014Z","0.2.0":"2026-04-15T04:09:54.702Z","0.2.1":"2026-04-15T04:15:07.496Z","0.2.2":"2026-04-15T04:52:22.547Z"},"bugs":{"url":"https://github.com/boazlai/n8n-nodes-lightrag/issues"},"author":{"name":"boazlai","email":"game94049@gmail.com"},"license":"MIT","homepage":"https://github.com/boazlai/n8n-nodes-lightrag","keywords":["n8n-community-node-package","n8n","lightrag","rag","knowledge-graph","cosmosdb","mongodb"],"repository":{"type":"git","url":"git+https://github.com/boazlai/n8n-nodes-lightrag.git"},"description":"n8n community node for LightRAG Knowledge Graph indexing and retrieval via CosmosDB vCore","maintainers":[{"name":"boazlai","email":"game94049@gmail.com"}],"readme":"# n8n-nodes-lightrag\n\nThis package provides n8n community nodes for LightRAG-style knowledge graph indexing and retrieval backed by Azure Cosmos DB for MongoDB vCore.\n\nIt currently includes two nodes:\n\n- `LightRAG`: a standard workflow node for indexing, querying, deleting documents, inspecting graph stats, and initializing a database.\n- `LightRAG Tool`: an AI Agent tool node that performs hybrid knowledge-graph retrieval and returns structured entities, relations, and chunks directly to the agent.\n\n## Installation\n\nFollow the [n8n community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/), then install:\n\n```bash\nnpm install @boazlai/n8n-nodes-lightrag\n```\n\n## Operations\n\nThe `LightRAG` node supports:\n\n- `Insert Text`\n- `Insert Chunks`\n- `Query`\n- `Create Database`\n- `Delete Document`\n- `Graph Stats`\n\nThe `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.\n\nRetrieval modes available on both nodes:\n\n| Mode          | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| Hybrid KG     | Hybrid chunk retrieval + knowledge graph expansion (default) |\n| Hybrid Chunks | Hybrid vector + full-text chunk retrieval only               |\n| KG + Vector   | Entity vector retrieval + graph context                      |\n| Naive         | Vector chunk retrieval only                                  |\n| Entity Only   | Entity vector retrieval only                                 |\n\nThe tool node returns three structured fields to the agent per invocation:\n\n- `entities` — matched knowledge-graph entities (name, type, description)\n- `relations` — matched graph relations (source, target, description, weight)\n- `chunks` — matched document chunks (docId, chunkIndex, content, chunkDoc metadata)\n\n## Credentials\n\nUse the `LightRAG Cosmos DB` credential with:\n\n- a MongoDB connection string for Azure Cosmos DB for MongoDB vCore\n- a default workspace name\n\nThe database is selected on the node itself so one credential can be reused across multiple databases.\n\n## Usage Notes\n\n- `Create Database` initializes the collections required by the node.\n- Query can combine vector retrieval, full-text retrieval, and graph augmentation.\n- The tool node is intended for agent flows where you want structured retrieval results instead of a final generated answer.\n- 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.\n- Connect an Embeddings model to the `Embeddings` input and optionally a Reranker to the `Reranker` input.\n\n## Resources\n\n- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)\n- [LightRAG](https://github.com/HKUDS/LightRAG)\n- [Repository](https://github.com/boazlai/n8n-nodes-lightrag)\n\n## Version History\n\n### 0.2.0\n\n- **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).\n- **LightRAG Tool**: switched from `DynamicTool` to `DynamicStructuredTool` with a plain JSON Schema — fixes `Bad request` errors from OpenAI caused by Zod cross-instance mismatches.\n- **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.\n- **LightRAG Tool**: embeddings and reranker connections are resolved inside `execute()` on each invocation rather than being captured in a closure at setup time.\n\n### 0.1.0\n\nInitial release with standard LightRAG and LightRAG Tool nodes for Cosmos DB MongoDB vCore.\n","readmeFilename":"README.md"}