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.
@Rafael_Rezende The key is to create Tools in your main agent that trigger your sub-agent workflows.
Architecture Overview
Main Agent (Coordinator)
├── Tool 1: Call Research Agent
├── Tool 2: Call Analysis Agent
└── Tool 3: Call Writing Agent
Each tool → HTTP Request → Sub-agent workflow webhook
Step-by-Step Implementation
Step 1: Create Sub-Agent Workflows
Each sub-agent needs its own workflow with a Webhook trigger:
Research Agent Workflow:
Webhook Trigger (POST)
→ AI Agent (Research specialist)
System Prompt: "You are a research specialist.
Analyze the query and provide detailed research."
→ Respond to Webhook (return results)
Webhook Configuration:
Method: POST
Path: research-agent (or any unique path)
Response Mode: “Respond to Webhook”
AI Agent System Prompt Example:
You are a research specialist agent.
Your role:
- Gather and analyze information
- Provide factual, well-researched responses
- Cite sources when possible
Input format: You'll receive a "query" field with the research question.
Output format: Return a JSON object with "findings" and "sources".
In your Main Agent workflow, add HTTP Request Tool nodes:
Tool Configuration for Research Agent:
HTTP Request Tool Node:
Name: “Call Research Agent”
Description: “Use this tool when you need to research information or gather facts. Provide a clear research query.”
Value: ={{ $json.query }} (this comes from the AI’s tool call)
Step 3: Configure Main Agent
Main Agent System Prompt:
You are a coordinator agent that manages specialized sub-agents.
Available agents:
1. Research Agent - Use for gathering information and facts
2. Analysis Agent - Use for analyzing data and drawing conclusions
3. Writing Agent - Use for creating written content
Your process:
1. Understand the user's request
2. Determine which sub-agents to consult
3. Call the appropriate agents using your tools
4. Synthesize their responses into a final answer
Always explain which agents you're consulting and why.
Connect Tools to Agent:
Add your AI Agent node
In the Tools section, connect your HTTP Request Tool nodes
The agent will automatically see these as available tools