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

@fabricaia/n8n-nodes-rag

v1.0.1

Published

n8n community node for RAG Knowledge Base System

Readme

n8n RAG Knowledge Base Node

Node customizado do n8n para integração simplificada com o sistema RAG Knowledge Base.

🚀 Instalação

⭐ Instalação via npm (RECOMENDADO - Mais Fácil!)

cd ~/.n8n/custom
npm install @rag-system/n8n-nodes-rag

Depois, reinicie o n8n. Pronto! ✅

Opção 2: Instalação manual (se npm não funcionar)

  1. Clone este repositório
  2. Execute npm install na pasta n8n-node-rag
  3. Execute npm run build
  4. Copie a pasta n8n-node-rag para a pasta custom do seu n8n

📖 Como Usar

1. Configurar Credenciais

  1. No n8n, vá em CredentialsAdd Credential
  2. Procure por "RAG API"
  3. Preencha:
    • API URL: URL da sua instalação (ex: https://seu-app.easypanel.host)
    • API Key: Sua chave API (começa com sk_)
  4. Clique em Test para verificar a conexão
  5. Salve as credenciais

2. Adicionar o Node

  1. No seu workflow, clique em + para adicionar um node
  2. Procure por "RAG Knowledge Base"
  3. Arraste o node para o canvas

3. Operações Disponíveis

Query Knowledge Base (Consultar Base de Conhecimento)

  • Knowledge Base: Dropdown que lista automaticamente suas bases ativas
  • Query: Sua pergunta ou busca
  • Top K Results: Número de resultados (1-20, padrão: 5)

Saída:

{
  "answer": "Resposta da IA baseada nos documentos...",
  "sources": [
    {
      "documentId": 123,
      "chunkId": 456,
      "content": "Trecho relevante...",
      "similarity": 0.92
    }
  ],
  "knowledgeBase": {
    "id": 1,
    "name": "Minha Base"
  }
}

List Knowledge Bases (Listar Bases)

Lista todas as bases de conhecimento disponíveis.

Saída:

{
  "knowledgeBases": [
    {
      "id": 1,
      "name": "Base 1",
      "description": "Descrição...",
      "isActive": true
    }
  ],
  "count": 1
}

🎯 Exemplos de Uso

Exemplo 1: Chatbot com RAG

Webhook → RAG Query → Respond to Webhook

Exemplo 2: Busca Automatizada

Schedule Trigger → RAG Query → Send Email

Exemplo 3: Integração com WhatsApp

WhatsApp Trigger → RAG Query → WhatsApp Send

🔧 Desenvolvimento

# Instalar dependências
npm install

# Compilar TypeScript
npm run build

# Modo desenvolvimento (watch)
npm run dev

# Lint
npm run lint

# Formatar código
npm run format

📝 Estrutura

n8n-node-rag/
├── credentials/          # Definição de credenciais
│   └── RAGApi.credentials.ts
├── nodes/                 # Nodes customizados
│   └── RAG/
│       └── RAG.node.ts
├── package.json
├── tsconfig.json
└── README.md

🐛 Troubleshooting

Erro: "Invalid API key"

  • Verifique se a API Key está correta
  • Certifique-se de que a API Key está ativa no sistema RAG

Erro: "Knowledge base not found"

  • Verifique se a base de conhecimento está ativa
  • Certifique-se de que você tem permissão para acessar a base

Dropdown de bases vazio

  • Verifique se você tem bases de conhecimento criadas
  • Certifique-se de que pelo menos uma base está ativa
  • Verifique a conexão com a API

📄 Licença

MIT

🤝 Contribuindo

Contribuições são bem-vindas! Por favor, abra uma issue ou pull request.