Implementing Dynamic Agent Switching Based on User Intent in AutoGen #5399
Replies: 3 comments 6 replies
-
I recommend start with the new v0.4 API, go through the tutorial, and look at SelectorGroupChat which is designed for your scenario. Tutorial: https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/index.html SelectorGroupChat: https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/selector-group-chat.html The 0.2 API is more of a research prototype and has many flaws. Even though many YouTube videos are made for it we don't recommend using it. |
Beta Was this translation helpful? Give feedback.
-
app_autogenv0.4.txt Issue Description: I am encountering several challenges with the current workflow of our health care assistant system. The intended flow is as follows:
However, the issue arises when the system incorrectly triggers the doctor_calling_agent instead of staying within the health_care_assistant. The doctor_calling_agent is designed to perform a different function, such as gathering details about the user's availability for a doctor visit and initiating a telephonic conversation with the doctor's office. This process should only occur after the health_care_assistant has checked the user's vitals, which is currently not happening. Additionally, the system should retain all conversation history from the user and act accordingly based on the context provided. To address this, we need to define a structure that ensures proper supervision and state management. This is similar to how we handle client requests for claim status, where we fetch information from the database and display it on the frontend. Any assistance in resolving this issue would be greatly appreciated. (.venv) ar20572127@FVFHXFN8Q6LR Autogen_Zoe % python3 app_autogenv0.4.py If your headache persists or worsens, it might be a good idea to consult with a healthcare professional. Would you like help with anything else or more guidance on this? |
Beta Was this translation helpful? Give feedback.
-
I need some kind of a supervisor agent where it can actually gets the user input and based on the prompt conditions and conversation history, it should able to make the decision by calling the respective agents. |
Beta Was this translation helpful? Give feedback.
-
I am new to AutoGen. We are developing a healthcare application for an insurance company with three key features: healthcare provider, claims status provider, and doctor appointment booking. For these features, we have three agents.
When a user inquires about health, the healthcare provider agent should be triggered. If, during the conversation, the user wants to book a doctor's appointment, the doctor appointment booking agent should be activated. Similarly, if the user wants to check the status of their claims, the claims status provider agent should be triggered.
I have researched AutoGen and found that there is a termination word to exit from one agent to another. However, I want to trigger the agents based on user intent dynamically. For this, I believe the dynamic group chat feature or LLM-based function call can be utilized. Unfortunately, I couldn't find any related sample codes for this.
As I am new to this, I am struggling to implement it. Could anyone share sample codes or guide me on how to approach this use case based on user intent? Additionally, within my agents, I have multiple tool or function calling codes enabled.
Here is the code I have so far:
app.py file:
Beta Was this translation helpful? Give feedback.
All reactions