#4894·autogen

AssistantAgent may ask for approval before executing a tool

Author: ekzhuCreated Jan 4, 2025Updated Sep 16, 2026
Labelsproj-coreproj-agentchat

autogen_agentchat.agents.AssistantAgent currently executes a given tool directly. If user approval for the tool is needed, the approval needs to be builtin to the tool itself.

It would be more convenient to have a built-in mechanism to for tool approval. This will simplify many tool use scenarios.

We can make it part of the autogen_core.tools.Tool and create a tool wrapper class that automatically create the approval boilerplate code around the tool itself.

the approval/confirmation for running query is not.

I believe for approval of running the tool, it should not depend on the agent, rather, it should be built into the tool itself, and have the tool returns a well-formed error message if the user rejects it. It is a general pattern that we may incorporate into the AssistantAgent itself. A PR contribution is welcome!

Originally posted by @ekzhu in https://github.com/microsoft/autogen/discussions/4886#discussioncomment-11736261