The rarest ai agent error i have ever had HELPP MEEE pleasei

hey guys im having an error with my agent that just happend from nowhere also when this error happend don’t log the completions into the memoryand the agent ouput nothig which doesnt make sense cause the day before was working perfectly fine.

like is not logging anything in the memory like what can i do isnt that automatic from the the node?

Update the problem is still there wven without the memory so i dont understand what it could be.

error:
{
“errorMessage”: “Cannot read properties of undefined (reading ‘message’)”,
“errorDetails”: {},
“n8nDetails”: {
“nodeName”: “AI Agent”,
“nodeType”: “@n8n/n8n-nodes-langchain.agent”,
“nodeVersion”: 3,
“time”: “12/17/2025, 12:40:22 PM”,
“n8nVersion”: “2.0.2 (Self Hosted)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeOperationError: Cannot read properties of undefined (reading ‘message’)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_483a58943c290d26157214acd0d782a6/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.ts:88:11",
" at Array.forEach ()“,
" at executeBatch (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_483a58943c290d26157214acd0d782a6/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.ts:77:15)”,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)“,
" at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_483a58943c290d26157214acd0d782a6/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V3/execute.ts:49:66)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_483a58943c290d26157214acd0d782a6/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V3/AgentV3.node.ts:131:10)“,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1045:8)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1226:11)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1662:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2274:11"
]
}
}

Hey @Michael-o !

If you have something to share related witht the topic, you can do it here… “community” is about this forum, and not a “hook-up" base date site.

And before exposing as “Expert” and try to to “lure” newly community members directly into a private conversation, is not a regular thing here.

Consult the Jobs if you want to be contacted directly.

Hey @marcelovaar !

Welcome to n8n community!

Can you please share an image with the workflow?

hello parintele many thanks for your help yeah the error looks like is from the think tool also im self host.

sometime gives me the error and other times don’t so its quite confusing

i could share you my json workflow or prompt if you want to look throught it

Hey @marcelovaar !

It seems that is from the service provider and NOT n8n level.

Here is almost same “issue”.

P.S I use Gemini, and in my use cases , I never had any issue that I couldn’t get over it.

Cheers!

But that is super rare im using open router gemini 2.5 preview sep , flash 2.5 , gpt 5 nano and haiku 4.5 in other workflows and im having issues in this workflow and other.

here as you can see i have the same model and is working perfectly fine

and here im using also the same model and is giving me problem with haiku and flash 2.5

The ererror is clearer now in the 2nd Image…

Either is empty,or the parameters for the tool are not defined.

Instruct the agent in system, to return explicitly the format is required by the tool.

You can check here the activity and see if the answer was empty from service :

Cheers!

Thanks for the clarification. I’m not here for dating or to lure anyone just a regular digital marketer contributing to the community. Noted and understood.

Hey parintele morning my ai agent were completely fine for months running smoothly and form one day to another sometime work sometimes don’t it doesnt make sense i change the provider directly from google form claude from open route and open ai and still sometime work sometimes it doesn’t now is saying me : “Cannot read properties of undefined (reading ‘reduce’)”

note is not because of the update cause it happen to me before update to version 2.0 i update thinking was a bug and im still having the issue

The solution to this error : OUTPUT_PARSING_FAILURE - Docs by LangChain
or at least the closest I could find was take the restructure the prompt, make it a bit more concise, eliminate the think tool and restructure especially your tool section of your prompt. Do it with the langchain documentation. I will be adding the link to it Tools - Docs by LangChain
Look through that link and restructure your tools to make the basic tool definitions. Each of your tools. That should make it work and the most, the key part on this is eliminate everything about the think tool.

And try if after that, the same provider you were using. In my case, I was using Gemini 2.5 Flash. And the errors were lower but I was still getting some errors. So I recommend you to change provider. I moved to XAI Grog 4.1 Fast Reasoning. It’s amazing, it’s much better than Gemini, it’s much cheaper than Gemini. So I really recommend you to first make the changes I told you and after if you still receiving some issues, you can change the provider. I do not recommend any of the GPT ones.

note
It’s a super weird error. I was using this agent with the same prompt and for around six months without any problem. And from one day to another It started. So for you to know, I really hope it will help you out anyone that could have this problem.

1 Like

As mentioned it seems to be an issue with the structured output parsing node.

I am also experiencing a sudden appearance of this error with my Agent nodes. Instead of the usual error “Model output doesn’t fit required format” I randomly get “Cannot read properties of undefined (reading ‘reduce’)”. When it happens, it seem like the structured output node isn’t even triggered.

The error only occurs within the agent node.
The interesting part: Going into the connected model node shows that the very first run seems to have output something. For some reason (probably due to the response format node) it starts another run but now outputting given error.

Short question for troubleshooting: Which Version of the Agent node are you using?
Open Agent Node –> Click Settings –> look at the bottom corner of the input fields: There should be the current Version of your Node and the latest available Version.
I noticed I was using Version 1.8 while the newest version was 3.1. I updated the node and am currently running the Node over and over to see if it fails again and so far the error didn`t appear again.