I'm concerned about giving AI agents full autonomy in our Cloud Technology stack. How does AutoGen (Microsoft Agent Framework) handle human-in-the-loop (HITL) interactions? Specifically, can we force the agent to ask for manual approval before it executes a CLI command or changes a cloud configuration?
3 answers
Safety is a core pillar of the AutoGen (Microsoft Agent Framework). It uses a UserProxyAgent which, by default, can be configured to "ALWAYS" ask for human input. When the 'Assistant' agent suggests a piece of code or a cloud command, the proxy intercepts it and waits for your terminal input. You can type 'exit' to stop, or just hit enter to approve. This is critical for Cloud Technology because you don't want an autonomous agent accidentally deleting a production S3 bucket or spinning up 100 expensive GPU instances without a human signing off on the cost first.
This works well for terminal-based apps, but is there a way to build a custom UI for this approval process? If I want to deploy this for a non-technical team, they won't be using a CLI. Does the AutoGen (Microsoft Agent Framework) allow us to pipe that "waiting for approval" state to a web-based dashboard or a Slack notification?
The 'NEVER' and 'ALWAYS' settings for human input make it very flexible. You can even set it to 'TERMINATE' so it only asks for help when it gets stuck.
Exactly, Laura. That "ask only when stuck" mode is perfect for balancing efficiency with safety in complex cloud environments.
Yes, George, you can override the get_human_input method in the UserProxyAgent class. Instead of reading from the terminal, you can make it send a POST request to your web app or trigger a Slack webhook. The agent's execution will pause (in an async state) until your UI sends back the approval signal. We implemented exactly this for our DevOps team last year to manage production deployments safely.