Agent as Tool
Last updated
Last updated
In this tutorial, we are going to take a look at how to leverage other flows as tools to a parent Agent. This approach allows you to create a parent agent that can delegate specific tasks to specialized child agents
Receives user input through a parent agent
Agent decides to retrieve data from document store, or call the Agentflow Tool.
Begin by adding a Start node to your canvas. This serves as the entry point for your agent system.
Add an Agent node and connect it to the Start node.
The key feature of this flow is configuring another agent as a tool. In the Parent Agent's Tools section:
Tool: Select "Agent As Tool"
Selected Agentflow: Choose your child agentflow
Name: Name for the agentflow
Description: Describe when this agentflow is useful. Example:
Document Store: Select your pre-configured document store (e.g., "AI-Paper")
Describe Knowledge: Describe what the knowledge is about
Scheduling Query:
User: "Can you check my availability for next Tuesday?"
Flow: Parent agent → personal_assistant tool → specialized scheduling response
Technical Query:
User: "What is AIGC and how does it work?"
Flow: Parent agent → AI-Paper knowledge base → technical explanation with sources
General Query:
User: "Hello how are you?"
Flow: Parent agent → direct response (no tools needed)
Complex Query:
User: "Schedule a meeting about AIGC implementation next Tuesday, extract key insights and the talking points"
Flow: Parent agent → both personal_assistant tool AND AI-Paper knowledge → coordinated response
Clear Tool Descriptions: Make tool name and descriptions specific and actionable
Appropriate Delegation: Better system prompt for parent agent to delegate effectively
Customer Service: Parent agent with specialized tools for billing, technical support, and general inquiries
Research Assistant: Parent with tools for different research domains (legal, technical, market research)
Project Management: Parent with tools for scheduling, resource allocation, and progress tracking
Content Creation: Parent with tools for writing, editing, research, and formatting
Name and Description for the tool are extremely important! They must be clear and correctly describe the purpose of the tool. Refer to guide.
Configure the Knowledge (Document Stores) section to give your parent agent access to relevant information. This is the same as tutorial.