AI Agent with subworkflow as tool: The workflow did not return a response

Describe the problem/error/question

I have an AI agent that calls 2 tools, defined as sub-workflow tools, to complete his task, the keyword_intent_research and the serp_retriever tool.
Both tools are correctly called in sequence as defined in the main agent system prompt, but sometimes, the second one (“serp_retriever”) failed for an unknown reason (There was an error: “The workflow did not return a response”) while the execution of this subworkflow always succeeded (I’m checking its execution logs)

What is the error message (if any)?

The main AI agent returns en error when calling the sub agent:
“The workflow did not return a response”

Sometimes it works, sometimes not, this is really weird and hard to debug…

The subworkflow successfully returns

Please share your workflow

Main Workflow

Share the output returned by the last node

The main AI agent returns en error when calling the sub agent:
There was an error: “The workflow did not return a response”

Information on your n8n setup

  • n8n version: 1.79.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Linux

Make sure you last/exit node in the sub-workflow has a ‘response’ field. (you can use edit fields to set it) - AI expect this fields when returning from a tool

Well I’m not sure.
Apparently it depends more on the LLM used. I’m experiencing troubles with gpt-o4-mini but not with gpt-4o.

I have the same issue and added a response with Set and both gpt-r0 and gpt-40 mini say:
There was an error: “The workflow did not return a response”

Any other idea ? @Anthony_Brebion were you be able to fix this ?

Find out a possible reason for the error, I’m using a switch and setting it to several different checks, if one of them is unanswered it will return as an error to the chat tool

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.