Skip to content

.NET: Documentation for Human-in-the-Loop, RequestInfoEvent / RequestPort and their compatibility with AgentWorkflowBuilder orchestrations #4341

@hansmbakker

Description

@hansmbakker

The Workflow documentation lists various event types.

There is a separate page on the Human-in-the-Loop usecase but oddly enough that page does not make use of the RequestInfoEvent which I thought is intended to support that usecase.

The Human-in-the-Loop sample does use RequestInfoEvent and RequestPort, but there is no documentation covering how that should be used.

Also, it is not clear whether workflows built using AgentWorkflowBuilder (e.g. in a standard Sequential Orchestration) would support interaction with the user at all using the Human-in-the-Loop concepts?

My goal is to orchestrate a few agents in a row like the process below - e.g. to book a hotel room and then arrange transport to that chosen hotel. The individual agents are setup with the required tools and should be able to ask the user for input and approval.

The sample uses a custom Executor which can send typed output and respond to typed input, but I'm not sure how to do that with standard AIAgent / ChatClientAgent instances that are setup using AgentWorkflowBuilder.BuildSequential(agents);.

flowchart TD
    
       
    B@{ shape: manual-input, label: "🧑‍💻Input"}
    C@{ shape: manual-input, label: "🧑‍💻 Approval"}
    D@{ shape: manual-input, label: "🧑‍💻 Input"}
    E@{ shape: manual-input, label: "🧑‍💻 Approval"}
    

    subgraph Workflow
    A@{ shape: manual-input, label: "🧑‍💻 Input"}
    F[fa:fa-robot Hotel Agent]
    G[fa:fa-robot Ride Agent]
    L@{ shape: dbl-circ, label: "Process end" }
    end

    
    H@{ shape: rect, label: "🛠️Get hotel options" }
    I@{ shape: rect, label: "🛠️Book room" }
    J@{ shape: rect, label: "🛠️Get ride options" }
    K@{ shape: rect, label: "🛠️Book ride" }
    
    
    A -->|Start message| F
    F <-->B
    F <-->C
    F -->H
    F -->I
    
    F -->G

    G <-->D
    G <-->E
    G -->J
    G -->K

    G -->L
Loading

Metadata

Metadata

Assignees

Labels

.NETdocumentationImprovements or additions to documentationv1.0Features being tracked for the version 1.0 GAworkflowsRelated to Workflows in agent-framework

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions