{"record":{"id":"d9c6e261f1baf348","repo":"n8n-io/n8n","slug":"the-agent-type-agenttype-is-not-supported","errorCode":null,"errorMessage":"The agent type \"${agentType}\" is not supported","messagePattern":"The agent type \"(.+?)\" is not supported","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/agents/Agent/V1/AgentV1.node.ts","lineNumber":488,"sourceCode":"\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst agentType = this.getNodeParameter('agent', 0, '') as string;\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tif (agentType === 'conversationalAgent') {\n\t\t\treturn await conversationalAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'toolsAgent') {\n\t\t\treturn await toolsAgentExecute.call(this);\n\t\t} else if (agentType === 'openAiFunctionsAgent') {\n\t\t\treturn await openAiFunctionsAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'reActAgent') {\n\t\t\treturn await reActAgentAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'sqlAgent') {\n\t\t\treturn await sqlAgentAgentExecute.call(this);\n\t\t} else if (agentType === 'planAndExecuteAgent') {\n\t\t\treturn await planAndExecuteAgentExecute.call(this, nodeVersion);\n\t\t}\n\n\t\tthrow new NodeOperationError(this.getNode(), `The agent type \"${agentType}\" is not supported`);\n\t}\n}\n","sourceCodeStart":470,"sourceCodeEnd":491,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/agents/Agent/V1/AgentV1.node.ts#L470-L491","documentation":"Thrown by the Agent V1 node's execute dispatch when agentType does not match any of the supported branches (toolsAgent, openAiFunctionsAgent, reActAgent, sqlAgent, planAndExecuteAgent). It is the fall-through after the if/else-if chain, indicating an unknown or unsupported agent type value reached the dispatcher.","triggerScenarios":"agentType is read from parameters and compared against known string literals in an if/else-if chain; none match, so execution reaches the final throw. Fires when agentType is a typo, an unsupported value, a value from a newer/older version, or a custom value injected via edited JSON.","commonSituations":"Workflow JSON edited by hand with an invalid agentType; downgrade/upgrade mismatch where a previously valid agentType was removed; third-party or custom agent type not registered in this version of the node.","solutions":["Set agentType to one of the supported values: toolsAgent, openAiFunctionsAgent, reActAgent, sqlAgent, or planAndExecuteAgent.","If migrating from another version, map the old agentType to the closest supported one.","Re-create the node through the UI so the parameter is set from the valid dropdown."],"exampleFix":"// before: parameters.agentType = 'conversationalAgent'  // not in V1 dispatch\n// after: parameters.agentType = 'toolsAgent'","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['toolsAgent','openAiFunctionsAgent','reActAgent','sqlAgent','planAndExecuteAgent'];\nif (!SUPPORTED.includes(agentType)) throw new Error(`Unsupported agentType: ${agentType}`);","typeGuard":"function isSupportedAgentType(t): t is 'toolsAgent'|'openAiFunctionsAgent'|'reActAgent'|'sqlAgent'|'planAndExecuteAgent' {\n  return ['toolsAgent','openAiFunctionsAgent','reActAgent','sqlAgent','planAndExecuteAgent'].includes(t);\n}","tryCatchPattern":null,"preventionTips":["Choose agentType only from the node's dropdown to avoid typos.","Re-map agent types when migrating workflows across versions.","Validate workflow JSON agentType against the supported list before import."],"tags":["agent","dispatch","config","validation"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}