Skip to content

How does AG-UI include Human In The Loop into their protocol? #134

@frederikhendrix

Description

@frederikhendrix

Hey AG-UI,

I was wondering how you recommend adding a Human In The Loop principle to an application. I am not using any Agent framework, but I think I kind of get how to do it.

from ag_ui.core.events import (
    EventType,
    BaseEvent,
    TextMessageStartEvent,
    TextMessageContentEvent,
    TextMessageEndEvent,
    TextMessageChunkEvent,
    ThinkingTextMessageStartEvent,
    ThinkingTextMessageContentEvent,
    ThinkingTextMessageEndEvent,
    ToolCallStartEvent,
    ToolCallArgsEvent,
    ToolCallEndEvent,
    ToolCallChunkEvent,
    ToolCallResultEvent,
    ThinkingStartEvent,
    ThinkingEndEvent,
    StateSnapshotEvent,
    StateDeltaEvent,
    MessagesSnapshotEvent,
    RawEvent,
    CustomEvent,
    RunStartedEvent,
    RunFinishedEvent,
    RunErrorEvent,
    StepStartedEvent,
    StepFinishedEvent,
    Event
)

These are all the events in the latest version. I am thinking that when ToolCallArgsEvent is called you could await and let the user return something which would cancle everything or change certain arguments.

Is this how you guys envision the developer to include Human In The Loop? As far as I have seen MCP doesn't have specific tool decoration for tools you would want a Human In The Loop for.

Kind Regards,

Frederik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions