AI Agent node fails to execute (v.1.112.4)

Hello

I have a problem with a new AI Agent node in my workflow. The workflow hangs indefinitely and eventually throws a
Error: Cannot read properties of undefined (reading ‘execute’) error.

If I copy an AI Agent node from an older workflow into a new workflow, it works without any issues. The Error only appears when a new AI Agent node is added from the node menu.

  • n8n version: 1.112.4
  • Running n8n via: Self-hosted Railway

1 Like
  1. Open AI Agent block → Chat Model* → pick a valid model (GPT-4o / GPT-4o-mini).

  2. Disconnect and reconnect the OpenAI Chat Model node to refresh the link.

  3. Make sure the trigger sends actual text (no empty inputs).

  4. Temporarily remove unused Memory/Tool blocks.

  5. Save / deploy, then run the workflow again.

    if its done - support

Hi there,

I’ve seen this exact error which has occurred when I tried to run a single node (partial execution) instead of the whole workflow, and the node depends on data or context that isn’t available unless the workflow is started from a trigger. Besides the recommendation above, Instead of running just one node, click “Execute Workflow” to run the entire workflow from the trigger and see how that goes?

P.S I also recommend updating to latest release after taking a complete backup

Cheers!

Thanks for the feedback!

I’ve already tested these scenarios, and the issue is still present:

  • Model Selection: I am using the most current and recommended models

  • API Connection: I have not only disconnected and reconnected the OpenAI Chat Model node, but I also created a new API key and rebuilt the workflow several times from scratch. The result is always the same.

  • Memory/Tools: I confirmed that the presence or absence of Memory/Tool does not affect the issue; the workflow fails either way (in the screenshots showing the setup without them).

With the problematic new AI Agent node, the trigger data from ‘When chat message received’ is not even reaching the agent.

In Editor mode, the process just spins without executing, and in the Executions log, it instantly throws the Error: Cannot read properties of undefined (reading ‘execute’).

When I use the same settings (model, trigger) but replace the node with an AI Agent node copied from an old, working workflow, everything functions perfectly.
And whenever I add the new AI Agent node (the one currently available from the nodes panel) to any workflow, the entire flow and any individual node in the workflow stop working due to an error, until the new AI Agent node is removed from the workspace.

This is at least the 5th such thread with this same issue on Railway hosted instances. I’m starting to see a pattern here… don’t know why yet

Thank you for taking the time to respond!

Regarding the versions: at the time of writing, I was using n8n version 1.112.4, and I have now updated to 1.112.5. The exact same error persists in both versions.

I noticed that whenever I add the new AI Agent node (the one currently available from the tools list) to any workflow, the entire flow and any individual node in the workflow stop working until the new AI Agent node is removed from the workspace. In other words, the error occurs both when using ‘Execute Workflow’ and when using ‘Execute Step’.

Really? When I first ran into this error and started searching, I couldn’t find anything on it. I had my suspicions about the Railway settings, but I’m no expert on that, so it’s hard for me to assess the status, and the AI tools didn’t find any issues.

Solution – I redeployed the server once again, and now it works :tada:
(The n8n version didn’t change since I’m using the latest one, but something may have ‘reconfigured itself’)

1 Like

Have You Paid For API Access ?

Its Limited after that we have to pay.