AI Agent not calling/communicating with tools

Describe the problem/error/question

I have n8N hosted locally on docker. I am having a persistent problem with getting AI agents to call tools. I have tried multiple configurations, including using existing templates and connecting them with my credentials.

The usual explanation offered is that the prompt in the AI agent is not descriptive enough. I experimented with developing mind numbingly specific prompts with instructions for special cases, .json structured data formats for all for the parameters, etc. the prompt would be full of discussions under a tool label about calendaring an event and the agent would not even activate the tool.

Frequently the error message has been that the agent did not activate any tools. Just as often I have tried multiple prompts from the chat trigger describing in great detail the creation of a calendar event and supplying the parameters explicitly by variable name.

All of this seems inconsistent with my expectations of OpenAI to determine context so I am concerned that I have a setup issue. I have N8N parked in docker and am running latest stable version.

Has anyone seen this behavior? Pretty new to N8N but I’m seeing templates everywhere with much simpler language getting results and I can’t get a simple contact with the tool from the AI agent.

Sample dialogue from chat prompt:

please create a calendar event title test event start time 2:00 end time 3:00

I can help you create calendar events using the available tool. Please provide the details of the event you would like to schedule, such as the event title, start time, and end time.

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

I can help you create calendar events using the available tool. Please provide the details of the event you would like to schedule, such as the event title, start time, and end time.

The calendar tool has no inputs and was not used.

Expected output

After using the calendar tool, a confirmation that the event has been created.

Information on your n8n setup

  • **n8n version: 1.71.3 **
  • Database PostgreSQL
  • n8n EXECUTIONS_PROCESS setting own:
  • Running n8n via Docker:
  • Operating system: MacOS Sequoia 15.0

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @jsboxon

I think the problem is that you put your “system prompt” as your “user prompt”. This means the AI agent is not seeing your chat messages and so is likely the reason why it’s not using the tools.

Check out this example where I move the “system prompt” out into the correct place and use the “prompt” textarea to accept dynamic data coming into the agent.

2 Likes

I’m currently with the same problem.

There’s a way to force the tool use but it’s not native on N8N yet and I don’t know how to use the tool by using the HTTP request.

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