@atom8n/ai-workflow-builder 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/responder.agent.d.ts +21 -0
- package/dist/agents/responder.agent.js +71 -0
- package/dist/agents/responder.agent.js.map +1 -0
- package/dist/agents/supervisor.agent.d.ts +31 -0
- package/dist/agents/supervisor.agent.js +68 -0
- package/dist/agents/supervisor.agent.js.map +1 -0
- package/dist/ai-workflow-builder-agent.service.d.ts +32 -0
- package/dist/ai-workflow-builder-agent.service.js +236 -0
- package/dist/ai-workflow-builder-agent.service.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -0
- package/dist/chains/conversation-compact.d.ts +7 -0
- package/dist/chains/conversation-compact.js +56 -0
- package/dist/chains/conversation-compact.js.map +1 -0
- package/dist/chains/parameter-updater.d.ts +16 -0
- package/dist/chains/parameter-updater.js +112 -0
- package/dist/chains/parameter-updater.js.map +1 -0
- package/dist/chains/prompt-categorization.d.ts +3 -0
- package/dist/chains/prompt-categorization.js +31 -0
- package/dist/chains/prompt-categorization.js.map +1 -0
- package/dist/chains/test/integration/test-helpers.d.ts +3 -0
- package/dist/chains/test/integration/test-helpers.js +16 -0
- package/dist/chains/test/integration/test-helpers.js.map +1 -0
- package/dist/chains/workflow-name.d.ts +4 -0
- package/dist/chains/workflow-name.js +22 -0
- package/dist/chains/workflow-name.js.map +1 -0
- package/dist/constants.d.ts +14 -0
- package/dist/constants.js +18 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors/index.d.ts +52 -0
- package/dist/errors/index.js +137 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/llm-config.d.ts +11 -0
- package/dist/llm-config.js +126 -0
- package/dist/llm-config.js.map +1 -0
- package/dist/multi-agent-workflow-subgraphs.d.ts +122 -0
- package/dist/multi-agent-workflow-subgraphs.js +159 -0
- package/dist/multi-agent-workflow-subgraphs.js.map +1 -0
- package/dist/parent-graph-state.d.ts +27 -0
- package/dist/parent-graph-state.js +47 -0
- package/dist/parent-graph-state.js.map +1 -0
- package/dist/prompts/agents/builder.prompt.d.ts +1 -0
- package/dist/prompts/agents/builder.prompt.js +320 -0
- package/dist/prompts/agents/builder.prompt.js.map +1 -0
- package/dist/prompts/agents/configurator.prompt.d.ts +2 -0
- package/dist/prompts/agents/configurator.prompt.js +143 -0
- package/dist/prompts/agents/configurator.prompt.js.map +1 -0
- package/dist/prompts/agents/discovery.prompt.d.ts +11 -0
- package/dist/prompts/agents/discovery.prompt.js +260 -0
- package/dist/prompts/agents/discovery.prompt.js.map +1 -0
- package/dist/prompts/agents/responder.prompt.d.ts +1 -0
- package/dist/prompts/agents/responder.prompt.js +41 -0
- package/dist/prompts/agents/responder.prompt.js.map +1 -0
- package/dist/prompts/agents/supervisor.prompt.d.ts +1 -0
- package/dist/prompts/agents/supervisor.prompt.js +43 -0
- package/dist/prompts/agents/supervisor.prompt.js.map +1 -0
- package/dist/prompts/builder/index.d.ts +2 -0
- package/dist/prompts/builder/index.js +7 -0
- package/dist/prompts/builder/index.js.map +1 -0
- package/dist/prompts/builder/prompt-builder.d.ts +17 -0
- package/dist/prompts/builder/prompt-builder.js +147 -0
- package/dist/prompts/builder/prompt-builder.js.map +1 -0
- package/dist/prompts/builder/types.d.ts +22 -0
- package/dist/prompts/builder/types.js +3 -0
- package/dist/prompts/builder/types.js.map +1 -0
- package/dist/prompts/chains/categorization.prompt.d.ts +43 -0
- package/dist/prompts/chains/categorization.prompt.js +86 -0
- package/dist/prompts/chains/categorization.prompt.js.map +1 -0
- package/dist/prompts/chains/compact.prompt.d.ts +2 -0
- package/dist/prompts/chains/compact.prompt.js +16 -0
- package/dist/prompts/chains/compact.prompt.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.js +141 -0
- package/dist/prompts/chains/parameter-updater/examples/if-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/index.d.ts +6 -0
- package/dist/prompts/chains/parameter-updater/examples/index.js +16 -0
- package/dist/prompts/chains/parameter-updater/examples/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.js +83 -0
- package/dist/prompts/chains/parameter-updater/examples/resource-locator.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.js +151 -0
- package/dist/prompts/chains/parameter-updater/examples/set-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.js +54 -0
- package/dist/prompts/chains/parameter-updater/examples/simple-updates.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.js +131 -0
- package/dist/prompts/chains/parameter-updater/examples/switch-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.js +74 -0
- package/dist/prompts/chains/parameter-updater/examples/tool-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js +70 -0
- package/dist/prompts/chains/parameter-updater/guides/embedding-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.js +28 -0
- package/dist/prompts/chains/parameter-updater/guides/gmail.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.js +139 -0
- package/dist/prompts/chains/parameter-updater/guides/http-request.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.js +159 -0
- package/dist/prompts/chains/parameter-updater/guides/if-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/index.d.ts +10 -0
- package/dist/prompts/chains/parameter-updater/guides/index.js +24 -0
- package/dist/prompts/chains/parameter-updater/guides/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.js +99 -0
- package/dist/prompts/chains/parameter-updater/guides/resource-locator.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.js +94 -0
- package/dist/prompts/chains/parameter-updater/guides/set-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.js +75 -0
- package/dist/prompts/chains/parameter-updater/guides/switch-node.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.js +96 -0
- package/dist/prompts/chains/parameter-updater/guides/system-message.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.js +31 -0
- package/dist/prompts/chains/parameter-updater/guides/text-fields.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js +76 -0
- package/dist/prompts/chains/parameter-updater/guides/tool-nodes.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/index.d.ts +8 -0
- package/dist/prompts/chains/parameter-updater/index.js +35 -0
- package/dist/prompts/chains/parameter-updater/index.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/instance-url.d.ts +1 -0
- package/dist/prompts/chains/parameter-updater/instance-url.js +15 -0
- package/dist/prompts/chains/parameter-updater/instance-url.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.d.ts +4 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.js +52 -0
- package/dist/prompts/chains/parameter-updater/parameter-updater.prompt.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/registry.d.ts +4 -0
- package/dist/prompts/chains/parameter-updater/registry.js +66 -0
- package/dist/prompts/chains/parameter-updater/registry.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/types.d.ts +18 -0
- package/dist/prompts/chains/parameter-updater/types.js +3 -0
- package/dist/prompts/chains/parameter-updater/types.js.map +1 -0
- package/dist/prompts/chains/parameter-updater/utils.d.ts +2 -0
- package/dist/prompts/chains/parameter-updater/utils.js +16 -0
- package/dist/prompts/chains/parameter-updater/utils.js.map +1 -0
- package/dist/prompts/chains/workflow-name.prompt.d.ts +2 -0
- package/dist/prompts/chains/workflow-name.prompt.js +11 -0
- package/dist/prompts/chains/workflow-name.prompt.js.map +1 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.js +50 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/legacy-agent.prompt.d.ts +6 -0
- package/dist/prompts/legacy-agent.prompt.js +594 -0
- package/dist/prompts/legacy-agent.prompt.js.map +1 -0
- package/dist/session-manager.service.d.ts +16 -0
- package/dist/session-manager.service.js +125 -0
- package/dist/session-manager.service.js.map +1 -0
- package/dist/subgraphs/builder.subgraph.d.ts +132 -0
- package/dist/subgraphs/builder.subgraph.js +173 -0
- package/dist/subgraphs/builder.subgraph.js.map +1 -0
- package/dist/subgraphs/configurator.subgraph.d.ts +142 -0
- package/dist/subgraphs/configurator.subgraph.js +173 -0
- package/dist/subgraphs/configurator.subgraph.js.map +1 -0
- package/dist/subgraphs/discovery.subgraph.d.ts +158 -0
- package/dist/subgraphs/discovery.subgraph.js +221 -0
- package/dist/subgraphs/discovery.subgraph.js.map +1 -0
- package/dist/subgraphs/subgraph-interface.d.ts +23 -0
- package/dist/subgraphs/subgraph-interface.js +7 -0
- package/dist/subgraphs/subgraph-interface.js.map +1 -0
- package/dist/tools/add-node.tool.d.ts +54 -0
- package/dist/tools/add-node.tool.js +176 -0
- package/dist/tools/add-node.tool.js.map +1 -0
- package/dist/tools/best-practices/chatbot.d.ts +7 -0
- package/dist/tools/best-practices/chatbot.js +118 -0
- package/dist/tools/best-practices/chatbot.js.map +1 -0
- package/dist/tools/best-practices/content-generation.d.ts +7 -0
- package/dist/tools/best-practices/content-generation.js +115 -0
- package/dist/tools/best-practices/content-generation.js.map +1 -0
- package/dist/tools/best-practices/data-analysis.d.ts +7 -0
- package/dist/tools/best-practices/data-analysis.js +367 -0
- package/dist/tools/best-practices/data-analysis.js.map +1 -0
- package/dist/tools/best-practices/data-extraction.d.ts +7 -0
- package/dist/tools/best-practices/data-extraction.js +122 -0
- package/dist/tools/best-practices/data-extraction.js.map +1 -0
- package/dist/tools/best-practices/data-transformation.d.ts +7 -0
- package/dist/tools/best-practices/data-transformation.js +162 -0
- package/dist/tools/best-practices/data-transformation.js.map +1 -0
- package/dist/tools/best-practices/document-processing.d.ts +7 -0
- package/dist/tools/best-practices/document-processing.js +335 -0
- package/dist/tools/best-practices/document-processing.js.map +1 -0
- package/dist/tools/best-practices/enrichment.d.ts +7 -0
- package/dist/tools/best-practices/enrichment.js +271 -0
- package/dist/tools/best-practices/enrichment.js.map +1 -0
- package/dist/tools/best-practices/form-input.d.ts +7 -0
- package/dist/tools/best-practices/form-input.js +173 -0
- package/dist/tools/best-practices/form-input.js.map +1 -0
- package/dist/tools/best-practices/human-in-the-loop.d.ts +7 -0
- package/dist/tools/best-practices/human-in-the-loop.js +268 -0
- package/dist/tools/best-practices/human-in-the-loop.js.map +1 -0
- package/dist/tools/best-practices/index.d.ts +3 -0
- package/dist/tools/best-practices/index.js +29 -0
- package/dist/tools/best-practices/index.js.map +1 -0
- package/dist/tools/best-practices/knowledge-base.d.ts +7 -0
- package/dist/tools/best-practices/knowledge-base.js +268 -0
- package/dist/tools/best-practices/knowledge-base.js.map +1 -0
- package/dist/tools/best-practices/monitoring.d.ts +7 -0
- package/dist/tools/best-practices/monitoring.js +178 -0
- package/dist/tools/best-practices/monitoring.js.map +1 -0
- package/dist/tools/best-practices/notification.d.ts +7 -0
- package/dist/tools/best-practices/notification.js +229 -0
- package/dist/tools/best-practices/notification.js.map +1 -0
- package/dist/tools/best-practices/scheduling.d.ts +7 -0
- package/dist/tools/best-practices/scheduling.js +281 -0
- package/dist/tools/best-practices/scheduling.js.map +1 -0
- package/dist/tools/best-practices/scraping-and-research.d.ts +7 -0
- package/dist/tools/best-practices/scraping-and-research.js +161 -0
- package/dist/tools/best-practices/scraping-and-research.js.map +1 -0
- package/dist/tools/best-practices/triage.d.ts +7 -0
- package/dist/tools/best-practices/triage.js +211 -0
- package/dist/tools/best-practices/triage.js.map +1 -0
- package/dist/tools/builder-tools.d.ts +16 -0
- package/dist/tools/builder-tools.js +36 -0
- package/dist/tools/builder-tools.js.map +1 -0
- package/dist/tools/categorize-prompt.tool.d.ts +5 -0
- package/dist/tools/categorize-prompt.tool.js +85 -0
- package/dist/tools/categorize-prompt.tool.js.map +1 -0
- package/dist/tools/connect-nodes.tool.d.ts +22 -0
- package/dist/tools/connect-nodes.tool.js +231 -0
- package/dist/tools/connect-nodes.tool.js.map +1 -0
- package/dist/tools/engines/node-search-engine.d.ts +16 -0
- package/dist/tools/engines/node-search-engine.js +123 -0
- package/dist/tools/engines/node-search-engine.js.map +1 -0
- package/dist/tools/get-best-practices.tool.d.ts +33 -0
- package/dist/tools/get-best-practices.tool.js +94 -0
- package/dist/tools/get-best-practices.tool.js.map +1 -0
- package/dist/tools/get-node-examples.tool.d.ts +119 -0
- package/dist/tools/get-node-examples.tool.js +189 -0
- package/dist/tools/get-node-examples.tool.js.map +1 -0
- package/dist/tools/get-node-parameter.tool.d.ts +4 -0
- package/dist/tools/get-node-parameter.tool.js +114 -0
- package/dist/tools/get-node-parameter.tool.js.map +1 -0
- package/dist/tools/get-workflow-examples.tool.d.ts +34 -0
- package/dist/tools/get-workflow-examples.tool.js +138 -0
- package/dist/tools/get-workflow-examples.tool.js.map +1 -0
- package/dist/tools/helpers/index.d.ts +4 -0
- package/dist/tools/helpers/index.js +21 -0
- package/dist/tools/helpers/index.js.map +1 -0
- package/dist/tools/helpers/progress.d.ts +9 -0
- package/dist/tools/helpers/progress.js +126 -0
- package/dist/tools/helpers/progress.js.map +1 -0
- package/dist/tools/helpers/response.d.ts +7 -0
- package/dist/tools/helpers/response.js +33 -0
- package/dist/tools/helpers/response.js.map +1 -0
- package/dist/tools/helpers/state.d.ts +14 -0
- package/dist/tools/helpers/state.js +85 -0
- package/dist/tools/helpers/state.js.map +1 -0
- package/dist/tools/helpers/validation.d.ts +13 -0
- package/dist/tools/helpers/validation.js +83 -0
- package/dist/tools/helpers/validation.js.map +1 -0
- package/dist/tools/node-details.tool.d.ts +31 -0
- package/dist/tools/node-details.tool.js +201 -0
- package/dist/tools/node-details.tool.js.map +1 -0
- package/dist/tools/node-search.tool.d.ts +62 -0
- package/dist/tools/node-search.tool.js +155 -0
- package/dist/tools/node-search.tool.js.map +1 -0
- package/dist/tools/remove-connection.tool.d.ts +24 -0
- package/dist/tools/remove-connection.tool.js +234 -0
- package/dist/tools/remove-connection.tool.js.map +1 -0
- package/dist/tools/remove-node.tool.d.ts +4 -0
- package/dist/tools/remove-node.tool.js +106 -0
- package/dist/tools/remove-node.tool.js.map +1 -0
- package/dist/tools/update-node-parameters.tool.d.ts +5 -0
- package/dist/tools/update-node-parameters.tool.js +156 -0
- package/dist/tools/update-node-parameters.tool.js.map +1 -0
- package/dist/tools/utils/connection-parameters.utils.d.ts +8 -0
- package/dist/tools/utils/connection-parameters.utils.js +47 -0
- package/dist/tools/utils/connection-parameters.utils.js.map +1 -0
- package/dist/tools/utils/connection.utils.d.ts +15 -0
- package/dist/tools/utils/connection.utils.js +321 -0
- package/dist/tools/utils/connection.utils.js.map +1 -0
- package/dist/tools/utils/mermaid.utils.d.ts +13 -0
- package/dist/tools/utils/mermaid.utils.js +647 -0
- package/dist/tools/utils/mermaid.utils.js.map +1 -0
- package/dist/tools/utils/node-configuration.utils.d.ts +13 -0
- package/dist/tools/utils/node-configuration.utils.js +75 -0
- package/dist/tools/utils/node-configuration.utils.js.map +1 -0
- package/dist/tools/utils/node-creation.utils.d.ts +8 -0
- package/dist/tools/utils/node-creation.utils.js +56 -0
- package/dist/tools/utils/node-creation.utils.js.map +1 -0
- package/dist/tools/utils/node-positioning.utils.d.ts +17 -0
- package/dist/tools/utils/node-positioning.utils.js +87 -0
- package/dist/tools/utils/node-positioning.utils.js.map +1 -0
- package/dist/tools/utils/parameter-update.utils.d.ts +6 -0
- package/dist/tools/utils/parameter-update.utils.js +75 -0
- package/dist/tools/utils/parameter-update.utils.js.map +1 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.d.ts +2 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js +542 -0
- package/dist/tools/utils/test/workflows/ai-assistant.workflow.js.map +1 -0
- package/dist/tools/validate-configuration.tool.d.ts +4 -0
- package/dist/tools/validate-configuration.tool.js +70 -0
- package/dist/tools/validate-configuration.tool.js.map +1 -0
- package/dist/tools/validate-structure.tool.d.ts +4 -0
- package/dist/tools/validate-structure.tool.js +66 -0
- package/dist/tools/validate-structure.tool.js.map +1 -0
- package/dist/tools/validate-workflow.tool.d.ts +5 -0
- package/dist/tools/validate-workflow.tool.js +73 -0
- package/dist/tools/validate-workflow.tool.js.map +1 -0
- package/dist/tools/web/templates.d.ts +23 -0
- package/dist/tools/web/templates.js +106 -0
- package/dist/tools/web/templates.js.map +1 -0
- package/dist/types/best-practices.d.ts +6 -0
- package/dist/types/best-practices.js +3 -0
- package/dist/types/best-practices.js.map +1 -0
- package/dist/types/categorization.d.ts +23 -0
- package/dist/types/categorization.js +38 -0
- package/dist/types/categorization.js.map +1 -0
- package/dist/types/config.d.ts +55 -0
- package/dist/types/config.js +3 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/connections.d.ts +30 -0
- package/dist/types/connections.js +3 -0
- package/dist/types/connections.js.map +1 -0
- package/dist/types/coordination.d.ts +42 -0
- package/dist/types/coordination.js +23 -0
- package/dist/types/coordination.js.map +1 -0
- package/dist/types/discovery-types.d.ts +12 -0
- package/dist/types/discovery-types.js +3 -0
- package/dist/types/discovery-types.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/langchain.d.ts +3 -0
- package/dist/types/langchain.js +15 -0
- package/dist/types/langchain.js.map +1 -0
- package/dist/types/messages.d.ts +32 -0
- package/dist/types/messages.js +3 -0
- package/dist/types/messages.js.map +1 -0
- package/dist/types/nodes.d.ts +27 -0
- package/dist/types/nodes.js +3 -0
- package/dist/types/nodes.js.map +1 -0
- package/dist/types/sessions.d.ts +8 -0
- package/dist/types/sessions.js +34 -0
- package/dist/types/sessions.js.map +1 -0
- package/dist/types/streaming.d.ts +33 -0
- package/dist/types/streaming.js +3 -0
- package/dist/types/streaming.js.map +1 -0
- package/dist/types/tools.d.ts +120 -0
- package/dist/types/tools.js +3 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/utils.js +3 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/web/templates.d.ts +45 -0
- package/dist/types/web/templates.js +37 -0
- package/dist/types/web/templates.js.map +1 -0
- package/dist/types/workflow.d.ts +31 -0
- package/dist/types/workflow.js +3 -0
- package/dist/types/workflow.js.map +1 -0
- package/dist/utils/cache-control/helpers.d.ts +5 -0
- package/dist/utils/cache-control/helpers.js +126 -0
- package/dist/utils/cache-control/helpers.js.map +1 -0
- package/dist/utils/cache-control/index.d.ts +1 -0
- package/dist/utils/cache-control/index.js +9 -0
- package/dist/utils/cache-control/index.js.map +1 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.d.ts +3 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.js +10 -0
- package/dist/utils/cleanup-dangling-tool-call-messages.js.map +1 -0
- package/dist/utils/context-builders.d.ts +10 -0
- package/dist/utils/context-builders.js +71 -0
- package/dist/utils/context-builders.js.map +1 -0
- package/dist/utils/coordination-log.d.ts +15 -0
- package/dist/utils/coordination-log.js +75 -0
- package/dist/utils/coordination-log.js.map +1 -0
- package/dist/utils/http-proxy-agent.d.ts +2 -0
- package/dist/utils/http-proxy-agent.js +16 -0
- package/dist/utils/http-proxy-agent.js.map +1 -0
- package/dist/utils/node-helpers.d.ts +2 -0
- package/dist/utils/node-helpers.js +54 -0
- package/dist/utils/node-helpers.js.map +1 -0
- package/dist/utils/operations-processor.d.ts +14 -0
- package/dist/utils/operations-processor.js +196 -0
- package/dist/utils/operations-processor.js.map +1 -0
- package/dist/utils/state-modifier.d.ts +32 -0
- package/dist/utils/state-modifier.js +112 -0
- package/dist/utils/state-modifier.js.map +1 -0
- package/dist/utils/state-reducers.d.ts +3 -0
- package/dist/utils/state-reducers.js +20 -0
- package/dist/utils/state-reducers.js.map +1 -0
- package/dist/utils/stream-processor.d.ts +20 -0
- package/dist/utils/stream-processor.js +277 -0
- package/dist/utils/stream-processor.js.map +1 -0
- package/dist/utils/subgraph-helpers.d.ts +16 -0
- package/dist/utils/subgraph-helpers.js +117 -0
- package/dist/utils/subgraph-helpers.js.map +1 -0
- package/dist/utils/token-usage.d.ts +21 -0
- package/dist/utils/token-usage.js +45 -0
- package/dist/utils/token-usage.js.map +1 -0
- package/dist/utils/tool-executor.d.ts +3 -0
- package/dist/utils/tool-executor.js +108 -0
- package/dist/utils/tool-executor.js.map +1 -0
- package/dist/utils/trim-workflow-context.d.ts +2 -0
- package/dist/utils/trim-workflow-context.js +53 -0
- package/dist/utils/trim-workflow-context.js.map +1 -0
- package/dist/utils/workflow-validation.d.ts +2 -0
- package/dist/utils/workflow-validation.js +37 -0
- package/dist/utils/workflow-validation.js.map +1 -0
- package/dist/validation/checks/agent-prompt.d.ts +3 -0
- package/dist/validation/checks/agent-prompt.js +47 -0
- package/dist/validation/checks/agent-prompt.js.map +1 -0
- package/dist/validation/checks/connections.d.ts +4 -0
- package/dist/validation/checks/connections.js +163 -0
- package/dist/validation/checks/connections.js.map +1 -0
- package/dist/validation/checks/credentials.d.ts +3 -0
- package/dist/validation/checks/credentials.js +125 -0
- package/dist/validation/checks/credentials.js.map +1 -0
- package/dist/validation/checks/from-ai.d.ts +4 -0
- package/dist/validation/checks/from-ai.js +62 -0
- package/dist/validation/checks/from-ai.js.map +1 -0
- package/dist/validation/checks/index.d.ts +7 -0
- package/dist/validation/checks/index.js +18 -0
- package/dist/validation/checks/index.js.map +1 -0
- package/dist/validation/checks/nodes.d.ts +4 -0
- package/dist/validation/checks/nodes.js +44 -0
- package/dist/validation/checks/nodes.js.map +1 -0
- package/dist/validation/checks/tools.d.ts +4 -0
- package/dist/validation/checks/tools.js +38 -0
- package/dist/validation/checks/tools.js.map +1 -0
- package/dist/validation/checks/trigger.d.ts +8 -0
- package/dist/validation/checks/trigger.js +33 -0
- package/dist/validation/checks/trigger.js.map +1 -0
- package/dist/validation/programmatic.d.ts +3 -0
- package/dist/validation/programmatic.js +24 -0
- package/dist/validation/programmatic.js.map +1 -0
- package/dist/validation/types.d.ts +52 -0
- package/dist/validation/types.js +31 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/validation/utils/expressions.d.ts +3 -0
- package/dist/validation/utils/expressions.js +37 -0
- package/dist/validation/utils/expressions.js.map +1 -0
- package/dist/validation/utils/is-tool.d.ts +2 -0
- package/dist/validation/utils/is-tool.js +7 -0
- package/dist/validation/utils/is-tool.js.map +1 -0
- package/dist/validation/utils/node-type-map.d.ts +8 -0
- package/dist/validation/utils/node-type-map.js +50 -0
- package/dist/validation/utils/node-type-map.js.map +1 -0
- package/dist/validation/utils/resolve-connections.d.ts +8 -0
- package/dist/validation/utils/resolve-connections.js +64 -0
- package/dist/validation/utils/resolve-connections.js.map +1 -0
- package/dist/workflow-builder-agent.d.ts +72 -0
- package/dist/workflow-builder-agent.js +401 -0
- package/dist/workflow-builder-agent.js.map +1 -0
- package/dist/workflow-state.d.ts +26 -0
- package/dist/workflow-state.js +79 -0
- package/dist/workflow-state.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KnowledgeBaseBestPractices = void 0;
|
|
4
|
+
const categorization_1 = require("../../types/categorization");
|
|
5
|
+
class KnowledgeBaseBestPractices {
|
|
6
|
+
technique = categorization_1.WorkflowTechnique.KNOWLEDGE_BASE;
|
|
7
|
+
version = '1.0.0';
|
|
8
|
+
documentation = `# Best Practices: Knowledge Base Workflows
|
|
9
|
+
|
|
10
|
+
## Workflow Design
|
|
11
|
+
|
|
12
|
+
### Architecture Pattern
|
|
13
|
+
- **Separate Workflows**: Split into two distinct parts:
|
|
14
|
+
- **Ingestion Workflow**: Processes and indexes documents into vector database (triggered on new content or schedule)
|
|
15
|
+
- **Query Workflow**: Retrieves relevant information and generates answers (triggered by user queries)
|
|
16
|
+
- **Modular Design**: Use Execute Workflow node to call query workflow from multiple channels (chat, API, Slack, etc.)
|
|
17
|
+
|
|
18
|
+
### Trigger Strategy
|
|
19
|
+
- **Ingestion Triggers**: File Watchers (Google Drive, S3), Schedule triggers for periodic re-indexing
|
|
20
|
+
- **Query Triggers**: Chat Trigger, Webhook, Slack Trigger based on input channel
|
|
21
|
+
|
|
22
|
+
### Data Type Handling
|
|
23
|
+
- Use Switch/If nodes or Code node to route different file types to appropriate extraction branches
|
|
24
|
+
- Separate processing paths for PDFs, databases, web pages, etc.
|
|
25
|
+
|
|
26
|
+
## Core Processing Pipeline
|
|
27
|
+
|
|
28
|
+
### Document Processing
|
|
29
|
+
1. **Fetch Documents**: Google Drive/Dropbox/S3 nodes, HTTP Request node, Database nodes
|
|
30
|
+
2. **Load & Split**: Default Data Loader → Recursive Character Text Splitter
|
|
31
|
+
- Chunk size: 500-1000 characters (~200 tokens)
|
|
32
|
+
- Overlap: 10-15% to preserve context
|
|
33
|
+
3. **Generate Embeddings**: Embeddings node (OpenAI/HuggingFace/Cohere)
|
|
34
|
+
- **Critical**: Use same model for indexing and queries
|
|
35
|
+
- Example: text-embedding-ada-002 (1536 dimensions)
|
|
36
|
+
|
|
37
|
+
### Vector Store Configuration
|
|
38
|
+
- **Insert Mode**:
|
|
39
|
+
- Use upsert with unique IDs (document ID + chunk number)
|
|
40
|
+
- Include metadata (source, title, page number)
|
|
41
|
+
- Clear namespace option for complete replacement
|
|
42
|
+
- **Query Mode**:
|
|
43
|
+
- Top-K limit: 3-5 results typically optimal
|
|
44
|
+
- Apply similarity score threshold to filter irrelevant matches
|
|
45
|
+
|
|
46
|
+
### LLM Integration
|
|
47
|
+
- **Agent Approach**: AI Agent node with Vector Store Tool
|
|
48
|
+
- Configure clear tool description: "Company Knowledge Base – use this to find relevant policy documents"
|
|
49
|
+
- Connect Window Buffer Memory for conversation history
|
|
50
|
+
- **Direct Query**: Vector Store (Get Many) → OpenAI Chat Model with crafted prompt
|
|
51
|
+
- **System Prompt**: "Answer using only the information from our knowledge base. If you don't find an answer in the provided documents, say you don't know."
|
|
52
|
+
- **Temperature**: 0-0.3 for factual accuracy
|
|
53
|
+
|
|
54
|
+
## Recommended Nodes
|
|
55
|
+
|
|
56
|
+
### Document Handling
|
|
57
|
+
|
|
58
|
+
**Google Drive** (n8n-nodes-base.googleDrive):
|
|
59
|
+
- Purpose: File triggers and retrieval from Google Drive
|
|
60
|
+
- Use cases: Monitor folders for new documents, fetch specific files
|
|
61
|
+
- Best practices: Use triggers for automatic ingestion, handle file types appropriately
|
|
62
|
+
|
|
63
|
+
**HTTP Request** (n8n-nodes-base.httpRequest):
|
|
64
|
+
- Purpose: Fetch documents from URLs/APIs
|
|
65
|
+
- Use cases: Pull content from web pages, download files from APIs
|
|
66
|
+
- Best practices: Handle authentication, check response formats
|
|
67
|
+
|
|
68
|
+
**Notion** (n8n-nodes-base.notion):
|
|
69
|
+
- Purpose: Retrieve content from Notion databases and pages
|
|
70
|
+
- Use cases: Index company wikis, documentation in Notion
|
|
71
|
+
- Best practices: Use appropriate API version, handle nested content
|
|
72
|
+
|
|
73
|
+
**Postgres** (n8n-nodes-base.postgres):
|
|
74
|
+
- Purpose: Query database content for indexing
|
|
75
|
+
- Use cases: Index structured data, retrieve records for embedding
|
|
76
|
+
- Best practices: Use efficient queries, batch large datasets
|
|
77
|
+
|
|
78
|
+
### AI Processing Chain
|
|
79
|
+
|
|
80
|
+
**Document Default Data Loader** (@n8n/n8n-nodes-langchain.documentDefaultDataLoader):
|
|
81
|
+
- Purpose: Load documents into LangChain format
|
|
82
|
+
- Use cases: Initial document processing, format conversion
|
|
83
|
+
- Best practices: Handle various document types, preserve metadata
|
|
84
|
+
|
|
85
|
+
**Text Splitter Recursive Character** (@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter):
|
|
86
|
+
- Purpose: Split documents into manageable chunks
|
|
87
|
+
- Configuration:
|
|
88
|
+
- Chunk size: 500-1000 characters (~200 tokens)
|
|
89
|
+
- Overlap: 10-15% to preserve context
|
|
90
|
+
- Best practices: Test chunk sizes for optimal retrieval quality, ensure context preservation
|
|
91
|
+
|
|
92
|
+
**Embeddings OpenAI** (@n8n/n8n-nodes-langchain.embeddingsOpenAi):
|
|
93
|
+
- Purpose: Generate vector embeddings for text
|
|
94
|
+
- Model options:
|
|
95
|
+
- text-embedding-3-small (newer, cost-effective)
|
|
96
|
+
- text-embedding-ada-002 (1536 dimensions, widely used)
|
|
97
|
+
- **Critical**: Use same model for indexing and queries
|
|
98
|
+
- Best practices: Choose model based on quality/cost tradeoffs, maintain consistency
|
|
99
|
+
|
|
100
|
+
### Vector Stores
|
|
101
|
+
|
|
102
|
+
**Vector Store Pinecone** (@n8n/n8n-nodes-langchain.vectorStorePinecone):
|
|
103
|
+
- Purpose: Pinecone vector database integration
|
|
104
|
+
- Use cases: Production knowledge bases, scalable deployments
|
|
105
|
+
- Best practices: Use namespaces for organization, set appropriate index dimensions
|
|
106
|
+
|
|
107
|
+
**Vector Store Qdrant** (@n8n/n8n-nodes-langchain.vectorStoreQdrant):
|
|
108
|
+
- Purpose: Qdrant vector database integration
|
|
109
|
+
- Use cases: Self-hosted vector storage, high-performance search
|
|
110
|
+
- Best practices: Configure collections properly, use filters for metadata
|
|
111
|
+
|
|
112
|
+
**Vector Store Supabase** (@n8n/n8n-nodes-langchain.vectorStoreSupabase):
|
|
113
|
+
- Purpose: Supabase pgvector integration
|
|
114
|
+
- Use cases: PostgreSQL-based vector storage, integrated with existing Supabase projects
|
|
115
|
+
- Best practices: Ensure pgvector extension is enabled, use proper indexing
|
|
116
|
+
|
|
117
|
+
**Vector Store In Memory** (@n8n/n8n-nodes-langchain.vectorStoreInMemory):
|
|
118
|
+
- Purpose: In-memory vector storage for testing
|
|
119
|
+
- Use cases: Development, testing, small datasets
|
|
120
|
+
- Best practices: Not for production, data lost on restart
|
|
121
|
+
|
|
122
|
+
### Agent & LLM
|
|
123
|
+
|
|
124
|
+
**AI Agent** (@n8n/n8n-nodes-langchain.agent):
|
|
125
|
+
- Purpose: Orchestrate tool use and LLM interactions
|
|
126
|
+
- Configuration: Connect Vector Store Tool, add memory
|
|
127
|
+
- Best practices: Configure clear tool descriptions, use appropriate prompts
|
|
128
|
+
|
|
129
|
+
**Tool Vector Store** (@n8n/n8n-nodes-langchain.toolVectorStore):
|
|
130
|
+
- Purpose: Vector store tool for agents
|
|
131
|
+
- Configuration: "Company Knowledge Base – use this to find relevant policy documents"
|
|
132
|
+
- Best practices: Use descriptive tool names, set appropriate retrieval limits (3-5 results)
|
|
133
|
+
|
|
134
|
+
**OpenAI** (@n8n/n8n-nodes-langchain.openAi):
|
|
135
|
+
- Purpose: Chat model for generating responses
|
|
136
|
+
- Configuration:
|
|
137
|
+
- Temperature: 0-0.3 for factual Q&A
|
|
138
|
+
- System prompt: "Answer using only the information from our knowledge base"
|
|
139
|
+
- Best practices: Use low temperature for accuracy, instruct to admit when unsure
|
|
140
|
+
|
|
141
|
+
**Memory Window Buffer** (@n8n/n8n-nodes-langchain.memoryBufferWindow):
|
|
142
|
+
- Purpose: Maintain conversation history
|
|
143
|
+
- Configuration: 3-5 message turns typically sufficient
|
|
144
|
+
- Best practices: Balance context preservation with token limits
|
|
145
|
+
|
|
146
|
+
### Utility
|
|
147
|
+
|
|
148
|
+
**Switch** (n8n-nodes-base.switch):
|
|
149
|
+
- Purpose: Route by file type or content type
|
|
150
|
+
- Use cases: Different processing for PDFs vs text vs images
|
|
151
|
+
- Best practices: Always define default case, use clear conditions
|
|
152
|
+
|
|
153
|
+
**Execute Workflow** (n8n-nodes-base.executeWorkflow):
|
|
154
|
+
- Purpose: Call sub-workflows for modular design
|
|
155
|
+
- Use cases: Reuse query workflow across channels, separate ingestion logic
|
|
156
|
+
- Best practices: Design for reusability, pass appropriate parameters
|
|
157
|
+
|
|
158
|
+
## Common Pitfalls to Avoid
|
|
159
|
+
|
|
160
|
+
### Critical Mistakes
|
|
161
|
+
|
|
162
|
+
**Inconsistent Embeddings**:
|
|
163
|
+
- **Problem**: Using different embedding models for indexing vs queries breaks semantic search
|
|
164
|
+
- **Solution**: Always use the same model throughout (e.g., text-embedding-ada-002 for both)
|
|
165
|
+
- Document which model is used in workflow description
|
|
166
|
+
|
|
167
|
+
**Vector Dimension Mismatch**:
|
|
168
|
+
- **Problem**: Index dimensions don't match embedding model output, causing errors
|
|
169
|
+
- **Solution**: Ensure vector store index dimensions match embedding model output exactly
|
|
170
|
+
- Common: ada-002 = 1536 dimensions, text-embedding-3-small = 1536 dimensions
|
|
171
|
+
|
|
172
|
+
**Missing Updates**:
|
|
173
|
+
- **Problem**: Not updating or removing outdated vectors leads to conflicting information
|
|
174
|
+
- **Solution**: Implement update/delete mechanisms with unique IDs
|
|
175
|
+
- Use document ID + chunk number as unique identifier
|
|
176
|
+
- Schedule regular re-indexing for changing content
|
|
177
|
+
|
|
178
|
+
**Treating Vector DB as Full Database**:
|
|
179
|
+
- **Problem**: Using vector stores for general data storage instead of semantic search
|
|
180
|
+
- **Solution**: Vector DBs are for semantic search only, not bulk data storage
|
|
181
|
+
- Store full documents in traditional databases, only embeddings in vector store
|
|
182
|
+
|
|
183
|
+
### Performance Issues
|
|
184
|
+
|
|
185
|
+
**Oversized Chunks**:
|
|
186
|
+
- **Problem**: Large chunks dilute relevance and exceed token limits
|
|
187
|
+
- **Solution**: Keep chunks to 500-1000 characters (~200 tokens)
|
|
188
|
+
- Test different sizes to find optimal retrieval quality
|
|
189
|
+
|
|
190
|
+
**Undersized Chunks**:
|
|
191
|
+
- **Problem**: Too small chunks lose necessary context
|
|
192
|
+
- **Solution**: Ensure chunks have sufficient context to be meaningful
|
|
193
|
+
- Use 10-15% overlap between chunks
|
|
194
|
+
|
|
195
|
+
**Too Many Retrieved Documents**:
|
|
196
|
+
- **Problem**: Retrieving 10+ documents overwhelms LLM and reduces accuracy
|
|
197
|
+
- **Solution**: Limit to 3-5 results for optimal quality
|
|
198
|
+
- Use similarity thresholds to filter irrelevant matches
|
|
199
|
+
|
|
200
|
+
**UI Overload**:
|
|
201
|
+
- **Problem**: Indexing thousands of chunks freezes workflow editor
|
|
202
|
+
- **Solution**: Run large indexing jobs in production mode, not editor
|
|
203
|
+
- Consider batch processing for very large datasets
|
|
204
|
+
|
|
205
|
+
### Configuration Errors
|
|
206
|
+
|
|
207
|
+
**No Metadata**:
|
|
208
|
+
- **Problem**: Missing source/date metadata makes results less interpretable
|
|
209
|
+
- **Solution**: Always include metadata (source, title, page number, date)
|
|
210
|
+
- Helps users understand context of retrieved information
|
|
211
|
+
|
|
212
|
+
**No Unique IDs**:
|
|
213
|
+
- **Problem**: Can't update specific documents, causes duplicates
|
|
214
|
+
- **Solution**: Use document ID + chunk number as unique identifier
|
|
215
|
+
- Enables targeted updates and deletions
|
|
216
|
+
|
|
217
|
+
**High Temperature**:
|
|
218
|
+
- **Problem**: Creative temperature settings cause hallucinations in factual Q&A
|
|
219
|
+
- **Solution**: Use temperature 0-0.3 for factual responses
|
|
220
|
+
- Higher temperatures (0.7-1.0) only for creative tasks
|
|
221
|
+
|
|
222
|
+
**Generic Tool Descriptions**:
|
|
223
|
+
- **Problem**: Vague descriptions cause agents to misuse tools
|
|
224
|
+
- **Solution**: Use specific, descriptive tool names
|
|
225
|
+
- Good: "Company HR Policy Knowledge Base"
|
|
226
|
+
- Bad: "Knowledge base"
|
|
227
|
+
|
|
228
|
+
### Data Management
|
|
229
|
+
|
|
230
|
+
**Stale Data**:
|
|
231
|
+
- **Problem**: Outdated information in knowledge base leads to wrong answers
|
|
232
|
+
- **Solution**: Schedule regular re-indexing or implement change detection
|
|
233
|
+
- Use document timestamps to track freshness
|
|
234
|
+
|
|
235
|
+
**No Namespace Separation**:
|
|
236
|
+
- **Problem**: Mixing unrelated domains in same index reduces accuracy
|
|
237
|
+
- **Solution**: Use namespaces to separate different knowledge domains
|
|
238
|
+
- Example: "hr-policies", "technical-docs", "customer-faqs"
|
|
239
|
+
|
|
240
|
+
**Ignoring Token Limits**:
|
|
241
|
+
- **Problem**: Combined length of query + context + response exceeds model limits
|
|
242
|
+
- **Solution**: Monitor total token usage, limit context appropriately
|
|
243
|
+
- GPT-4: 8k/32k tokens, GPT-3.5: 4k/16k tokens
|
|
244
|
+
|
|
245
|
+
**Security Gaps**:
|
|
246
|
+
- **Problem**: Sending sensitive data without access control or encryption
|
|
247
|
+
- **Solution**: Implement proper access controls, use secure connections
|
|
248
|
+
- Consider data classification and access restrictions
|
|
249
|
+
|
|
250
|
+
## Best Practices Summary
|
|
251
|
+
|
|
252
|
+
1. **Always use consistent embedding models** throughout the pipeline
|
|
253
|
+
2. **Design modular workflows** for reusability across channels
|
|
254
|
+
3. **Include metadata** for better context and filtering
|
|
255
|
+
4. **Implement proper update/delete mechanisms** with unique IDs
|
|
256
|
+
5. **Test chunk sizes** for optimal retrieval quality (500-1000 characters)
|
|
257
|
+
6. **Run large indexing operations** in production mode
|
|
258
|
+
7. **Set appropriate retrieval limits** (3-5 results) and similarity thresholds
|
|
259
|
+
8. **Use low temperature** (0-0.3) for factual responses
|
|
260
|
+
9. **Secure sensitive data** with proper access controls
|
|
261
|
+
10. **Monitor and update** regularly to prevent stale information
|
|
262
|
+
`;
|
|
263
|
+
getDocumentation() {
|
|
264
|
+
return this.documentation;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
exports.KnowledgeBaseBestPractices = KnowledgeBaseBestPractices;
|
|
268
|
+
//# sourceMappingURL=knowledge-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-base.js","sourceRoot":"","sources":["../../../src/tools/best-practices/knowledge-base.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAE3D,MAAa,0BAA0B;IAC7B,SAAS,GAAG,kCAAiB,CAAC,cAAc,CAAC;IAC7C,OAAO,GAAG,OAAO,CAAC;IAEV,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8PjC,CAAC;IAED,gBAAgB;QACf,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CACD;AAvQD,gEAuQC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BestPracticesDocument } from '../../types/best-practices';
|
|
2
|
+
export declare class MonitoringBestPractices implements BestPracticesDocument {
|
|
3
|
+
readonly technique: "monitoring";
|
|
4
|
+
readonly version = "1.0.0";
|
|
5
|
+
private readonly documentation;
|
|
6
|
+
getDocumentation(): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonitoringBestPractices = void 0;
|
|
4
|
+
const categorization_1 = require("../../types/categorization");
|
|
5
|
+
class MonitoringBestPractices {
|
|
6
|
+
technique = categorization_1.WorkflowTechnique.MONITORING;
|
|
7
|
+
version = '1.0.0';
|
|
8
|
+
documentation = `# Best Practices: Monitoring Workflows
|
|
9
|
+
|
|
10
|
+
## Workflow Design
|
|
11
|
+
|
|
12
|
+
Structure monitoring workflows with a Schedule Trigger for periodic checks, HTTP Request or appropriate check nodes for service status, and IF/Switch nodes for conditional alerting. Always enable error handling to prevent workflow crashes when services are down.
|
|
13
|
+
|
|
14
|
+
CRITICAL: Enable "Continue On Fail" or "Never Error" mode on check nodes - otherwise the workflow stops exactly when you need alerts. This is the most common monitoring mistake.
|
|
15
|
+
|
|
16
|
+
Example pattern for website monitoring:
|
|
17
|
+
- Schedule Trigger (every 5 minutes) → HTTP Request (check status) → IF (status != 200?) → Send alert
|
|
18
|
+
- Always test both success and failure paths during development
|
|
19
|
+
|
|
20
|
+
For monitoring multiple services, store URLs/endpoints in Google Sheets or databases and loop through them rather than duplicating workflows.
|
|
21
|
+
|
|
22
|
+
## Scheduling & Activation
|
|
23
|
+
|
|
24
|
+
Always activate the workflow after configuration - forgetting this means no monitoring occurs. Test schedules with manual execution before relying on them in production.
|
|
25
|
+
|
|
26
|
+
Configure appropriate check intervals based on criticality:
|
|
27
|
+
- Critical services: 1-5 minutes
|
|
28
|
+
- Important services: 10-15 minutes
|
|
29
|
+
- Non-critical: 30-60 minutes
|
|
30
|
+
|
|
31
|
+
Set correct time zones in Workflow Settings for daily/weekly schedules. Use crontab.guru to verify complex Cron expressions.
|
|
32
|
+
|
|
33
|
+
## Service Status Checking
|
|
34
|
+
|
|
35
|
+
Configure HTTP Request nodes with:
|
|
36
|
+
- Timeout: Set to a few seconds to prevent hanging
|
|
37
|
+
- Include Headers & Status: Access response codes for condition evaluation
|
|
38
|
+
- Retry on Fail: 2-3 retries with 1s delay to filter transient failures
|
|
39
|
+
- Authentication: Use credential system, never hardcode secrets
|
|
40
|
+
|
|
41
|
+
For non-HTTP monitoring:
|
|
42
|
+
- Databases: Use Query nodes (MySQL, Postgres) for health checks
|
|
43
|
+
- Systems: Execute Command node for ping or custom scripts
|
|
44
|
+
- APIs: Check specific endpoints, not just base URLs
|
|
45
|
+
|
|
46
|
+
## Alert Configuration
|
|
47
|
+
|
|
48
|
+
Implement multi-channel alerting for critical services to ensure visibility. Configure notifications with useful context.
|
|
49
|
+
|
|
50
|
+
Message content should include:
|
|
51
|
+
- Service name/URL
|
|
52
|
+
- Failure time: {{$now}}
|
|
53
|
+
- Error details: {{$json["statusCode"]}}
|
|
54
|
+
- Example: "⚠️ Website XYZ DOWN (status 500) at {{new Date().toISOString()}}"
|
|
55
|
+
|
|
56
|
+
Avoid alert storms by:
|
|
57
|
+
- Tracking state changes (only alert when status changes)
|
|
58
|
+
- Throttling repeated alerts (e.g., re-alert after 30 minutes)
|
|
59
|
+
- Storing last known status in Google Sheets or database
|
|
60
|
+
|
|
61
|
+
## Error Handling & Failsafes
|
|
62
|
+
|
|
63
|
+
Implement multiple layers of error handling:
|
|
64
|
+
|
|
65
|
+
1. Node-level: Enable "Continue On Fail" on check nodes
|
|
66
|
+
2. Workflow-level: Create Error Trigger workflow to catch monitoring failures
|
|
67
|
+
3. Heartbeat: Ping external service (healthchecks.io) to verify monitoring is running
|
|
68
|
+
|
|
69
|
+
Configure Error Workflow in settings to alert when monitoring itself fails - otherwise you have blind spots.
|
|
70
|
+
|
|
71
|
+
## Logging & State Management
|
|
72
|
+
|
|
73
|
+
Log check results for trend analysis and uptime calculation. Store in Google Sheets (append row) or database with:
|
|
74
|
+
- Timestamp
|
|
75
|
+
- Service identifier
|
|
76
|
+
- Status (up/down)
|
|
77
|
+
- Response time
|
|
78
|
+
- Error details if applicable
|
|
79
|
+
|
|
80
|
+
Maintain current status dashboard by updating a status table/sheet that shows at-a-glance health of all monitored services.
|
|
81
|
+
|
|
82
|
+
## Recommended Nodes
|
|
83
|
+
|
|
84
|
+
### Schedule Trigger (n8n-nodes-base.scheduleTrigger)
|
|
85
|
+
|
|
86
|
+
Purpose: Periodic workflow execution at fixed intervals or Cron schedules
|
|
87
|
+
|
|
88
|
+
Configuration:
|
|
89
|
+
- Set appropriate intervals based on service criticality
|
|
90
|
+
- Always activate the workflow after configuration
|
|
91
|
+
|
|
92
|
+
### HTTP Request (n8n-nodes-base.httpRequest)
|
|
93
|
+
|
|
94
|
+
Purpose: Check website/API availability and response codes
|
|
95
|
+
|
|
96
|
+
Critical settings:
|
|
97
|
+
- Enable "Continue On Fail" to handle errors gracefully
|
|
98
|
+
- Set timeout to prevent hanging (2-5 seconds typical)
|
|
99
|
+
- Configure retries for transient failure filtering
|
|
100
|
+
|
|
101
|
+
### IF (n8n-nodes-base.if)
|
|
102
|
+
|
|
103
|
+
Purpose: Evaluate service health and route to appropriate action
|
|
104
|
+
|
|
105
|
+
Common conditions:
|
|
106
|
+
- {{$json["statusCode"]}} equals 200 (service up)
|
|
107
|
+
- {{$json["statusCode"]}} not equals 200 (service down)
|
|
108
|
+
|
|
109
|
+
### Send Email (n8n-nodes-base.emailSend)
|
|
110
|
+
|
|
111
|
+
Purpose: Email alerts for service issues
|
|
112
|
+
|
|
113
|
+
Configure with SMTP credentials and clear subject lines for quick issue identification.
|
|
114
|
+
|
|
115
|
+
### Messaging Integration Nodes
|
|
116
|
+
|
|
117
|
+
- Slack (n8n-nodes-base.slack)
|
|
118
|
+
- Microsoft Teams (n8n-nodes-base.microsoftTeams)
|
|
119
|
+
- Telegram (n8n-nodes-base.telegram)
|
|
120
|
+
- Discord (n8n-nodes-base.discord)
|
|
121
|
+
|
|
122
|
+
Purpose: Real-time alerts to team communication channels
|
|
123
|
+
|
|
124
|
+
### Twilio (n8n-nodes-base.twilio)
|
|
125
|
+
|
|
126
|
+
Purpose: SMS/phone alerts for critical system failures requiring immediate attention
|
|
127
|
+
|
|
128
|
+
### Database & Storage Nodes
|
|
129
|
+
|
|
130
|
+
- Google Sheets (n8n-nodes-base.googleSheets)
|
|
131
|
+
- MySQL (n8n-nodes-base.mySql)
|
|
132
|
+
- PostgreSQL (n8n-nodes-base.postgres)
|
|
133
|
+
|
|
134
|
+
Purpose: Store monitoring configuration, log results, track state changes
|
|
135
|
+
|
|
136
|
+
### Execute Workflow (n8n-nodes-base.executeWorkflow)
|
|
137
|
+
|
|
138
|
+
Purpose: Modular monitoring design with sub-workflows for different service types
|
|
139
|
+
|
|
140
|
+
## Common Pitfalls to Avoid
|
|
141
|
+
|
|
142
|
+
### Forgetting to Activate Workflow
|
|
143
|
+
|
|
144
|
+
The #1 monitoring failure - creating the perfect monitoring workflow but forgetting to activate it. Always verify the workflow is active (toggle in top-right of editor).
|
|
145
|
+
|
|
146
|
+
### No Error Handling on Check Nodes
|
|
147
|
+
|
|
148
|
+
Without "Continue On Fail", the workflow crashes when services are down - exactly when you need alerts. This makes monitoring useless at the critical moment.
|
|
149
|
+
|
|
150
|
+
### Alert Storms
|
|
151
|
+
|
|
152
|
+
Sending alerts every check interval creates fatigue. Implement state tracking to alert only on status changes, not every failed check.
|
|
153
|
+
|
|
154
|
+
### Incorrect Schedule Configuration
|
|
155
|
+
|
|
156
|
+
Cron expression mistakes can cause workflows to run at wrong times or not at all. A Cron like "* * * * *" runs every minute (not every hour!). Always test schedules.
|
|
157
|
+
|
|
158
|
+
### Hardcoded Credentials
|
|
159
|
+
|
|
160
|
+
Never hardcode API keys, passwords, or sensitive URLs directly in nodes. Use n8n's credential manager for security and maintainability.
|
|
161
|
+
|
|
162
|
+
### Missing Recovery Notifications
|
|
163
|
+
|
|
164
|
+
Not sending "service recovered" messages leaves teams uncertain about incident resolution. Track state changes bidirectionally.
|
|
165
|
+
|
|
166
|
+
### Resource Exhaustion
|
|
167
|
+
|
|
168
|
+
Monitoring too many services in one workflow or setting intervals too frequent can overload n8n. Split large monitoring lists across multiple workflows.
|
|
169
|
+
|
|
170
|
+
### No Monitoring of Monitoring
|
|
171
|
+
|
|
172
|
+
If the monitoring workflow fails, you're blind to service issues. Implement Error Trigger workflows and external heartbeat monitoring for the monitoring system itself.`;
|
|
173
|
+
getDocumentation() {
|
|
174
|
+
return this.documentation;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
exports.MonitoringBestPractices = MonitoringBestPractices;
|
|
178
|
+
//# sourceMappingURL=monitoring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitoring.js","sourceRoot":"","sources":["../../../src/tools/best-practices/monitoring.ts"],"names":[],"mappings":";;;AACA,2DAA2D;AAE3D,MAAa,uBAAuB;IAC1B,SAAS,GAAG,kCAAiB,CAAC,UAAU,CAAC;IACzC,OAAO,GAAG,OAAO,CAAC;IAEV,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wKAoKsI,CAAC;IAExK,gBAAgB;QACf,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CACD;AA7KD,0DA6KC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BestPracticesDocument } from '../../types/best-practices';
|
|
2
|
+
export declare class NotificationBestPractices implements BestPracticesDocument {
|
|
3
|
+
readonly technique: "notification";
|
|
4
|
+
readonly version = "1.0.0";
|
|
5
|
+
private readonly documentation;
|
|
6
|
+
getDocumentation(): string;
|
|
7
|
+
}
|