Pass calendar ID from AI agent to sub-agent

Describe the problem/error/question

How can I make an AI agent send certain data to a sub-agent in the query please? I have spent a day trying to do this by updating the user and system prompts but I cannot get it to do this all the time.

Specifically I have the agent below. I need it to send not only the query but also the calendarID to the sub-agent (so that the sub-agent knows which calendar to perform actions on).

Please share your workflow

Information on your n8n setup

Running n8n cloud version 1.84.1

Fixed this by:

  1. adding a set fields node prior to the master agent. I concatenated the user query and calendarID so that the user query that is input to the master agent contains both

  2. The above meant it worked 9 out of 10 times. What has made it more reliable is updating the master agent prompt to instruct the agent to send the user query to the sub-agent and DO NOT modify it before sending.

1 Like

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