Problem in node ‘AI Agent‘ Bad request - please check your parameters - "Human: undefined"

Hi - I’ve been working through everything I know how to do to resolve a Bad request error I’m trying to work through for one my of my AI Agent nodes. I’m running [email protected] (stable) and from what I’ve gathered via research and troubleshooting, it seems like the main issue is that the output keeps reading Human as “undefined”. I’ve read that it may be an issue with the LangChain, as I’ve tried everything I’ve read about here, or through my own trouble shooting methods. Can anyone help?

{
“errorMessage”: “Bad request - please check your parameters”,
“errorDetails”: {
“rawErrorMessage”: [
“400 Invalid value for ‘content’: expected a string, got null.”
]
},
“n8nDetails”: {
“nodeName”: “AI Agent”,
“nodeType”: “@n8n/n8n-nodes-langchain.agent”,
“nodeVersion”: 2,
“time”: “6/4/2025, 3:34:14 PM”,
“n8nVersion”: “1.95.3 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeOperationError: Bad request - please check your parameters”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_f35e7d377a7fe4d08dc2766706b5dbff/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:127:12",
" at Array.forEach ()“,
" at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_f35e7d377a7fe4d08dc2766706b5dbff/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:116:16)”,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)“,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_f35e7d377a7fe4d08dc2766706b5dbff/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V2/AgentV2.node.ts:167:10)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1185:9)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1534:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2098:11"
]
}
}

Hi, could you share your workflow. Like below.
n8n attach workflow

Hey @Grot any further thoughts here?

1 Like