Human in the loop
In the previous ConversableAgent example we demonstrated that you were able to chat with an agent.
As you build your own workflows, you can decide if and how to use your human in the loop agents. As demonstrated previously, and in the following example, to do so, simply use the ConversableAgent and set the human_input_mode
to ALWAYS
.
Let’s start to build a more useful scenario, a classroom lesson planner, and create our human agent.
You’ll also see in this example that you can use the system_message
property to give detailed instructions to agents.
-
Create our human-in-the-loop agent by setting its
human_input_mode
, and nollm_config
is required. -
Our
the_human
agent starts a conversation by sending a message tolesson_planner
. An agent’sinitiate_chat
method is used to start a conversation between two agents.
This creates a conversation between you and the lesson planner agent.