I want to connect an AI-Agent Node as a Tool to another AI Agent, but I am not sure how to get this to work as I can’t the main agent to actually ask the sub-agent anything. The main problem I think is because there is no documentation about the “AI Agent Tool” , and have the following questions.
So does the sub-agent’s description get used as the tool description? How to get this to work?
Once #1 is true, what to put for prompt input for sub-agent?
Here’s an example for you. Connect it to openai and serp api and ask the main agent for the weather. The key is to set a tools section in your main agent system prompt to tell it when to use what tool
Take note the agent for structured output doesnt really make a difference in this example, but it shows that you can get multiple sub agents to get called
So I got this working, and the key was the newish “AI Agent Tool” while still undocumented, works great. Basically you can put an Agent as the tool output for a main agent, and act as a MCP itself.