AI Agent - Repeated result and multiple inputs not processed

Hi,

I’m trying to use a simple Tools Agent node that call 2 tools. The input is an array of 2 items. The node basically runs twice on the first input and doesn’t process the second one.

Describe the problem/error/question

Mullitple inputs are not processed, but the first item get processed multiple times

What is the error message (if any)?

No error message

Please share your workflow

Share the output returned by the last node

[
{
“output”: “Here are the details extracted from the LinkedIn profile:\n\n- Profile URL: https://www.linkedin.com/in/rong-li/\n- Full Name: Rong Li\n- First Name: Rong\n- Last Name: Li\n- Location: Paris, Île-de-France\n- Country: France”
},
{
“output”: “Based on the inputs and the extracted information, here are the details for the LinkedIn profile:\n\n- Profile URL: https://www.linkedin.com/in/rong-li/\n- Full Name: Rong Li\n- First Name: Rong\n- Last Name: Li\n- Location: Paris, Île-de-France\n- Country: France”
}
]

Information on your n8n setup

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

It seems like I have to use a loop over items node, but I don’t understand why. Can someone explain ?

Also what’s the recommended way between:
Option 1: using a tool agent that calls multiple tools/workflows (those are simple workflows with just one LLM call).
Option 2: having a single LLM chain node that includes several user messages (each message basically uses the same prompts as the workflows in option 1).

Both seem to work.

Hi @Anthony_Brebion, preference between Option 1 & Option 2 is hard to say since that would depend on how complex these tools/workflows are. The good thing about calling them as tools is that these tools can be reused in different agents and contexts. But for a simple workflow like your example, a single LLM chain node might be simpler to maintain. As for why you need to use a loop over items node, I’m not sure but let me check.

Hi, has anyone get an idea?