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

Require approval in cli #441

Draft
wants to merge 1 commit into
base: v1.0
Choose a base branch
from

Conversation

jsibbison-square
Copy link
Collaborator

@jsibbison-square jsibbison-square commented Dec 10, 2024

This POC shows how tool requests can be approved or rejected by the user. The interaction pattern is:

  • Model returns some ToolRequests.
  • Our agent.rs (Agent) adds approval ids to tool requests
  • Agent passes the tool request Messages as normal up to the interface
  • If there were any tool requests requiring approval the Agent.reply stream pauses and waits on a channel for approval/rejection for each tool request
  • User uses the Interface to approve/reject each tool request which is passed from the Interface to the Agent via a channel.
  • Once all tool request approvals are actioned the rejected requests will get a failed tool result message added and approved requests will be sent to the systems.

So the paradigm here is that systems are ONLY called when the user approves a tool request (which offcourse we can layer in auto-approve fancy logic for systems/tools).

It's also relatively easy with this logic to incorporate a system triggered approval request if there is an api that can be called on the system which decides if approval is required.

The way the approval happens in the interface can be customised by the approval type and details where you could redirect the user to do something externally if needed. The interface just needs to be able to tell the agent the user has finished actioning approval requests.

image

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

Successfully merging this pull request may close these issues.

1 participant