n8n-io/n8n · error · NodeOperationError
The agent type "${agentType}" is not supported
Error message
The agent type "${agentType}" is not supported What it means
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.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/agents/Agent/V1/AgentV1.node.ts:488
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const agentType = this.getNodeParameter('agent', 0, '') as string;
const nodeVersion = this.getNode().typeVersion;
if (agentType === 'conversationalAgent') {
return await conversationalAgentExecute.call(this, nodeVersion);
} else if (agentType === 'toolsAgent') {
return await toolsAgentExecute.call(this);
} else if (agentType === 'openAiFunctionsAgent') {
return await openAiFunctionsAgentExecute.call(this, nodeVersion);
} else if (agentType === 'reActAgent') {
return await reActAgentAgentExecute.call(this, nodeVersion);
} else if (agentType === 'sqlAgent') {
return await sqlAgentAgentExecute.call(this);
} else if (agentType === 'planAndExecuteAgent') {
return await planAndExecuteAgentExecute.call(this, nodeVersion);
}
throw new NodeOperationError(this.getNode(), `The agent type "${agentType}" is not supported`);
}
}
View on GitHub (pinned to 5ac6606e81)
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.
Example fix
// before: parameters.agentType = 'conversationalAgent' // not in V1 dispatch // after: parameters.agentType = 'toolsAgent'
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = ['toolsAgent','openAiFunctionsAgent','reActAgent','sqlAgent','planAndExecuteAgent'];
if (!SUPPORTED.includes(agentType)) throw new Error(`Unsupported agentType: ${agentType}`); Type guard
function isSupportedAgentType(t): t is 'toolsAgent'|'openAiFunctionsAgent'|'reActAgent'|'sqlAgent'|'planAndExecuteAgent' {
return ['toolsAgent','openAiFunctionsAgent','reActAgent','sqlAgent','planAndExecuteAgent'].includes(t);
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- toolCallConcurrency must be a positive integer or Infinity
- MCP server "${cfg.name}": exactly one of "url" or "command"
- MCP server "${cfg.name}": provide either "url" or "command",
- Unknown agents module: "${moduleName}". ${validTokens ? `Val
- Database type currently not supported
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/d9c6e261f1baf348.
Report an issue: GitHub.