Hello.
I’ve recently started to build projects with n8n and I’d love to learn how to call another agent from my main agent
This is the main concept of my project, but I have not successfully execute all workflow because my main agent does not call my sub-agent.
Hi @Rafael_Rezende Welcome!
To Call your sub-agent from your principle agent, you typically need to set it up for the execution so that it can call it seamlessly.
The workflow should look like this:
And For principle agent’s tool (call sub workflow) the settings should look like this:
So in that field your sub workflow would be shown when it is published so make sure it is published and once you will select it will not show you that Search Query and it will only be shown when you will set that up in the sub agent workflow trigger which is “When executed by another workflow” that side would look like this:
So when you will set this up and will publish this sub workflow, then in your main agent’s tool for calling workflows would reflect the name of this sub workflow file, and then you will be able to see this feild and just click on that magic ICON so that AI will take over to that, And that is how it is done, hope this helps.
Hi! Thanks for answering so fast, but I can’t find the Workflow inputs under my main agent call workflow tool
Hey @Rafael_Rezende this is because in the sub agent you have not configured the input data fields which are:
Fill those and refresh the main agent calling tool and it will come up just as expected.
Thank you so much!! It worked now, cheers and have a good day sir 