-
I'm letting a user interact through telegram with Autogen 0.4.5. So far so good. Now I want to add the human-in-the-loop pattern. In principle there are 2 reasons why the agent team (I use
For that I implemented a UserProxyAgent:
When it gets called it calls the My questions:
I believe this should be a common challenge as soon as a UI is involved? Any hints? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 20 replies
-
For You can also use The use of If for some reason, you must use UserProxyAgent with a UI (e.g., your model doesn't support function calling), then your application must be asynchronous. In the input callback of UserProxyAgent, you need to send a message to the frontend, wait on a specific If the above sound too complicated to you -- I agree, and I think there should be a more elegant way to address this scenario for One idea is to have the group chat just terminate when user proxy is selected as the speaker. It could be done by having the group chat exposes a What do you think? cc @husseinmozannar @victordibia @jackgerrits , consider this instead of using user proxy's input function, which is a bit foot-gun in terms of UI intergration. |
Beta Was this translation helpful? Give feedback.
-
@skye0402 I created a sample to show AgentChat + FastAPI, including a user proxy with a custom input function to allow for user input: #5433 |
Beta Was this translation helpful? Give feedback.
For
Swarm
group chat, you can useHandoffTermination
to terminate the run and restart it with your user input as the next task. You can read about it in this example: https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/swarm.html#customer-support-example.You can also use
HandoffTermination
for SelectorGroupChat, it also requires the agent to be able to use thehandoff
feature: https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/human-in-the-loop.html#using-termination-conditions.The use of
HandoffTermination
means you don't useUserProxyAgent
in a group chat, you stop the group chat, give the control back to the applicaiton, and res…