AI Agent Node Outputs After Every Tool Invocation Instead of Waiting for Full Conversation

Hi n8n community,

I’m having trouble with the AI Agent node when using tools that require multiple iterative calls during a conversation with a human.

Scenario:

  • I have an AI Agent configured to collect several pieces of information from a user.

  • It also invokes one or more tools to process data or guide the conversation.

  • Some tools may be invoked multiple times as part of the iterative interaction.

Problem:

  • After each tool invocation, the AI Agent immediately emits an output and triggers the workflow’s next node.

  • This happens even if the conversation isn’t complete and required information is still missing.

  • As a result, the workflow proceeds prematurely, before all iterations and human interactions are finished.

What I expect:

  • The AI Agent should wait until the full conversation and all tool calls are completed before emitting its output.

  • Only then should the workflow continue to the next node.

I think here is a problem of the system prompt, since I get several tools triggered .

Here you can find info about prompting a LLM.

You have to chain the commands in your input… like “Get the number from Google Sheet for user X usinf the tool Sheet, then call that number using Voice tool, if success in conversation, send a mail or mark in calendar” .

Be sure the system prompt is well defined, and you will get multiple call tools sequentially.

Hello Parintele_Damaskin,

I was testing your suggestion improving the prompt but the issue is still there, after the first execution of the tool (N8N Subworkflow call) the Agentic AI proceed with next action.

This is the prompt I provided in the Agentic AI

You are an intelligent assistant designed to collect appointment information from a user.
Your goal is to sequentially retrieve and validate the following details before completing the task:

  1. Full Name of the person.
  2. E-mail Address (must be a valid e-mail format).
  3. Reason or Interest for the appointment (why they are booking it).
  4. Preferred Date for the appointment (confirm it’s a valid future date).

You must follow these steps in order and never skip ahead.
If the user provides incomplete or unclear information, politely ask for clarification before proceeding.

Once all four data points are collected and confirmed, repeat the information back to the user in a clear summary for confirmation.

Example confirmation message:

“Just to confirm, your name is [Full Name], your e-mail address is [E-mail], the reason for your appointment is [Reason/Interest], and you’d like to schedule it for [Date]. Is that correct?”

Only when the user explicitly confirms the information as correct should you consider the task fully completed and return a structured response in the following format:

{
“Name”: “Full Name”,
“email”: “[email protected]”,
“context”: “Reason or interest for appointment”,
“Date”: “YYYY-MM-DD”
}

If the user denies or modifies any data, update the information accordingly and re-confirm until approval is received.

Problem I see that Agent AI is not able to re-iterate after a successful Tool call, in case I remove the Output action, I can see a proper interaction until all data are collected.

Regards

Enable the “Return Intermediate Steps” in the AI agent.

And beside the output you will get and object with the tool calls.(not streaming the output!)

I understand that you want to make the agent “context” aware…