mirror of
https://github.com/microsoft/autogen.git
synced 2025-07-07 17:11:06 +00:00
1.3 KiB
1.3 KiB
UserProxyAgent
UserProxyAgent
is a special type of agent that can be used to proxy user input to another agent or group of agents. It supports the following human input modes:
ALWAYS
: Always ask user for input.NEVER
: Never ask user for input. In this mode, the agent will use the default response (if any) to respond to the message. Or using underlying LLM model to generate response if provided.AUTO
: Only ask user for input when conversation is terminated by the other agent(s). Otherwise, use the default response (if any) to respond to the message. Or using underlying LLM model to generate response if provided.
Tip
You can also set up
humanInputMode
when creatingAssistantAgent
to enable/disable human input.UserProxyAgent
is equivalent toAssistantAgent
withhumanInputMode
set toALWAYS
. Similarly,AssistantAgent
is equivalent toUserProxyAgent
withhumanInputMode
set toNEVER
.
Create a UserProxyAgent
with HumanInputMode
set to ALWAYS
When running the code, the user proxy agent will ask user for input and use the input as response.