Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions agent-framework/workflows/human-in-the-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ Agents can use tools that require human approval before execution. When the agen

For interactive scenarios where an agent needs to gather more information from the user and iterate before proceeding; rather than only approving or rejecting a tool call; use the **[handoff orchestration](./orchestrations/handoff.md)**. Handoff is interactive by default: when an agent responds without handing off to another agent, control returns to the user for the next input, which enables multi-turn back-and-forth within the orchestration. Sequential, concurrent, and group chat orchestrations do not pause for free-form user input on their own; pair them with a `RequestPort` in a custom `WorkflowBuilder` workflow when you need that control between steps.

> [!IMPORTANT]
> Treat approval as scoped to the exact tool call in the request. Before sending an approval response, validate the requested function name and arguments against the application's allowlist and current authorization policy. If the call changes, require a new approval.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before sending an approval response, validate the requested function name and arguments against the application's allowlist and current authorization policy

I'm not sure about this advice. After all, the application really shouldn't advertise functions that are against the application's allowlist in the first place. That seems like more sensible advice, since it wouldn't result in unnecessary of tools for approval, that cannot be executed anyway.

Doing additional validation against the arguments may make sense though, but mostly if validation couldn't happen in the funciton tool itself.


> [!TIP]
> For complete examples with code, see:
> - [Sequential orchestration with HITL](./orchestrations/sequential.md#sequential-orchestration-with-human-in-the-loop)
Expand Down