feat: adiciona 12 plugins Descomplicar ao marketplace
Plugins: automacao, crm-ops, design-media, dev-tools, gestao, infraestrutura, marketing, negocio, perfex-dev, project-manager, wordpress + hello-plugin (existente). Totais: 83 skills, 44 agents, 12 datasets.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
279
automacao/skills/n8n-chatbot/SKILL.md
Normal file
279
automacao/skills/n8n-chatbot/SKILL.md
Normal file
@@ -0,0 +1,279 @@
|
||||
# /n8n-chatbot - Chatbots e AI Agents n8n
|
||||
|
||||
Criar chatbots e workflows com AI usando LangChain.
|
||||
|
||||
---
|
||||
|
||||
## Uso
|
||||
|
||||
```
|
||||
/n8n-chatbot create <descrição> # Criar chatbot
|
||||
/n8n-chatbot agent <tipo> # Criar AI agent
|
||||
/n8n-chatbot rag <knowledge_base> # Criar sistema RAG
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Workflow Obrigatório
|
||||
|
||||
```
|
||||
1. Health check → mcp__n8n__n8n_health_check()
|
||||
2. Pesquisar template → mcp__n8n__search_templates({ task: "ai_automation" })
|
||||
3. Se template OK → mcp__n8n__n8n_deploy_template()
|
||||
4. Se criar do zero → Seguir fluxo abaixo
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Nodes LangChain
|
||||
|
||||
### Core
|
||||
|
||||
| Node | Uso |
|
||||
|------|-----|
|
||||
| `@n8n/n8n-nodes-langchain.agent` | AI Agent principal |
|
||||
| `@n8n/n8n-nodes-langchain.chainLlm` | Chain LLM simples |
|
||||
| `@n8n/n8n-nodes-langchain.chainRetrievalQa` | RAG Q&A |
|
||||
|
||||
### Modelos
|
||||
|
||||
| Node | Provider |
|
||||
|------|----------|
|
||||
| `@n8n/n8n-nodes-langchain.lmChatOpenAi` | OpenAI GPT |
|
||||
| `@n8n/n8n-nodes-langchain.lmChatAnthropic` | Claude |
|
||||
| `@n8n/n8n-nodes-langchain.lmChatOllama` | Ollama local |
|
||||
|
||||
### Memória
|
||||
|
||||
| Node | Tipo |
|
||||
|------|------|
|
||||
| `@n8n/n8n-nodes-langchain.memoryBufferWindow` | Últimas N mensagens |
|
||||
| `@n8n/n8n-nodes-langchain.memoryPostgresChat` | PostgreSQL |
|
||||
| `@n8n/n8n-nodes-langchain.memoryRedisChat` | Redis |
|
||||
|
||||
### Tools
|
||||
|
||||
| Node | Função |
|
||||
|------|--------|
|
||||
| `@n8n/n8n-nodes-langchain.toolCalculator` | Cálculos |
|
||||
| `@n8n/n8n-nodes-langchain.toolCode` | Executar código |
|
||||
| `@n8n/n8n-nodes-langchain.toolHttpRequest` | Chamar APIs |
|
||||
| `@n8n/n8n-nodes-langchain.toolWorkflow` | Chamar workflows |
|
||||
|
||||
### Vector Stores (RAG)
|
||||
|
||||
| Node | Sistema |
|
||||
|------|---------|
|
||||
| `@n8n/n8n-nodes-langchain.vectorStoreSupabase` | Supabase |
|
||||
| `@n8n/n8n-nodes-langchain.vectorStorePinecone` | Pinecone |
|
||||
| `@n8n/n8n-nodes-langchain.vectorStorePgVector` | PostgreSQL |
|
||||
|
||||
---
|
||||
|
||||
## Chatbot Básico
|
||||
|
||||
### Estrutura
|
||||
|
||||
```
|
||||
Webhook/Trigger
|
||||
↓
|
||||
LLM Chat Model (OpenAI/Claude)
|
||||
↓
|
||||
Memory (Buffer)
|
||||
↓
|
||||
Agent
|
||||
↓
|
||||
Resposta
|
||||
```
|
||||
|
||||
### Implementação
|
||||
|
||||
```javascript
|
||||
// 1. Modelo LLM
|
||||
mcp__n8n__get_node({
|
||||
nodeType: "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
detail: "standard"
|
||||
})
|
||||
|
||||
// 2. Memória
|
||||
mcp__n8n__get_node({
|
||||
nodeType: "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
detail: "standard"
|
||||
})
|
||||
|
||||
// 3. Agent
|
||||
mcp__n8n__get_node({
|
||||
nodeType: "@n8n/n8n-nodes-langchain.agent",
|
||||
detail: "standard"
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## RAG (Retrieval Augmented Generation)
|
||||
|
||||
### Estrutura
|
||||
|
||||
```
|
||||
Documentos
|
||||
↓
|
||||
Embeddings
|
||||
↓
|
||||
Vector Store
|
||||
↓
|
||||
Query (pergunta)
|
||||
↓
|
||||
Retriever
|
||||
↓
|
||||
LLM (resposta contextualizada)
|
||||
```
|
||||
|
||||
### Configuração Vector Store
|
||||
|
||||
```javascript
|
||||
mcp__n8n__validate_node({
|
||||
nodeType: "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
|
||||
config: {
|
||||
mode: "insert", // ou "retrieve"
|
||||
tableName: "documents",
|
||||
queryName: "match_documents"
|
||||
},
|
||||
mode: "minimal"
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## AI Agent com Tools
|
||||
|
||||
### Estrutura
|
||||
|
||||
```
|
||||
Input
|
||||
↓
|
||||
Agent
|
||||
├── Tool: Calculator
|
||||
├── Tool: HTTP Request
|
||||
├── Tool: Code
|
||||
└── Tool: Workflow
|
||||
↓
|
||||
Output
|
||||
```
|
||||
|
||||
### Configuração Agent
|
||||
|
||||
```javascript
|
||||
mcp__n8n__validate_node({
|
||||
nodeType: "@n8n/n8n-nodes-langchain.agent",
|
||||
config: {
|
||||
agentType: "conversationalAgent",
|
||||
systemMessage: "Tu és um assistente prestável...",
|
||||
options: {
|
||||
returnIntermediateSteps: true
|
||||
}
|
||||
},
|
||||
mode: "minimal"
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Exemplos Práticos
|
||||
|
||||
### Chatbot de Suporte
|
||||
|
||||
```
|
||||
Webhook (mensagem cliente)
|
||||
↓
|
||||
Memory PostgreSQL (histórico)
|
||||
↓
|
||||
Vector Store (docs suporte)
|
||||
↓
|
||||
Chain Retrieval QA
|
||||
↓
|
||||
Webhook Response
|
||||
```
|
||||
|
||||
### Agent CRM
|
||||
|
||||
```
|
||||
Webhook (comando)
|
||||
↓
|
||||
Agent
|
||||
├── Tool: Pesquisar clientes
|
||||
├── Tool: Criar lead
|
||||
└── Tool: Actualizar tarefa
|
||||
↓
|
||||
Slack (resultado)
|
||||
```
|
||||
|
||||
### Resumo de Documentos
|
||||
|
||||
```
|
||||
Webhook (upload PDF)
|
||||
↓
|
||||
PDF Extract
|
||||
↓
|
||||
Text Splitter
|
||||
↓
|
||||
LLM Chain (resumo)
|
||||
↓
|
||||
Email (enviar resumo)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Templates Recomendados
|
||||
|
||||
```javascript
|
||||
// AI templates
|
||||
mcp__n8n__search_templates({
|
||||
searchMode: "by_task",
|
||||
task: "ai_automation"
|
||||
})
|
||||
|
||||
// Por keyword
|
||||
mcp__n8n__search_templates({
|
||||
searchMode: "keyword",
|
||||
query: "chatbot langchain openai"
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Credenciais Necessárias
|
||||
|
||||
| Provider | Credencial | Node |
|
||||
|----------|------------|------|
|
||||
| OpenAI | API Key | lmChatOpenAi |
|
||||
| Anthropic | API Key | lmChatAnthropic |
|
||||
| Supabase | URL + Key | vectorStoreSupabase |
|
||||
| Pinecone | API Key | vectorStorePinecone |
|
||||
|
||||
---
|
||||
|
||||
## Boas Práticas
|
||||
|
||||
| Prática | Razão |
|
||||
|---------|-------|
|
||||
| System prompt claro | Define comportamento |
|
||||
| Temperatura baixa (0.1-0.3) | Respostas consistentes |
|
||||
| Memória limitada | Performance |
|
||||
| Retry on error | Resiliência |
|
||||
| Logs de conversas | Debug e melhoria |
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Problema | Solução |
|
||||
|----------|---------|
|
||||
| Respostas inconsistentes | Baixar temperatura |
|
||||
| Contexto perdido | Verificar memória |
|
||||
| RAG não encontra | Verificar embeddings |
|
||||
| Timeout | Aumentar limite |
|
||||
| Token limit | Resumir contexto |
|
||||
|
||||
---
|
||||
|
||||
*Skill v1.0 | Descomplicar®*
|
||||
Reference in New Issue
Block a user