Skip to content

Human in the Loop Approval for Multi Agent Systems #3274

@CantLooseToAMoose

Description

@CantLooseToAMoose

Question

Hey everyone,

I'm working with a multi-agent system and need some guidance on implementing human approval workflows for delegated tasks.

Scenario:
I have a coordinator agent that delegates tasks to specialized agents (e.g., a file management specialist). When the specialist needs to perform a sensitive operation like deleting a file, I want to require human approval before proceeding.

Current approach:

The specialist returns a DeferredToolRequest for the deletion
The coordinator handles this by raising an ApprovalRequired exception
After receiving human approval, I create DeferredToolResults and pass them back to the coordinator
The issue:
When I provide the DeferredToolResults to the coordinator, it seems to just call the specialized agent again, creating a loop rather than completing the approved action.

Question:
What's the correct pattern for handling human approval in delegated tool calls? How should I structure the flow so that once approval is granted, the original tool request gets executed properly?

Any insights or examples would be greatly appreciated!

TL;DR: How do I properly implement human approval for tools called by delegated agents without getting stuck in loops?

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions