Skip to content

Python: Python : AG-UI workflow.as_agent() wrapped with AgentFrameworkAgent() wrapper does not put requestinfo (HandoffAgentUserRequest) into RUN_FINISHED interrupts #7527

Description

@dgsear

Problem

When a Handoffbuilder Workflow is wrapped with workflow.as_Agent and wrapped with AG-UI AgentFrameworkAgent() and it asks for handoff user input (request_info), the pause is not represented in RUN_FINISHED.outcome.interrupts.
Inste , request_info shouws up only as tool-call style data in message snapshot events.

EXPECTED

  • RUN_FINISHED.outcome.type= interrupt
  • RUN_FINISHED.outcome.interrupts contain the request_info interrupt (reason: input_required)
  • Client can resume using the interrupt id

Actual

  • request_info appears in sanpshot/tool-call style events
  • RUN_FINISHED has no corressponding request_info interrupt in this path

Why this is an issue

Clients that follow the canonical interrupt flow rely on RUN_FINISHED.outcome.interrupts to render resume UI.
Behaviour is different depending on execution path

  • Native workflow path :wrapped with AgentFrameworkWorkflow() works (interrupt in RUN_FINISHED)
  • workflow.as_agent path :missing interrupts for handoff user input,

Repro steps

  • Create a workflow with Handoff Builder that trigger request_info with handoffer user input request_type
  • Wrap it with workflow.as_agent
  • Run it through AGUI AgentFrameworkAgent() streaming endpoint.
  • Trigger the request_info event condition.
  • Inspect SSE Events.
  • Observe request_info in Messagesnapshot , but not in RUN_FINISHED.outcome.interrupts

Questions:

  1. Is workflow.as_agent() supported with AgentFrameworkAgent() wrapper from AG-UI or should the workflows exposed only via AgentFrameworkWorkflow() Wrapper.
  2. If Workflow.as_agent() is supported by AG-UI extension , how to handle the requet_info events for handoff , magentic etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions