Please help: token usage issue

I’m using n8n to connect multiple tools to a single AI agent, but I’m noticing that token usage is higher than expected, even when I only use one tool. When I disconnect all but one tool, token usage returns to normal.

Why does connecting multiple tools increase token usage, and how can I optimize it?

Hey @milola When multiple tools are connected to a single AI node, n8n might trigger the AI multiple times or pass extra data, increasing token usage. To reduce this, try:

  1. Using a Merge or Switch node to send only one tool’s output to the AI at a time.
  2. Combining data from all tools into a single input (like JSON) to reduce multiple triggers.
  3. Checking if the AI node is in a loop or receiving multiple inputs, causing it to fire repeatedly.
  4. Logging the AI prompt to see if extra data is being included by mistake.
  5. Using Set or Function nodes to clean up and limit the input size.

This should help optimize token usage. Let me know if you’d like to see a workflow example and kindly mark as the solution if you found this helpful.

1 Like