Tutorial : Multi-Agent interactions with Autogen and Gemini — Part 3 ...
This part is a continuation of exploring the basics of getting Multi-Agent conversations using the Autogen framework.
The series:
So far in the series, we have covered Autonomous Agents and seen how we can make multiple autonomous agents communicate with each other. We then investigated ways for terminating the conversations, either via maximum number of turns or by looking for a specific text/content in the response from one of the agents and then making that as the condition for terminating the conversation.
Let’s move on to another aspect of working with autonomous agents and that involves us, the human. What if we would like a human in the middle or in some sort of a feedback loop.
The picture below indicates what exactly I am trying to hint at:
So we have the following scenario:
Autogen has nice support for bringing in the human in the loop. It is well documented over here and we shall see a simple example of how to make this possible.
Our example is as follows:
The code is listed below:
// Insert code snippet here
Let’s move on with the explanation.
Autogen provides a smooth support system for integrating human feedback within the interaction loop, promoting efficient human-AI collaboration. This feature is well-documented here.
The system ensures seamless interaction between AI agents and human users, enhancing the overall conversational experience.
Let’s go through the code:
Simple isn’t it? I like the consistency in this framework and the ease via which you can configure an Agent to be autonomous or a human proxy.
Incorporating human feedback enriches the AI interaction and allows for dynamic responses tailored to the user's preferences.
Take a look at one sample run, where as a human input, I am fine with the first quote provided by the agent and end up telling its ok.
In the next run, I will simply press enter to skip as the Autogen framework tells me to do. This means I am not happy with the quote and would like the Quote Agent to try again and give me a different quote. Remember the default_auto_reply parameter that we used for the Human ConversableAgent earlier, which was set to Give me another quote will be sent to the agent and the conversation continues. The sample run for this scenario is shown below:
All code for this article is available in the repository below in the app3 folder: GitHub Repository
This part highlighted how we can mix humans and autonomous Agents in a conversation using the Autogen framework. Hope this was useful. I plan to look at some Conversation Design Patterns, Local Model Execution in upcoming posts using this framework. Stay tuned.




















