AI Agent Node: "Failed to receive response" with Gemini and Mistral – workflow never actually executes

Hi everyone,

I’m running n8n 2.26.2 on TrueNAS Scale (self-hosted) and I’m having trouble getting the AI Agent workflow to work with any LLM node.

Describe the problem/error/question

Exact behavior, step by step:

  1. I enter my API key in the LLM node and save the credential
  2. If I test, the connection is succesful
  3. I close the node and click “Open Chat”
  4. I type any message and send it
  5. The chat trigger node shows “Waiting for you to submit the chat”
  6. The loading animation appears in the chat, the three dots bounce
  7. The chat returns: Error: Failed to receive response
  8. No node in the workflow changes color

What I’ve already checked:

  • Network connectivity is fine: a simple HTTP Request node to httpbin.org returns a correct response
  • API requests are visible in Google AI Studio statistics with no errors reported on their side
  • Same behavior with Mistral, so it’s not model-specific
  • n8n container logs show no errors during workflow execution

What is the error message (if any)?

Error: Failed to receive response

Please share your workflow

Unfortunately, I am unable to copy the workflow here. ctrl+a and copy&paste does not work for me in this editor. It is this workflow: Build your first AI agent | n8n workflow template

Share the output returned by the last node

Error: Failed to receive response

Information on your n8n setup

  • n8n version: n8n 2.26.2
  • Database (default: SQLite): postgres 18
  • n8n EXECUTIONS_PROCESS setting (default: own, main): unknown
  • Running n8n via (Docker, npm, n8n cloud, desktop app): TrueNAS Apps (docker?)
  • Operating system: TrueNAS Scale 25.10

Thank you in advance!

@philsynek the workflow is running fine server-side, the response just isnt making it back to the chat, and on self-hosted behind a reverse proxy thats almost always the streaming response. is your chat trigger set to stream, whats the response mode on it?

Thank you for the answer! Unfortunately, I cannot find the option you are describing. There is no such setting in my chat node.

Edit: I found the problem, thanks to Claude. I followed a YouTube tutorial on installing the n8n app via the TrueNAS GUI. The instruction was to put localhost as the host address, but my chat requests are being made from a different machine than the TrueNAS. I corrected the host address and now it is working. Thank you!

For anyone finding this thread later with the same symptoms (workflow runs fine, no node turns color, chat just times out with “Failed to receive response”): this is the classic signature of the webhook/host URL pointing somewhere unreachable from the client — most often N8N_HOST=localhost or WEBHOOK_URL set to an internal address, while the browser making the chat request is on a different machine/network.

Quick check: open browser dev tools → Network tab while sending a chat message. If the request to /webhook/… is going to localhost or an internal IP that your browser can’t reach, that confirms it. Fix by setting N8N_HOST, N8N_PROTOCOL, and WEBHOOK_URL to the actual LAN/external address n8n is reachable at, then restart the container.