Approach 2: Adaptive Orchestrator with Multiple Agents
Last updated
Last updated
For more complex reporting needs and use cases that require nuanced responses, Approach 2 leverages an adaptive orchestrator to coordinate multiple specialized agents. This setup uses two agents:
Searcher Agent (configured in Approach 1): Handles initial information retrieval.
SimpleAgent: Processes the retrieved information and crafts well-structured, coherent reports.
This multi-agent configuration allows for both precise information gathering and thoughtful report generation, making it ideal for use cases that demand high-quality responses and organized output.
The first step involves setting up an orchestrator that will dynamically manage and delegate tasks to the two agents. Here’s a breakdown of their roles:
Searcher Agent: Focused solely on retrieving accurate information based on the user’s query.
SimpleAgent: Assigned the role of organizing and refining information into clear, cohesive reports.
An example prompt for the SimpleAgent could be:
After defining the agents, we'll move onto designing the orchestrator’s workflow. This workflow includes:
Delegation: The orchestrator sends the user’s query to the Searcher Agent, which performs the search.
Processing: The retrieved information is passed to the SimpleAgent, which organizes it into a structured report.
Output: The final report is sent to the user.
This setup ensures that each agent can focus on its specialized role, resulting in a high-quality response that is both informative and well-presented.
With the orchestrator and agents configured, testing becomes essential to verify that:
Queries are processed correctly by the Searcher Agent
The SimpleAgent refines the results into a structured report
This testing phase can be conducted within the orchestrator interface, where test queries are entered and the orchestrator’s behavior is monitored to ensure seamless collaboration between agents. Logs are reviewed to catch any issues or miscommunications between agents.
As we see in our results, the entire process is managed by the orchestrator, also known as the “Manager Agent.” First, the orchestrator initiates the Searcher Agent to gather data. Afterward, it utilizes the SimpleAgent (acting as the “Writer Agent”) to produce the final report. The orchestrator then consolidates the response, delivering a clear, complete answer to the user.