@n8n/n8n-nodes-langchain 2.17.0 → 2.17.2
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/credentials/MinimaxApi.credentials.d.ts +9 -0
- package/dist/credentials/MinimaxApi.credentials.js +79 -0
- package/dist/credentials/MinimaxApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +7 -0
- package/dist/known/nodes.json +4 -0
- package/dist/node-definitions/.nodes-hash +1 -1
- package/dist/node-definitions/index.ts +4 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatMinimax/index.ts +12 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatMinimax/v1.schema.js +25 -0
- package/dist/node-definitions/nodes/n8n-nodes-langchain/lmChatMinimax/v1.ts +60 -0
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js +2 -0
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +1 -1
- package/dist/nodes/llms/LmChatMinimax/LmChatMinimax.node.d.ts +5 -0
- package/dist/nodes/llms/LmChatMinimax/LmChatMinimax.node.js +155 -0
- package/dist/nodes/llms/LmChatMinimax/LmChatMinimax.node.js.map +1 -0
- package/dist/nodes/llms/LmChatMinimax/minimax.svg +10 -0
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/credentials.json +1 -0
- package/dist/types/nodes.json +2 -1
- package/package.json +9 -7
package/dist/types/nodes.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{"displayName":"Microsoft Agent 365 Trigger","name":"microsoftAgent365Trigger","group":["trigger"],"description":"Trigger for Microsoft Agent 365","codex":{"categories":["Core Nodes"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.microsoftAgent365Trigger/"}]}},"version":[1,1.1],"defaults":{"name":"Microsoft Agent 365"},"inputs":"={{\n\t\t\t\t((hasOutputParser, needsFallback) => {\n\t\t\t\t\tfunction getInputs(hasMainInput, hasOutputParser, needsFallback) {\n const getInputData = (inputs) => {\n return inputs.map(({ type, filter, displayName, required }) => {\n const input = {\n type,\n displayName,\n required,\n maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [\n {\n type: 'ai_languageModel',\n displayName: 'Chat Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n type: 'ai_languageModel',\n displayName: 'Fallback Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n displayName: 'Memory',\n type: 'ai_memory',\n },\n {\n displayName: 'Tool',\n type: 'ai_tool',\n },\n {\n displayName: 'Output Parser',\n type: 'ai_outputParser',\n },\n ];\n if (hasOutputParser === false) {\n specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n }\n if (needsFallback === false) {\n specialInputs = specialInputs.filter((input) => input.displayName !== 'Fallback Model');\n }\n const mainInputs = hasMainInput ? ['main'] : [];\n return [...mainInputs, ...getInputData(specialInputs)];\n};\n\t\t\t\t\treturn getInputs(false, hasOutputParser, needsFallback);\n\t\t\t\t})($parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true, $parameter.needsFallback !== undefined && $parameter.needsFallback === true)\n\t\t\t}}","outputs":["main"],"triggerPanel":false,"webhooks":[{"name":"default","httpMethod":"POST","responseMode":"onReceived","path":"webhook","ndvHideMethod":true},{"name":"default","httpMethod":"HEAD","responseMode":"onReceived","path":"webhook","ndvHideUrl":true,"ndvHideMethod":true}],"credentials":[{"name":"microsoftAgent365Api","required":true}],"properties":[{"displayName":"This is an early preview for building Agents with Microsoft Agent 365 and n8n. You need to be part of the <a href=\"https://adoption.microsoft.com/copilot/frontier-program/\" target=\"_blank\">Frontier preview program</a> to get early access to Microsoft Agent 365. <a href=\"https://github.com/microsoft/Agent365-Samples/tree/main/nodejs/n8n/sample-agent\" target=\"_blank\">Learn more</a>","name":"previewNotice","type":"notice","default":""},{"displayName":"System Prompt","name":"systemPrompt","type":"string","placeholder":"e.g. You are a friendly assistant that helps people find a weather forecast for a given time and place.","default":"","typeOptions":{"rows":4}},{"displayName":"Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true]}}},{"displayName":"Enable Fallback Model","name":"needsFallback","type":"boolean","default":false,"noDataExpression":true,"displayOptions":{"show":{"@version":[{"_cnd":{"gte":2.1}}]}}},{"displayName":"Connect an additional language model on the canvas to use it as a fallback if the main model fails","name":"fallbackNotice","type":"notice","default":"","displayOptions":{"show":{"needsFallback":[true]}}},{"displayName":"Enable Microsoft MCP Tools","name":"useMcpTools","type":"boolean","default":false,"description":"Whether to allow the agent to use Microsoft MCP tools like Calendar, Email, and OneDrive to assist in completing tasks. Requires appropriate permissions in your Microsoft account."},{"displayName":"Tools to Include","name":"include","type":"options","default":"all","displayOptions":{"show":{"useMcpTools":[true]}},"options":[{"name":"All","value":"all"},{"name":"Selected","value":"selected"}]},{"displayName":"Tools to Include","name":"includeTools","type":"multiOptions","default":[],"noDataExpression":true,"options":[{"name":"Admin 365","value":"mcp_Admin365_GraphTools"},{"name":"Admin Tools","value":"mcp_AdminTools"},{"name":"Calendar","value":"mcp_CalendarTools"},{"name":"DA Search","value":"mcp_DASearch"},{"name":"Excel","value":"mcp_ExcelServer"},{"name":"Knowledge","value":"mcp_KnowledgeTools"},{"name":"M365 Copilot","value":"mcp_M365Copilot"},{"name":"Mail","value":"mcp_MailTools"},{"name":"OneDrive","value":"mcp_OneDriveRemoteServer"},{"name":"OneDrive & SharePoint","value":"mcp_ODSPRemoteServer"},{"name":"Planner","value":"mcp_PlannerServer"},{"name":"SharePoint","value":"mcp_SharePointRemoteServer"},{"name":"SharePoint Lists","value":"mcp_SharePointListsTools"},{"name":"Task Personalization","value":"mcp_TaskPersonalizationServer"},{"name":"Teams","value":"mcp_TeamsServer"},{"name":"Teams Canary","value":"mcp_TeamsCanaryServer"},{"name":"Teams V1","value":"mcp_TeamsServerV1"},{"name":"Web Search","value":"mcp_WebSearchTools"},{"name":"Windows 365 Computer Use","value":"mcp_W365ComputerUse"},{"name":"Word","value":"mcp_WordServer"}],"displayOptions":{"show":{"useMcpTools":[true],"include":["selected"]}}},{"displayName":"Require Specific Output Format","name":"hasOutputParser","type":"boolean","default":false,"noDataExpression":true},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Welcome Message","name":"welcomeMessage","type":"string","placeholder":"e.g. Hello! I'm here to help you!","default":"Hello! I'm here to help you!"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vendors/Microsoft/Agent365.svg"},
|
|
10
10
|
{"displayName":"AI Agent","name":"agent","icon":"node:ai-agent","iconColor":"black","group":["transform"],"description":"Generates an action plan and executes it. Can use external tools.","codex":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"categories":["AI"],"subcategories":{"AI":["Agents","Root Nodes"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]}},"defaultVersion":3.1,"builderHint":{"relatedNodes":[{"nodeType":"n8n-nodes-base.aggregate","relationHint":"Use to combine multiple items together before the agent"},{"nodeType":"@n8n/n8n-nodes-langchain.outputParserStructured","relationHint":"Attach for structured output; reference fields as $json.output.fieldName for use in subsequent nodes (conditions, storing data)"},{"nodeType":"@n8n/n8n-nodes-langchain.agentTool","relationHint":"For multi-agent systems using orchestrator pattern"},{"nodeType":"@n8n/n8n-nodes-langchain.memoryBufferWindow","relationHint":"Required for conversational workflows - connect memory to every agent that needs to recall previous messages in the conversation"}],"inputs":{"ai_languageModel":{"required":true},"ai_memory":{"required":false},"ai_tool":{"required":false},"ai_outputParser":{"required":false,"displayOptions":{"show":{"hasOutputParser":[true]}}}}},"version":[3,3.1],"defaults":{"name":"AI Agent","color":"#404040"},"inputs":"={{\n\t\t\t\t((hasOutputParser, needsFallback) => {\n\t\t\t\t\tfunction getInputs(hasMainInput, hasOutputParser, needsFallback) {\n const getInputData = (inputs) => {\n return inputs.map(({ type, filter, displayName, required }) => {\n const input = {\n type,\n displayName,\n required,\n maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [\n {\n type: 'ai_languageModel',\n displayName: 'Chat Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n type: 'ai_languageModel',\n displayName: 'Fallback Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n displayName: 'Memory',\n type: 'ai_memory',\n },\n {\n displayName: 'Tool',\n type: 'ai_tool',\n },\n {\n displayName: 'Output Parser',\n type: 'ai_outputParser',\n },\n ];\n if (hasOutputParser === false) {\n specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n }\n if (needsFallback === false) {\n specialInputs = specialInputs.filter((input) => input.displayName !== 'Fallback Model');\n }\n const mainInputs = hasMainInput ? ['main'] : [];\n return [...mainInputs, ...getInputData(specialInputs)];\n};\n\t\t\t\t\treturn getInputs(true, hasOutputParser, needsFallback);\n\t\t\t\t})($parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true, $parameter.needsFallback !== undefined && $parameter.needsFallback === true)\n\t\t\t}}","outputs":["main"],"properties":[{"displayName":"Tip: Get a feel for agents with our quick <a href=\"https://docs.n8n.io/advanced-ai/intro-tutorial/\" target=\"_blank\">tutorial</a> or see an <a href=\"/workflows/templates/1954\" target=\"_blank\">example</a> of how this node works","name":"aiAgentStarterCallout","type":"callout","default":""},{"displayName":"Source for Prompt (User Message)","name":"promptType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"auto","description":"Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"},{"name":"Connected Guardrails Node","value":"guardrails","description":"Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"},{"name":"Define below","value":"define","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"auto","displayOptions":{"show":{"@version":[{"_cnd":{"lt":3.1}}]}}},{"displayName":"Source for Prompt (User Message)","name":"promptType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"auto","description":"Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"},{"name":"Define below","value":"define","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"auto","builderHint":{"message":"Use 'auto' when following a chat trigger, 'define' when custom prompt needed"},"displayOptions":{"show":{"@version":[{"_cnd":{"gte":3.1}}]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.guardrailsInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["guardrails"]}},"displayOptions":{"show":{"promptType":["guardrails"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.chatInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["auto"]}},"displayOptions":{"show":{"promptType":["auto"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."},"displayOptions":{"show":{"promptType":["define"]}}},{"displayName":"Require Specific Output Format","name":"hasOutputParser","type":"boolean","default":false,"noDataExpression":true},{"displayName":"Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true]}}},{"displayName":"Enable Fallback Model","name":"needsFallback","type":"boolean","default":false,"noDataExpression":true},{"displayName":"Connect an additional language model on the canvas to use it as a fallback if the main model fails","name":"fallbackNotice","type":"notice","default":"","displayOptions":{"show":{"needsFallback":[true]}}},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]},{"displayName":"Auto-save highlighted data","name":"autoSaveHighlightedData","type":"boolean","default":true,"description":"Whether to automatically save <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executiondata/\" target=\"_blank\">highlighted data</a>. This data can then be used to filter executions in the Executions view. Available on Pro and Enterprise plans in n8n Cloud, and on Enterprise or registered Community Edition for self-hosted. Defaults to true."},{"displayName":"Enable Streaming","name":"enableStreaming","type":"boolean","default":true,"description":"Whether this agent will stream the response in real-time as it generates text"},{"displayName":"Batch Processing","name":"batching","type":"collection","placeholder":"Add Batch Processing Option","description":"Batch processing options for rate limiting","default":{},"options":[{"displayName":"Batch Size","name":"batchSize","default":1,"type":"number","description":"How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."},{"displayName":"Delay Between Batches","name":"delayBetweenBatches","default":0,"type":"number","description":"Delay in milliseconds between batches. This is useful for rate limiting."}]},{"displayName":"Max Tokens To Read From Memory","name":"maxTokensFromMemory","type":"hidden","default":0,"description":"The maximum number of tokens to read from the chat memory history. Set to 0 to read all history."}]}],"hints":[{"message":"You are using streaming responses. Make sure to set the response mode to \"Streaming Response\" on the connected trigger node.","type":"warning","location":"outputPane","whenToDisplay":"afterExecution","displayCondition":"={{ $parameter[\"enableStreaming\"] === true }}"}]},
|
|
11
11
|
{"displayName":"AI Agent","name":"agent","icon":"node:ai-agent","iconColor":"black","group":["transform"],"description":"Generates an action plan and executes it. Can use external tools.","codex":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"categories":["AI"],"subcategories":{"AI":["Agents","Root Nodes"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]}},"defaultVersion":3.1,"builderHint":{"relatedNodes":[{"nodeType":"n8n-nodes-base.aggregate","relationHint":"Use to combine multiple items together before the agent"},{"nodeType":"@n8n/n8n-nodes-langchain.outputParserStructured","relationHint":"Attach for structured output; reference fields as $json.output.fieldName for use in subsequent nodes (conditions, storing data)"},{"nodeType":"@n8n/n8n-nodes-langchain.agentTool","relationHint":"For multi-agent systems using orchestrator pattern"},{"nodeType":"@n8n/n8n-nodes-langchain.memoryBufferWindow","relationHint":"Required for conversational workflows - connect memory to every agent that needs to recall previous messages in the conversation"}],"inputs":{"ai_languageModel":{"required":true},"ai_memory":{"required":false},"ai_tool":{"required":false},"ai_outputParser":{"required":false,"displayOptions":{"show":{"hasOutputParser":[true]}}}}},"version":[2,2.1,2.2],"defaults":{"name":"AI Agent","color":"#404040"},"inputs":"={{\n\t\t\t\t((hasOutputParser, needsFallback) => {\n\t\t\t\t\tfunction getInputs(hasMainInput, hasOutputParser, needsFallback) {\n const getInputData = (inputs) => {\n return inputs.map(({ type, filter, displayName, required }) => {\n const input = {\n type,\n displayName,\n required,\n maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [\n {\n type: 'ai_languageModel',\n displayName: 'Chat Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n type: 'ai_languageModel',\n displayName: 'Fallback Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n displayName: 'Memory',\n type: 'ai_memory',\n },\n {\n displayName: 'Tool',\n type: 'ai_tool',\n },\n {\n displayName: 'Output Parser',\n type: 'ai_outputParser',\n },\n ];\n if (hasOutputParser === false) {\n specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n }\n if (needsFallback === false) {\n specialInputs = specialInputs.filter((input) => input.displayName !== 'Fallback Model');\n }\n const mainInputs = hasMainInput ? ['main'] : [];\n return [...mainInputs, ...getInputData(specialInputs)];\n};\n\t\t\t\t\treturn getInputs(true, hasOutputParser, needsFallback);\n\t\t\t\t})($parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true, $parameter.needsFallback !== undefined && $parameter.needsFallback === true)\n\t\t\t}}","outputs":["main"],"properties":[{"displayName":"Tip: Get a feel for agents with our quick <a href=\"https://docs.n8n.io/advanced-ai/intro-tutorial/\" target=\"_blank\">tutorial</a> or see an <a href=\"/workflows/templates/1954\" target=\"_blank\">example</a> of how this node works","name":"aiAgentStarterCallout","type":"callout","default":""},{"displayName":"Source for Prompt (User Message)","name":"promptType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"auto","description":"Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"},{"name":"Connected Guardrails Node","value":"guardrails","description":"Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"},{"name":"Define below","value":"define","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"auto"},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.guardrailsInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["guardrails"]}},"displayOptions":{"show":{"promptType":["guardrails"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.chatInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["auto"]}},"displayOptions":{"show":{"promptType":["auto"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."},"displayOptions":{"show":{"promptType":["define"]}}},{"displayName":"Require Specific Output Format","name":"hasOutputParser","type":"boolean","default":false,"noDataExpression":true},{"displayName":"Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true]}}},{"displayName":"Enable Fallback Model","name":"needsFallback","type":"boolean","default":false,"noDataExpression":true,"displayOptions":{"show":{"@version":[{"_cnd":{"gte":2.1}}]}}},{"displayName":"Connect an additional language model on the canvas to use it as a fallback if the main model fails","name":"fallbackNotice","type":"notice","default":"","displayOptions":{"show":{"needsFallback":[true]}}},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]},{"displayName":"Batch Processing","name":"batching","type":"collection","placeholder":"Add Batch Processing Option","description":"Batch processing options for rate limiting","default":{},"options":[{"displayName":"Batch Size","name":"batchSize","default":1,"type":"number","description":"How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."},{"displayName":"Delay Between Batches","name":"delayBetweenBatches","default":0,"type":"number","description":"Delay in milliseconds between batches. This is useful for rate limiting."}]},{"displayName":"Enable Streaming","name":"enableStreaming","type":"boolean","default":true,"description":"Whether this agent will stream the response in real-time as it generates text"}],"displayOptions":{"hide":{"@version":[{"_cnd":{"lt":2.2}}]}}},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]},{"displayName":"Batch Processing","name":"batching","type":"collection","placeholder":"Add Batch Processing Option","description":"Batch processing options for rate limiting","default":{},"options":[{"displayName":"Batch Size","name":"batchSize","default":1,"type":"number","description":"How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."},{"displayName":"Delay Between Batches","name":"delayBetweenBatches","default":0,"type":"number","description":"Delay in milliseconds between batches. This is useful for rate limiting."}]}],"displayOptions":{"show":{"@version":[{"_cnd":{"lt":2.2}}]}}}],"hints":[{"message":"You are using streaming responses. Make sure to set the response mode to \"Streaming Response\" on the connected trigger node.","type":"warning","location":"outputPane","whenToDisplay":"afterExecution","displayCondition":"={{ $parameter[\"enableStreaming\"] === true }}"}]},
|
|
12
|
-
{"version":[1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9],"displayName":"AI Agent","name":"agent","icon":"node:ai-agent","iconColor":"black","group":["transform"],"description":"Generates an action plan and executes it. Can use external tools.","codex":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"categories":["AI"],"subcategories":{"AI":["Agents","Root Nodes"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]}},"defaultVersion":3.1,"builderHint":{"relatedNodes":[{"nodeType":"n8n-nodes-base.aggregate","relationHint":"Use to combine multiple items together before the agent"},{"nodeType":"@n8n/n8n-nodes-langchain.outputParserStructured","relationHint":"Attach for structured output; reference fields as $json.output.fieldName for use in subsequent nodes (conditions, storing data)"},{"nodeType":"@n8n/n8n-nodes-langchain.agentTool","relationHint":"For multi-agent systems using orchestrator pattern"},{"nodeType":"@n8n/n8n-nodes-langchain.memoryBufferWindow","relationHint":"Required for conversational workflows - connect memory to every agent that needs to recall previous messages in the conversation"}],"inputs":{"ai_languageModel":{"required":true},"ai_memory":{"required":false},"ai_tool":{"required":false},"ai_outputParser":{"required":false,"displayOptions":{"show":{"hasOutputParser":[true]}}}}},"defaults":{"name":"AI Agent","color":"#404040"},"inputs":"={{\n\t\t\t\t((agent, hasOutputParser) => {\n\t\t\t\t\tfunction getInputs(agent, hasOutputParser) {\n const getInputData = (inputs) => {\n const displayNames = {\n ai_languageModel: 'Model',\n ai_memory: 'Memory',\n ai_tool: 'Tool',\n ai_outputParser: 'Output Parser',\n };\n return inputs.map(({ type, filter }) => {\n const isModelType = type === 'ai_languageModel';\n let displayName = type in displayNames ? displayNames[type] : undefined;\n if (isModelType &&\n ['openAiFunctionsAgent', 'toolsAgent', 'conversationalAgent'].includes(agent)) {\n displayName = 'Chat Model';\n }\n const input = {\n type,\n displayName,\n required: isModelType,\n maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [];\n if (agent === 'conversationalAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatAnthropic',\n '@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n '@n8n/n8n-nodes-langchain.lmChatGroq',\n '@n8n/n8n-nodes-langchain.lmChatLemonade',\n '@n8n/n8n-nodes-langchain.lmChatOllama',\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n '@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n '@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n '@n8n/n8n-nodes-langchain.lmChatMoonshot',\n '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n '@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n '@n8n/n8n-nodes-langchain.lmChatVercelAiGateway',\n '@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n '@n8n/n8n-nodes-langchain.modelSelector',\n ],\n },\n },\n {\n type: 'ai_memory',\n },\n {\n type: 'ai_tool',\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'toolsAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatAnthropic',\n '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n '@n8n/n8n-nodes-langchain.lmChatLemonade',\n '@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n '@n8n/n8n-nodes-langchain.lmChatMoonshot',\n '@n8n/n8n-nodes-langchain.lmChatOllama',\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatGroq',\n '@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n '@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n '@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n '@n8n/n8n-nodes-langchain.lmChatVercelAiGateway',\n '@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n ],\n },\n },\n {\n type: 'ai_memory',\n },\n {\n type: 'ai_tool',\n required: true,\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'openAiFunctionsAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n ],\n },\n },\n {\n type: 'ai_memory',\n },\n {\n type: 'ai_tool',\n required: true,\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'reActAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n },\n {\n type: 'ai_tool',\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'sqlAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n },\n {\n type: 'ai_memory',\n },\n ];\n }\n else if (agent === 'planAndExecuteAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n },\n {\n type: 'ai_tool',\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n if (hasOutputParser === false) {\n specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n }\n return ['main', ...getInputData(specialInputs)];\n};\n\t\t\t\t\treturn getInputs(agent, hasOutputParser)\n\t\t\t\t})($parameter.agent, $parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true)\n\t\t\t}}","outputs":["main"],"credentials":[{"name":"mySql","required":true,"testedBy":"mysqlConnectionTest","displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["mysql"]}}},{"name":"postgres","required":true,"displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["postgres"]}}}],"properties":[{"displayName":"Tip: Get a feel for agents with our quick <a href=\"https://docs.n8n.io/advanced-ai/intro-tutorial/\" target=\"_blank\">tutorial</a> or see an <a href=\"/templates/1954\" target=\"_blank\">example</a> of how this node works","name":"aiAgentStarterCallout","type":"callout","default":"","displayOptions":{"show":{"agent":["conversationalAgent","toolsAgent"]}}},{"displayName":"This node is using Agent that has been deprecated. Please switch to using 'Tools Agent' instead.","name":"deprecated","type":"notice","default":"","displayOptions":{"show":{"agent":["conversationalAgent","openAiFunctionsAgent","planAndExecuteAgent","reActAgent","sqlAgent"]}}},{"displayName":"Agent","name":"agent","type":"options","noDataExpression":true,"options":[{"name":"Conversational Agent","value":"conversationalAgent","description":"Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas."},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models."},{"name":"Plan and Execute Agent","value":"planAndExecuteAgent","description":"Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed."},{"name":"ReAct Agent","value":"reActAgent","description":"Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving."},{"name":"SQL Agent","value":"sqlAgent","description":"Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data."}],"default":"conversationalAgent","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.5}}]}}},{"displayName":"Agent","name":"agent","type":"options","noDataExpression":true,"options":[{"name":"Tools Agent","value":"toolsAgent","description":"Utilizes structured tool schemas for precise and reliable tool selection and execution. Recommended for complex tasks requiring accurate and consistent tool usage, but only usable with models that support tool calling."},{"name":"Conversational Agent","value":"conversationalAgent","description":"Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas."},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models."},{"name":"Plan and Execute Agent","value":"planAndExecuteAgent","description":"Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed."},{"name":"ReAct Agent","value":"reActAgent","description":"Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving."},{"name":"SQL Agent","value":"sqlAgent","description":"Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data."}],"default":"toolsAgent","displayOptions":{"show":{"@version":[{"_cnd":{"between":{"from":1.6,"to":1.7}}}]}}},{"displayName":"Agent","name":"agent","type":"hidden","noDataExpression":true,"options":[{"name":"Tools Agent","value":"toolsAgent","description":"Utilizes structured tool schemas for precise and reliable tool selection and execution. Recommended for complex tasks requiring accurate and consistent tool usage, but only usable with models that support tool calling."},{"name":"Conversational Agent","value":"conversationalAgent","description":"Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas."},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models."},{"name":"Plan and Execute Agent","value":"planAndExecuteAgent","description":"Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed."},{"name":"ReAct Agent","value":"reActAgent","description":"Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving."},{"name":"SQL Agent","value":"sqlAgent","description":"Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data."}],"default":"toolsAgent","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.8}}]}}},{"displayName":"Source for Prompt (User Message)","name":"promptType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"auto","description":"Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"},{"name":"Connected Guardrails Node","value":"guardrails","description":"Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"},{"name":"Define below","value":"define","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"auto","displayOptions":{"hide":{"@version":[{"_cnd":{"lte":1.2}}],"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.guardrailsInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["guardrails"]}},"displayOptions":{"show":{"promptType":["guardrails"],"@version":[{"_cnd":{"gte":1.7}}]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.chatInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["auto"]}},"displayOptions":{"show":{"promptType":["auto"],"@version":[{"_cnd":{"gte":1.7}}]},"hide":{"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."},"displayOptions":{"show":{"promptType":["define"]},"hide":{"agent":["sqlAgent"]}}},{"displayName":"For more reliable structured output parsing, consider using the Tools agent","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true],"agent":["conversationalAgent","reActAgent","planAndExecuteAgent","openAiFunctionsAgent"]}}},{"displayName":"Require Specific Output Format","name":"hasOutputParser","type":"boolean","default":false,"noDataExpression":true,"displayOptions":{"hide":{"@version":[{"_cnd":{"lte":1.2}}],"agent":["sqlAgent"]}}},{"displayName":"Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true],"agent":["toolsAgent"]}}},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["toolsAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["conversationalAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["conversationalAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["conversationalAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["conversationalAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message","name":"humanMessage","type":"string","default":"TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}","description":"The message that will provide the agent with a list of tools to use","typeOptions":{"rows":6}},{"displayName":"System Message","name":"systemMessage","type":"string","default":"Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["openAiFunctionsAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["openAiFunctionsAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["openAiFunctionsAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["openAiFunctionsAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful AI assistant.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["reActAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["reActAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["reActAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["reActAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message Template","name":"humanMessageTemplate","type":"string","default":"{input}\n\n{agent_scratchpad}","description":"String to use directly as the human message template","typeOptions":{"rows":6}},{"displayName":"Prefix Message","name":"prefix","type":"string","default":"Answer the following questions as best you can. You have access to the following tools:","description":"String to put before the list of tools","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Chat Model","name":"suffixChat","type":"string","default":"Begin! Reminder to always use the exact characters `Final Answer` when responding.","description":"String to put after the list of tools that will be used if chat model is used","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Regular Model","name":"suffix","type":"string","default":"Begin!\n\n\tQuestion: {input}\n\tThought:{agent_scratchpad}","description":"String to put after the list of tools that will be used if regular model is used","typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Data Source","name":"dataSource","type":"options","displayOptions":{"show":{"agent":["sqlAgent"],"@version":[{"_cnd":{"lt":1.4}}]}},"default":"sqlite","description":"SQL database to connect to","options":[{"name":"MySQL","value":"mysql","description":"Connect to a MySQL database"},{"name":"Postgres","value":"postgres","description":"Connect to a Postgres database"},{"name":"SQLite","value":"sqlite","description":"Use SQLite by connecting a database file as binary input"}]},{"displayName":"Data Source","name":"dataSource","type":"options","displayOptions":{"show":{"agent":["sqlAgent"],"@version":[{"_cnd":{"gte":1.4}}]}},"default":"postgres","description":"SQL database to connect to","options":[{"name":"MySQL","value":"mysql","description":"Connect to a MySQL database"},{"name":"Postgres","value":"postgres","description":"Connect to a Postgres database"},{"name":"SQLite","value":"sqlite","description":"Use SQLite by connecting a database file as binary input"}]},{"displayName":"Credentials","name":"credentials","type":"credentials","default":""},{"displayName":"Pass the SQLite database into this node as binary data, e.g. by inserting a 'Read/Write Files from Disk' node beforehand","name":"sqLiteFileNotice","type":"notice","default":"","displayOptions":{"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}},{"displayName":"Input Binary Field","name":"binaryPropertyName","type":"string","default":"data","required":true,"placeholder":"e.g data","hint":"The name of the input binary field containing the file to be extracted","displayOptions":{"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}},{"displayName":"Prompt","name":"input","type":"string","displayOptions":{"show":{"agent":["sqlAgent"],"@version":[{"_cnd":{"lte":1.2}}]}},"default":"","required":true,"typeOptions":{"rows":5}},{"displayName":"Source for Prompt (User Message)","name":"promptType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"auto","description":"Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"},{"name":"Connected Guardrails Node","value":"guardrails","description":"Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"},{"name":"Define below","value":"define","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"auto","displayOptions":{"hide":{"@version":[{"_cnd":{"lte":1.2}}]},"show":{"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.guardrailsInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["guardrails"]}},"displayOptions":{"show":{"promptType":["guardrails"],"@version":[{"_cnd":{"gte":1.7}}],"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.chatInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["auto"]}},"displayOptions":{"show":{"promptType":["auto"],"@version":[{"_cnd":{"gte":1.7}}],"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."},"displayOptions":{"show":{"promptType":["define"],"agent":["sqlAgent"]}}},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Ignored Tables","name":"ignoredTables","type":"string","default":"","description":"Comma-separated list of tables to ignore from the database. If empty, no tables are ignored."},{"displayName":"Include Sample Rows","name":"includedSampleRows","type":"number","description":"Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.","default":3},{"displayName":"Included Tables","name":"includedTables","type":"string","default":"","description":"Comma-separated list of tables to include in the database. If empty, all tables are included."},{"displayName":"Prefix Prompt","name":"prefixPrompt","type":"string","default":"You are an agent designed to interact with an SQL database.\nGiven an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.\nUnless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results using the LIMIT clause.\nYou can order the results by a relevant column to return the most interesting examples in the database.\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\nYou have access to tools for interacting with the database.\nOnly use the below tools. Only use the information returned by the below tools to construct your final answer.\nYou MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return \"I don't know\" as the answer.","description":"Prefix prompt to use for the agent","typeOptions":{"rows":10}},{"displayName":"Suffix Prompt","name":"suffixPrompt","type":"string","default":"Begin!\nChat History:\n{chatHistory}\n\nQuestion: {input}\nThought: I should look at the tables in the database to see what I can query.\n{agent_scratchpad}","description":"Suffix prompt to use for the agent","typeOptions":{"rows":4}},{"displayName":"Limit","name":"topK","type":"number","default":10,"description":"The maximum number of results to return"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["planAndExecuteAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["planAndExecuteAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["planAndExecuteAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["planAndExecuteAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message Template","name":"humanMessageTemplate","type":"string","default":"Previous steps: {previous_steps}\n\nCurrent objective: {current_step}\n\n{agent_scratchpad}\n\nYou may extract and combine relevant data from your previous steps when responding to me.","description":"The message that will be sent to the agent during each step execution","typeOptions":{"rows":6}},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]}]},
|
|
12
|
+
{"version":[1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9],"displayName":"AI Agent","name":"agent","icon":"node:ai-agent","iconColor":"black","group":["transform"],"description":"Generates an action plan and executes it. Can use external tools.","codex":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"categories":["AI"],"subcategories":{"AI":["Agents","Root Nodes"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]}},"defaultVersion":3.1,"builderHint":{"relatedNodes":[{"nodeType":"n8n-nodes-base.aggregate","relationHint":"Use to combine multiple items together before the agent"},{"nodeType":"@n8n/n8n-nodes-langchain.outputParserStructured","relationHint":"Attach for structured output; reference fields as $json.output.fieldName for use in subsequent nodes (conditions, storing data)"},{"nodeType":"@n8n/n8n-nodes-langchain.agentTool","relationHint":"For multi-agent systems using orchestrator pattern"},{"nodeType":"@n8n/n8n-nodes-langchain.memoryBufferWindow","relationHint":"Required for conversational workflows - connect memory to every agent that needs to recall previous messages in the conversation"}],"inputs":{"ai_languageModel":{"required":true},"ai_memory":{"required":false},"ai_tool":{"required":false},"ai_outputParser":{"required":false,"displayOptions":{"show":{"hasOutputParser":[true]}}}}},"defaults":{"name":"AI Agent","color":"#404040"},"inputs":"={{\n\t\t\t\t((agent, hasOutputParser) => {\n\t\t\t\t\tfunction getInputs(agent, hasOutputParser) {\n const getInputData = (inputs) => {\n const displayNames = {\n ai_languageModel: 'Model',\n ai_memory: 'Memory',\n ai_tool: 'Tool',\n ai_outputParser: 'Output Parser',\n };\n return inputs.map(({ type, filter }) => {\n const isModelType = type === 'ai_languageModel';\n let displayName = type in displayNames ? displayNames[type] : undefined;\n if (isModelType &&\n ['openAiFunctionsAgent', 'toolsAgent', 'conversationalAgent'].includes(agent)) {\n displayName = 'Chat Model';\n }\n const input = {\n type,\n displayName,\n required: isModelType,\n maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [];\n if (agent === 'conversationalAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatAnthropic',\n '@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n '@n8n/n8n-nodes-langchain.lmChatGroq',\n '@n8n/n8n-nodes-langchain.lmChatLemonade',\n '@n8n/n8n-nodes-langchain.lmChatOllama',\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n '@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n '@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n '@n8n/n8n-nodes-langchain.lmChatMinimax',\n '@n8n/n8n-nodes-langchain.lmChatMoonshot',\n '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n '@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n '@n8n/n8n-nodes-langchain.lmChatVercelAiGateway',\n '@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n '@n8n/n8n-nodes-langchain.modelSelector',\n ],\n },\n },\n {\n type: 'ai_memory',\n },\n {\n type: 'ai_tool',\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'toolsAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatAnthropic',\n '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n '@n8n/n8n-nodes-langchain.lmChatLemonade',\n '@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n '@n8n/n8n-nodes-langchain.lmChatMinimax',\n '@n8n/n8n-nodes-langchain.lmChatMoonshot',\n '@n8n/n8n-nodes-langchain.lmChatOllama',\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatGroq',\n '@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n '@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n '@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n '@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n '@n8n/n8n-nodes-langchain.lmChatVercelAiGateway',\n '@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n ],\n },\n },\n {\n type: 'ai_memory',\n },\n {\n type: 'ai_tool',\n required: true,\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'openAiFunctionsAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n ],\n },\n },\n {\n type: 'ai_memory',\n },\n {\n type: 'ai_tool',\n required: true,\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'reActAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n },\n {\n type: 'ai_tool',\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n else if (agent === 'sqlAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n },\n {\n type: 'ai_memory',\n },\n ];\n }\n else if (agent === 'planAndExecuteAgent') {\n specialInputs = [\n {\n type: 'ai_languageModel',\n },\n {\n type: 'ai_tool',\n },\n {\n type: 'ai_outputParser',\n },\n ];\n }\n if (hasOutputParser === false) {\n specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n }\n return ['main', ...getInputData(specialInputs)];\n};\n\t\t\t\t\treturn getInputs(agent, hasOutputParser)\n\t\t\t\t})($parameter.agent, $parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true)\n\t\t\t}}","outputs":["main"],"credentials":[{"name":"mySql","required":true,"testedBy":"mysqlConnectionTest","displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["mysql"]}}},{"name":"postgres","required":true,"displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["postgres"]}}}],"properties":[{"displayName":"Tip: Get a feel for agents with our quick <a href=\"https://docs.n8n.io/advanced-ai/intro-tutorial/\" target=\"_blank\">tutorial</a> or see an <a href=\"/templates/1954\" target=\"_blank\">example</a> of how this node works","name":"aiAgentStarterCallout","type":"callout","default":"","displayOptions":{"show":{"agent":["conversationalAgent","toolsAgent"]}}},{"displayName":"This node is using Agent that has been deprecated. Please switch to using 'Tools Agent' instead.","name":"deprecated","type":"notice","default":"","displayOptions":{"show":{"agent":["conversationalAgent","openAiFunctionsAgent","planAndExecuteAgent","reActAgent","sqlAgent"]}}},{"displayName":"Agent","name":"agent","type":"options","noDataExpression":true,"options":[{"name":"Conversational Agent","value":"conversationalAgent","description":"Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas."},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models."},{"name":"Plan and Execute Agent","value":"planAndExecuteAgent","description":"Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed."},{"name":"ReAct Agent","value":"reActAgent","description":"Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving."},{"name":"SQL Agent","value":"sqlAgent","description":"Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data."}],"default":"conversationalAgent","displayOptions":{"show":{"@version":[{"_cnd":{"lte":1.5}}]}}},{"displayName":"Agent","name":"agent","type":"options","noDataExpression":true,"options":[{"name":"Tools Agent","value":"toolsAgent","description":"Utilizes structured tool schemas for precise and reliable tool selection and execution. Recommended for complex tasks requiring accurate and consistent tool usage, but only usable with models that support tool calling."},{"name":"Conversational Agent","value":"conversationalAgent","description":"Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas."},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models."},{"name":"Plan and Execute Agent","value":"planAndExecuteAgent","description":"Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed."},{"name":"ReAct Agent","value":"reActAgent","description":"Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving."},{"name":"SQL Agent","value":"sqlAgent","description":"Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data."}],"default":"toolsAgent","displayOptions":{"show":{"@version":[{"_cnd":{"between":{"from":1.6,"to":1.7}}}]}}},{"displayName":"Agent","name":"agent","type":"hidden","noDataExpression":true,"options":[{"name":"Tools Agent","value":"toolsAgent","description":"Utilizes structured tool schemas for precise and reliable tool selection and execution. Recommended for complex tasks requiring accurate and consistent tool usage, but only usable with models that support tool calling."},{"name":"Conversational Agent","value":"conversationalAgent","description":"Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas."},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models."},{"name":"Plan and Execute Agent","value":"planAndExecuteAgent","description":"Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed."},{"name":"ReAct Agent","value":"reActAgent","description":"Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving."},{"name":"SQL Agent","value":"sqlAgent","description":"Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data."}],"default":"toolsAgent","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.8}}]}}},{"displayName":"Source for Prompt (User Message)","name":"promptType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"auto","description":"Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"},{"name":"Connected Guardrails Node","value":"guardrails","description":"Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"},{"name":"Define below","value":"define","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"auto","displayOptions":{"hide":{"@version":[{"_cnd":{"lte":1.2}}],"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.guardrailsInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["guardrails"]}},"displayOptions":{"show":{"promptType":["guardrails"],"@version":[{"_cnd":{"gte":1.7}}]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.chatInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["auto"]}},"displayOptions":{"show":{"promptType":["auto"],"@version":[{"_cnd":{"gte":1.7}}]},"hide":{"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."},"displayOptions":{"show":{"promptType":["define"]},"hide":{"agent":["sqlAgent"]}}},{"displayName":"For more reliable structured output parsing, consider using the Tools agent","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true],"agent":["conversationalAgent","reActAgent","planAndExecuteAgent","openAiFunctionsAgent"]}}},{"displayName":"Require Specific Output Format","name":"hasOutputParser","type":"boolean","default":false,"noDataExpression":true,"displayOptions":{"hide":{"@version":[{"_cnd":{"lte":1.2}}],"agent":["sqlAgent"]}}},{"displayName":"Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true],"agent":["toolsAgent"]}}},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["toolsAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["conversationalAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["conversationalAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["conversationalAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["conversationalAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message","name":"humanMessage","type":"string","default":"TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}","description":"The message that will provide the agent with a list of tools to use","typeOptions":{"rows":6}},{"displayName":"System Message","name":"systemMessage","type":"string","default":"Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["openAiFunctionsAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["openAiFunctionsAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["openAiFunctionsAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["openAiFunctionsAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful AI assistant.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["reActAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["reActAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["reActAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["reActAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message Template","name":"humanMessageTemplate","type":"string","default":"{input}\n\n{agent_scratchpad}","description":"String to use directly as the human message template","typeOptions":{"rows":6}},{"displayName":"Prefix Message","name":"prefix","type":"string","default":"Answer the following questions as best you can. You have access to the following tools:","description":"String to put before the list of tools","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Chat Model","name":"suffixChat","type":"string","default":"Begin! Reminder to always use the exact characters `Final Answer` when responding.","description":"String to put after the list of tools that will be used if chat model is used","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Regular Model","name":"suffix","type":"string","default":"Begin!\n\n\tQuestion: {input}\n\tThought:{agent_scratchpad}","description":"String to put after the list of tools that will be used if regular model is used","typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Data Source","name":"dataSource","type":"options","displayOptions":{"show":{"agent":["sqlAgent"],"@version":[{"_cnd":{"lt":1.4}}]}},"default":"sqlite","description":"SQL database to connect to","options":[{"name":"MySQL","value":"mysql","description":"Connect to a MySQL database"},{"name":"Postgres","value":"postgres","description":"Connect to a Postgres database"},{"name":"SQLite","value":"sqlite","description":"Use SQLite by connecting a database file as binary input"}]},{"displayName":"Data Source","name":"dataSource","type":"options","displayOptions":{"show":{"agent":["sqlAgent"],"@version":[{"_cnd":{"gte":1.4}}]}},"default":"postgres","description":"SQL database to connect to","options":[{"name":"MySQL","value":"mysql","description":"Connect to a MySQL database"},{"name":"Postgres","value":"postgres","description":"Connect to a Postgres database"},{"name":"SQLite","value":"sqlite","description":"Use SQLite by connecting a database file as binary input"}]},{"displayName":"Credentials","name":"credentials","type":"credentials","default":""},{"displayName":"Pass the SQLite database into this node as binary data, e.g. by inserting a 'Read/Write Files from Disk' node beforehand","name":"sqLiteFileNotice","type":"notice","default":"","displayOptions":{"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}},{"displayName":"Input Binary Field","name":"binaryPropertyName","type":"string","default":"data","required":true,"placeholder":"e.g data","hint":"The name of the input binary field containing the file to be extracted","displayOptions":{"show":{"agent":["sqlAgent"],"dataSource":["sqlite"]}}},{"displayName":"Prompt","name":"input","type":"string","displayOptions":{"show":{"agent":["sqlAgent"],"@version":[{"_cnd":{"lte":1.2}}]}},"default":"","required":true,"typeOptions":{"rows":5}},{"displayName":"Source for Prompt (User Message)","name":"promptType","type":"options","options":[{"name":"Connected Chat Trigger Node","value":"auto","description":"Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"},{"name":"Connected Guardrails Node","value":"guardrails","description":"Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"},{"name":"Define below","value":"define","description":"Use an expression to reference data in previous nodes or enter static text"}],"default":"auto","displayOptions":{"hide":{"@version":[{"_cnd":{"lte":1.2}}]},"show":{"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.guardrailsInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["guardrails"]}},"displayOptions":{"show":{"promptType":["guardrails"],"@version":[{"_cnd":{"gte":1.7}}],"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"={{ $json.chatInput }}","typeOptions":{"rows":2},"disabledOptions":{"show":{"promptType":["auto"]}},"displayOptions":{"show":{"promptType":["auto"],"@version":[{"_cnd":{"gte":1.7}}],"agent":["sqlAgent"]}}},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."},"displayOptions":{"show":{"promptType":["define"],"agent":["sqlAgent"]}}},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Ignored Tables","name":"ignoredTables","type":"string","default":"","description":"Comma-separated list of tables to ignore from the database. If empty, no tables are ignored."},{"displayName":"Include Sample Rows","name":"includedSampleRows","type":"number","description":"Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.","default":3},{"displayName":"Included Tables","name":"includedTables","type":"string","default":"","description":"Comma-separated list of tables to include in the database. If empty, all tables are included."},{"displayName":"Prefix Prompt","name":"prefixPrompt","type":"string","default":"You are an agent designed to interact with an SQL database.\nGiven an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.\nUnless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results using the LIMIT clause.\nYou can order the results by a relevant column to return the most interesting examples in the database.\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\nYou have access to tools for interacting with the database.\nOnly use the below tools. Only use the information returned by the below tools to construct your final answer.\nYou MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return \"I don't know\" as the answer.","description":"Prefix prompt to use for the agent","typeOptions":{"rows":10}},{"displayName":"Suffix Prompt","name":"suffixPrompt","type":"string","default":"Begin!\nChat History:\n{chatHistory}\n\nQuestion: {input}\nThought: I should look at the tables in the database to see what I can query.\n{agent_scratchpad}","description":"Suffix prompt to use for the agent","typeOptions":{"rows":4}},{"displayName":"Limit","name":"topK","type":"number","default":10,"description":"The maximum number of results to return"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["planAndExecuteAgent"],"@version":[1]}},"default":"={{ $json.input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["planAndExecuteAgent"],"@version":[1.1]}},"default":"={{ $json.chat_input }}"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["planAndExecuteAgent"],"@version":[1.2]}},"default":"={{ $json.chatInput }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["planAndExecuteAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message Template","name":"humanMessageTemplate","type":"string","default":"Previous steps: {previous_steps}\n\nCurrent objective: {current_step}\n\n{agent_scratchpad}\n\nYou may extract and combine relevant data from your previous steps when responding to me.","description":"The message that will be sent to the agent during each step execution","typeOptions":{"rows":6}},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]}]}]},
|
|
13
13
|
{"displayName":"AI Agent Tool","name":"agentTool","icon":"fa:robot","iconColor":"black","group":["transform"],"description":"Generates an action plan and executes it. Can use external tools.","codex":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"categories":["AI"],"subcategories":{"AI":["Tools"],"Tools":["Recommended Tools"]}},"defaultVersion":3,"version":[2.2],"defaults":{"name":"AI Agent Tool","color":"#404040"},"inputs":"={{\n\t\t\t\t((hasOutputParser, needsFallback) => {\n\t\t\t\t\tfunction getInputs(hasMainInput, hasOutputParser, needsFallback) {\n const getInputData = (inputs) => {\n return inputs.map(({ type, filter, displayName, required }) => {\n const input = {\n type,\n displayName,\n required,\n maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [\n {\n type: 'ai_languageModel',\n displayName: 'Chat Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n type: 'ai_languageModel',\n displayName: 'Fallback Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n displayName: 'Memory',\n type: 'ai_memory',\n },\n {\n displayName: 'Tool',\n type: 'ai_tool',\n },\n {\n displayName: 'Output Parser',\n type: 'ai_outputParser',\n },\n ];\n if (hasOutputParser === false) {\n specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n }\n if (needsFallback === false) {\n specialInputs = specialInputs.filter((input) => input.displayName !== 'Fallback Model');\n }\n const mainInputs = hasMainInput ? ['main'] : [];\n return [...mainInputs, ...getInputData(specialInputs)];\n};\n\t\t\t\t\treturn getInputs(false, hasOutputParser, needsFallback)\n\t\t\t\t})($parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true, $parameter.needsFallback !== undefined && $parameter.needsFallback === true)\n\t\t\t}}","outputs":["ai_tool"],"builderHint":{"inputs":{"ai_languageModel":{"required":true},"ai_memory":{"required":false},"ai_tool":{"required":false},"ai_outputParser":{"required":false,"displayOptions":{"show":{"hasOutputParser":[true]}}}}},"properties":[{"displayName":"Description","name":"toolDescription","type":"string","default":"AI Agent that can call other tools","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often"},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."}},{"displayName":"Require Specific Output Format","name":"hasOutputParser","type":"boolean","default":false,"noDataExpression":true},{"displayName":"Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true]}}},{"displayName":"Enable Fallback Model","name":"needsFallback","type":"boolean","default":false,"noDataExpression":true,"displayOptions":{"show":{"@version":[{"_cnd":{"gte":2.1}}]}}},{"displayName":"Connect an additional language model on the canvas to use it as a fallback if the main model fails","name":"fallbackNotice","type":"notice","default":"","displayOptions":{"show":{"needsFallback":[true]}}},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]},{"displayName":"Batch Processing","name":"batching","type":"collection","placeholder":"Add Batch Processing Option","description":"Batch processing options for rate limiting","default":{},"options":[{"displayName":"Batch Size","name":"batchSize","default":1,"type":"number","description":"How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."},{"displayName":"Delay Between Batches","name":"delayBetweenBatches","default":0,"type":"number","description":"Delay in milliseconds between batches. This is useful for rate limiting."}]}],"displayOptions":{"hide":{"@version":[{"_cnd":{"lt":2.2}}]}}},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]},{"displayName":"Batch Processing","name":"batching","type":"collection","placeholder":"Add Batch Processing Option","description":"Batch processing options for rate limiting","default":{},"options":[{"displayName":"Batch Size","name":"batchSize","default":1,"type":"number","description":"How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."},{"displayName":"Delay Between Batches","name":"delayBetweenBatches","default":0,"type":"number","description":"Delay in milliseconds between batches. This is useful for rate limiting."}]}],"displayOptions":{"show":{"@version":[{"_cnd":{"lt":2.2}}]}}}]},
|
|
14
14
|
{"displayName":"AI Agent Tool","name":"agentTool","icon":"fa:robot","iconColor":"black","group":["transform"],"description":"Generates an action plan and executes it. Can use external tools.","codex":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"categories":["AI"],"subcategories":{"AI":["Tools"],"Tools":["Recommended Tools"]}},"defaultVersion":3,"version":[3],"defaults":{"name":"AI Agent Tool","color":"#404040"},"inputs":"={{\n\t\t\t\t((hasOutputParser, needsFallback) => {\n\t\t\t\t\tfunction getInputs(hasMainInput, hasOutputParser, needsFallback) {\n const getInputData = (inputs) => {\n return inputs.map(({ type, filter, displayName, required }) => {\n const input = {\n type,\n displayName,\n required,\n maxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [\n {\n type: 'ai_languageModel',\n displayName: 'Chat Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n type: 'ai_languageModel',\n displayName: 'Fallback Model',\n required: true,\n filter: {\n excludedNodes: [\n '@n8n/n8n-nodes-langchain.lmCohere',\n '@n8n/n8n-nodes-langchain.lmOllama',\n 'n8n/n8n-nodes-langchain.lmOpenAi',\n '@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference',\n ],\n },\n },\n {\n displayName: 'Memory',\n type: 'ai_memory',\n },\n {\n displayName: 'Tool',\n type: 'ai_tool',\n },\n {\n displayName: 'Output Parser',\n type: 'ai_outputParser',\n },\n ];\n if (hasOutputParser === false) {\n specialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n }\n if (needsFallback === false) {\n specialInputs = specialInputs.filter((input) => input.displayName !== 'Fallback Model');\n }\n const mainInputs = hasMainInput ? ['main'] : [];\n return [...mainInputs, ...getInputData(specialInputs)];\n};\n\t\t\t\t\treturn getInputs(false, hasOutputParser, needsFallback)\n\t\t\t\t})($parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true, $parameter.needsFallback !== undefined && $parameter.needsFallback === true)\n\t\t\t}}","outputs":["ai_tool"],"builderHint":{"inputs":{"ai_languageModel":{"required":true},"ai_memory":{"required":false},"ai_tool":{"required":false},"ai_outputParser":{"required":false,"displayOptions":{"show":{"hasOutputParser":[true]}}}}},"properties":[{"displayName":"Description","name":"toolDescription","type":"string","default":"AI Agent that can call other tools","required":true,"typeOptions":{"rows":2},"description":"Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often"},{"displayName":"Prompt (User Message)","name":"text","type":"string","required":true,"default":"","placeholder":"e.g. Hello, how can you help me?","typeOptions":{"rows":2},"builderHint":{"placeholderSupported":false,"message":"Use expressions to include dynamic data from previous nodes (e.g., \"={{ $json.input }}\"). Static text prompts ignore incoming data."}},{"displayName":"Require Specific Output Format","name":"hasOutputParser","type":"boolean","default":false,"noDataExpression":true},{"displayName":"Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require","name":"notice","type":"notice","default":"","displayOptions":{"show":{"hasOutputParser":[true]}}},{"displayName":"Enable Fallback Model","name":"needsFallback","type":"boolean","default":false,"noDataExpression":true},{"displayName":"Connect an additional language model on the canvas to use it as a fallback if the main model fails","name":"fallbackNotice","type":"notice","default":"","displayOptions":{"show":{"needsFallback":[true]}}},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful assistant","description":"The message that will be sent to the agent before the conversation starts","builderHint":{"message":"Must include: agent's purpose, exact names of connected tools, and response instructions"},"typeOptions":{"rows":6}},{"displayName":"Max Iterations","name":"maxIterations","type":"number","default":10,"description":"The maximum number of iterations the agent will run before stopping"},{"displayName":"Return Intermediate Steps","name":"returnIntermediateSteps","type":"boolean","default":false,"description":"Whether or not the output should include intermediate steps the agent took"},{"displayName":"Automatically Passthrough Binary Images","name":"passthroughBinaryImages","type":"boolean","default":true,"description":"Whether or not binary images should be automatically passed through to the agent as image type messages"},{"displayName":"Tracing Metadata","name":"tracingMetadata","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{},"placeholder":"Add Metadata","description":"Custom metadata added to tracing events","options":[{"displayName":"Metadata","name":"values","values":[{"displayName":"Key","name":"key","type":"string","default":""},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"Array","value":"arrayValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Number","value":"numberValue"},{"name":"Object","value":"objectValue"},{"name":"String","value":"stringValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}}},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number"},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}}},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array"},{"displayName":"Value","name":"objectValue","type":"json","default":"={}","typeOptions":{"rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object"}]}]},{"displayName":"Auto-save highlighted data","name":"autoSaveHighlightedData","type":"boolean","default":true,"description":"Whether to automatically save <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executiondata/\" target=\"_blank\">highlighted data</a>. This data can then be used to filter executions in the Executions view. Available on Pro and Enterprise plans in n8n Cloud, and on Enterprise or registered Community Edition for self-hosted. Defaults to true."},{"displayName":"Enable Streaming","name":"enableStreaming","type":"boolean","default":true,"description":"Whether this agent will stream the response in real-time as it generates text"},{"displayName":"Batch Processing","name":"batching","type":"collection","placeholder":"Add Batch Processing Option","description":"Batch processing options for rate limiting","default":{},"options":[{"displayName":"Batch Size","name":"batchSize","default":1,"type":"number","description":"How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."},{"displayName":"Delay Between Batches","name":"delayBetweenBatches","default":0,"type":"number","description":"Delay in milliseconds between batches. This is useful for rate limiting."}]},{"displayName":"Max Tokens To Read From Memory","name":"maxTokensFromMemory","type":"hidden","default":0,"description":"The maximum number of tokens to read from the chat memory history. Set to 0 to read all history."}]}]},
|
|
15
15
|
{"displayName":"OpenAI Assistant","name":"openAiAssistant","hidden":true,"icon":"fa:robot","group":["transform"],"version":[1,1.1],"description":"Utilizes Assistant API from Open AI.","subtitle":"Open AI Assistant","defaults":{"name":"OpenAI Assistant","color":"#404040"},"codex":{"alias":["LangChain"],"categories":["AI"],"subcategories":{"AI":["Agents","Root Nodes"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.openaiassistant/"}]}},"inputs":[{"type":"main"},{"type":"ai_tool","displayName":"Tools"}],"outputs":["main"],"builderHint":{"inputs":{"ai_tool":{"required":false}}},"credentials":[{"name":"openAiApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $parameter.options?.baseURL?.split(\"/\").slice(0,-1).join(\"/\") || \"https://api.openai.com\" }}"},"properties":[{"displayName":"Operation","name":"mode","type":"options","noDataExpression":true,"default":"existing","options":[{"name":"Use New Assistant","value":"new"},{"name":"Use Existing Assistant","value":"existing"}]},{"displayName":"Name","name":"name","type":"string","default":"","required":true,"displayOptions":{"show":{"/mode":["new"]}}},{"displayName":"Instructions","name":"instructions","type":"string","description":"How the Assistant and model should behave or respond","default":"","typeOptions":{"rows":5},"displayOptions":{"show":{"/mode":["new"]}}},{"displayName":"Model","name":"model","type":"options","description":"The model which will be used to power the assistant. <a href=\"https://beta.openai.com/docs/models/overview\">Learn more</a>. The Retrieval tool requires gpt-3.5-turbo-1106 and gpt-4-1106-preview models.","required":true,"displayOptions":{"show":{"/mode":["new"]}},"typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || \"v1\" }}/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"filter","properties":{"pass":"={{ $responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct') }}"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"gpt-3.5-turbo-1106"},{"displayName":"Assistant","name":"assistantId","type":"options","noDataExpression":true,"displayOptions":{"show":{"/mode":["existing"]}},"description":"The assistant to use. <a href=\"https://beta.openai.com/docs/assistants/overview\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","headers":{"OpenAI-Beta":"assistants=v1"},"url":"={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || \"v1\" }}/assistants"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.name}}","value":"={{$responseItem.id}}","description":"={{$responseItem.model}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"assistant"}},"required":true,"default":""},{"displayName":"Text","name":"text","type":"string","required":true,"default":"={{ $json.chat_input }}","displayOptions":{"show":{"@version":[1]}}},{"displayName":"Text","name":"text","type":"string","required":true,"default":"={{ $json.chatInput }}","displayOptions":{"show":{"@version":[1.1]}}},{"displayName":"OpenAI Tools","name":"nativeTools","type":"multiOptions","default":[],"options":[{"name":"Code Interpreter","value":"code_interpreter"},{"name":"Knowledge Retrieval","value":"retrieval"}]},{"displayName":"Connect your own custom tools to this node on the canvas","name":"noticeTools","type":"notice","default":""},{"displayName":"Upload files for retrieval using the <a href=\"https://platform.openai.com/playground\" target=\"_blank\">OpenAI website<a/>","name":"noticeTools","type":"notice","typeOptions":{"noticeTheme":"info"},"displayOptions":{"show":{"/nativeTools":["retrieval"]}},"default":""},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Base URL","name":"baseURL","default":"https://api.openai.com/v1","description":"Override the default base URL for the API","type":"string"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Timeout","name":"timeout","default":10000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"}]}]},
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
{"displayName":"Google Vertex Chat Model","name":"lmChatGoogleVertex","group":["transform"],"version":1,"description":"Chat Model Google Vertex","defaults":{"name":"Google Vertex Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglevertex/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"googleApi","required":true}],"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Project ID","name":"projectId","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"description":"Select or enter your Google Cloud project ID","modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"gcpProjectsList"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Model Name","name":"modelName","type":"string","description":"The model which will generate the completion. <a href=\"https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models\">Learn more</a>.","default":"gemini-2.5-flash"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Maximum Number of Tokens","name":"maxOutputTokens","default":2048,"description":"The maximum number of tokens to generate in the completion","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.4,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Top K","name":"topK","default":32,"typeOptions":{"maxValue":40,"minValue":-1,"numberPrecision":1},"description":"Used to remove \"long tail\" low probability responses. Defaults to -1, which disables it.","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"},{"displayName":"Safety Settings","name":"safetySettings","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{"values":{"category":"HARM_CATEGORY_HARASSMENT","threshold":"HARM_BLOCK_THRESHOLD_UNSPECIFIED"}},"placeholder":"Add Option","options":[{"name":"values","displayName":"Values","values":[{"displayName":"Safety Category","name":"category","type":"options","description":"The category of harmful content to block","default":"HARM_CATEGORY_UNSPECIFIED","options":[{"value":"HARM_CATEGORY_HARASSMENT","name":"HARM_CATEGORY_HARASSMENT","description":"Harassment content"},{"value":"HARM_CATEGORY_HATE_SPEECH","name":"HARM_CATEGORY_HATE_SPEECH","description":"Hate speech and content"},{"value":"HARM_CATEGORY_SEXUALLY_EXPLICIT","name":"HARM_CATEGORY_SEXUALLY_EXPLICIT","description":"Sexually explicit content"},{"value":"HARM_CATEGORY_DANGEROUS_CONTENT","name":"HARM_CATEGORY_DANGEROUS_CONTENT","description":"Dangerous content"}]},{"displayName":"Safety Threshold","name":"threshold","type":"options","description":"The threshold of harmful content to block","default":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","options":[{"value":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","name":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","description":"Threshold is unspecified"},{"value":"BLOCK_LOW_AND_ABOVE","name":"BLOCK_LOW_AND_ABOVE","description":"Content with NEGLIGIBLE will be allowed"},{"value":"BLOCK_MEDIUM_AND_ABOVE","name":"BLOCK_MEDIUM_AND_ABOVE","description":"Content with NEGLIGIBLE and LOW will be allowed"},{"value":"BLOCK_ONLY_HIGH","name":"BLOCK_ONLY_HIGH","description":"Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed"},{"value":"BLOCK_NONE","name":"BLOCK_NONE","description":"All content will be allowed"}]}]}]},{"displayName":"Thinking Budget","name":"thinkingBudget","default":-1,"description":"Controls reasoning tokens for thinking models. Set to 0 to disable automatic thinking. Set to -1 for dynamic thinking (default).","type":"number","typeOptions":{"minValue":-1,"numberPrecision":0}}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatGoogleVertex/google.svg"},
|
|
46
46
|
{"displayName":"Groq Chat Model","name":"lmChatGroq","group":["transform"],"version":1,"description":"Language Model Groq","defaults":{"name":"Groq Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgroq/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"groqApi","required":true}],"requestDefaults":{"baseURL":"https://api.groq.com/openai/v1"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"filter","properties":{"pass":"={{ $responseItem.active === true && $responseItem.object === \"model\" }}"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"description":"The model which will generate the completion. <a href=\"https://console.groq.com/docs/models\">Learn more</a>.","default":"llama3-8b-8192"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Maximum Number of Tokens","name":"maxTokensToSample","default":4096,"description":"The maximum number of tokens to generate in the completion","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatGroq/groq.svg"},
|
|
47
47
|
{"displayName":"Mistral Cloud Chat Model","name":"lmChatMistralCloud","group":["transform"],"version":1,"description":"For advanced usage with an AI chain","defaults":{"name":"Mistral Cloud Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatmistralcloud/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"mistralCloudApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"https://api.mistral.ai/v1"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://docs.mistral.ai/platform/endpoints/\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"filter","properties":{"pass":"={{ !$responseItem.id.includes('embed') }}"}},{"type":"setKeyValue","properties":{"name":"={{ $responseItem.id }}","value":"={{ $responseItem.id }}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"mistral-small"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).","type":"number","typeOptions":{"maxValue":32768}},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"},{"displayName":"Enable Safe Mode","name":"safeMode","default":false,"type":"boolean","description":"Whether to inject a safety prompt before all conversations"},{"displayName":"Random Seed","name":"randomSeed","type":"number","description":"The seed to use for random sampling. If set, different calls will generate deterministic results."}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatMistralCloud/mistral.svg"},
|
|
48
|
+
{"displayName":"MiniMax Chat Model","name":"lmChatMinimax","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain","defaults":{"name":"MiniMax Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatminimax/"}]},"alias":["minimax"]},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"minimaxApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials?.url }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://platform.minimax.io/docs/api-reference/text-openai-api\">Learn more</a>.","options":[{"name":"MiniMax-M2","value":"MiniMax-M2"},{"name":"MiniMax-M2.1","value":"MiniMax-M2.1"},{"name":"MiniMax-M2.1-Highspeed","value":"MiniMax-M2.1-highspeed"},{"name":"MiniMax-M2.5","value":"MiniMax-M2.5"},{"name":"MiniMax-M2.5-Highspeed","value":"MiniMax-M2.5-highspeed"},{"name":"MiniMax-M2.7","value":"MiniMax-M2.7"},{"name":"MiniMax-M2.7-Highspeed","value":"MiniMax-M2.7-highspeed"}],"default":"MiniMax-M2.7"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Hide Thinking","name":"hideThinking","default":true,"type":"boolean","description":"Whether to strip chain-of-thought reasoning from the response, returning only the final answer"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. The limit depends on the selected model.","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout","name":"timeout","default":360000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatMinimax/minimax.svg"},
|
|
48
49
|
{"displayName":"Moonshot Kimi Chat Model","name":"lmChatMoonshot","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain","defaults":{"name":"Moonshot Kimi Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatmoonshot/"}]},"alias":["kimi","moonshot"]},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"moonshotApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials?.url }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"If using JSON response format, you must include word \"json\" in the prompt in your chain or agent.","name":"notice","type":"notice","default":"","displayOptions":{"show":{"/options.responseFormat":["json_object"]}}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://platform.kimi.ai/docs/api/chat\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"kimi-k2.5"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Frequency Penalty","name":"frequencyPenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim","type":"number"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. The limit depends on the selected model.","type":"number"},{"displayName":"Response Format","name":"responseFormat","default":"text","type":"options","options":[{"name":"Text","value":"text","description":"Regular text response"},{"name":"JSON","value":"json_object","description":"Enables JSON mode, which should guarantee the message the model generates is valid JSON"}]},{"displayName":"Presence Penalty","name":"presencePenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout","name":"timeout","default":360000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatMoonshot/moonshot.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatMoonshot/moonshot.dark.svg"}},
|
|
49
50
|
{"displayName":"Lemonade Chat Model","name":"lmChatLemonade","group":["transform"],"version":1,"description":"Language Model Lemonade Chat","defaults":{"name":"Lemonade Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatlemonade/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"lemonadeApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials.baseUrl.replace(new RegExp(\"/$\"), \"\") }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","default":"","description":"The model which will generate the completion. Models are loaded and managed through the Lemonade server.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"required":true},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls the randomness of the generated text. Lower values make the output more focused and deterministic, while higher values make it more diverse and random.","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Chooses from the smallest possible set of tokens whose cumulative probability exceeds the probability top_p. Helps generate more human-like text by reducing repetitions.","type":"number"},{"displayName":"Frequency Penalty","name":"frequencyPenalty","type":"number","default":0,"typeOptions":{"minValue":-2,"maxValue":2,"numberPrecision":1},"description":"Adjusts the penalty for tokens that have already appeared in the generated text. Positive values discourage repetition, negative values encourage it."},{"displayName":"Presence Penalty","name":"presencePenalty","type":"number","default":0,"typeOptions":{"minValue":-2,"maxValue":2,"numberPrecision":1},"description":"Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."},{"displayName":"Max Tokens to Generate","name":"maxTokens","type":"number","default":-1,"description":"The maximum number of tokens to generate. Set to -1 for no limit. Be cautious when setting this to a large value, as it can lead to very long outputs."},{"displayName":"Stop Sequences","name":"stop","type":"string","default":"","description":"Comma-separated list of sequences where the model will stop generating text"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LMChatLemonade/lemonade.svg"},
|
|
50
51
|
{"displayName":"Ollama Chat Model","name":"lmChatOllama","group":["transform"],"version":1,"description":"Language Model Ollama","defaults":{"name":"Ollama Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatollama/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"ollamaApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials.baseUrl.replace(new RegExp(\"/$\"), \"\") }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","default":"llama3.2","description":"The model which will generate the completion. To download models, visit <a href=\"https://ollama.ai/library\">Ollama Models Library</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/api/tags"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"models"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.name}}","value":"={{$responseItem.name}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"required":true},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls the randomness of the generated text. Lower values make the output more focused and deterministic, while higher values make it more diverse and random.","type":"number"},{"displayName":"Top K","name":"topK","default":-1,"typeOptions":{"maxValue":100,"minValue":-1,"numberPrecision":1},"description":"Limits the number of highest probability vocabulary tokens to consider at each step. A higher value increases diversity but may reduce coherence. Set to -1 to disable.","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Chooses from the smallest possible set of tokens whose cumulative probability exceeds the probability top_p. Helps generate more human-like text by reducing repetitions.","type":"number"},{"displayName":"Frequency Penalty","name":"frequencyPenalty","type":"number","default":0,"typeOptions":{"minValue":0},"description":"Adjusts the penalty for tokens that have already appeared in the generated text. Higher values discourage repetition."},{"displayName":"Keep Alive","name":"keepAlive","type":"string","default":"5m","description":"Specifies the duration to keep the loaded model in memory after use. Useful for frequently used models. Format: 1h30m (1 hour 30 minutes)."},{"displayName":"Low VRAM Mode","name":"lowVram","type":"boolean","default":false,"description":"Whether to Activate low VRAM mode, which reduces memory usage at the cost of slower generation speed. Useful for GPUs with limited memory."},{"displayName":"Main GPU ID","name":"mainGpu","type":"number","default":0,"description":"Specifies the ID of the GPU to use for the main computation. Only change this if you have multiple GPUs."},{"displayName":"Context Batch Size","name":"numBatch","type":"number","default":512,"description":"Sets the batch size for prompt processing. Larger batch sizes may improve generation speed but increase memory usage."},{"displayName":"Context Length","name":"numCtx","type":"number","default":2048,"description":"The maximum number of tokens to use as context for generating the next token. Smaller values reduce memory usage, while larger values provide more context to the model."},{"displayName":"Number of GPUs","name":"numGpu","type":"number","default":-1,"description":"Specifies the number of GPUs to use for parallel processing. Set to -1 for auto-detection."},{"displayName":"Max Tokens to Generate","name":"numPredict","type":"number","default":-1,"description":"The maximum number of tokens to generate. Set to -1 for no limit. Be cautious when setting this to a large value, as it can lead to very long outputs."},{"displayName":"Number of CPU Threads","name":"numThread","type":"number","default":0,"description":"Specifies the number of CPU threads to use for processing. Set to 0 for auto-detection."},{"displayName":"Penalize Newlines","name":"penalizeNewline","type":"boolean","default":true,"description":"Whether the model will be less likely to generate newline characters, encouraging longer continuous sequences of text"},{"displayName":"Presence Penalty","name":"presencePenalty","type":"number","default":0,"description":"Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."},{"displayName":"Repetition Penalty","name":"repeatPenalty","type":"number","default":1,"description":"Adjusts the penalty factor for repeated tokens. Higher values more strongly discourage repetition. Set to 1.0 to disable repetition penalty."},{"displayName":"Use Memory Locking","name":"useMLock","type":"boolean","default":false,"description":"Whether to lock the model in memory to prevent swapping. This can improve performance but requires sufficient available memory."},{"displayName":"Use Memory Mapping","name":"useMMap","type":"boolean","default":true,"description":"Whether to use memory mapping for loading the model. This can reduce memory usage but may impact performance. Recommended to keep enabled."},{"displayName":"Load Vocabulary Only","name":"vocabOnly","type":"boolean","default":false,"description":"Whether to only load the model vocabulary without the weights. Useful for quickly testing tokenization."},{"displayName":"Output Format","name":"format","type":"options","options":[{"name":"Default","value":"default"},{"name":"JSON","value":"json"}],"default":"default","description":"Specifies the format of the API response"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LMChatOllama/ollama.svg"},
|