Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssistantAgent may ask for approval before executing a tool #4894

Open
ekzhu opened this issue Jan 4, 2025 · 0 comments
Open

AssistantAgent may ask for approval before executing a tool #4894

ekzhu opened this issue Jan 4, 2025 · 0 comments

Comments

@ekzhu
Copy link
Collaborator

ekzhu commented Jan 4, 2025

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.

A possible solution would be to emit an ToolExecutionRequest message from the on_messages response, terminate the run via a termination condition, and have user provide a ToolExecutionApproval message back, or through a user proxy agent.

Alternatively, 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 #4886 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant