Skip to content

.NET Workflows - Workflow as Agent how to respond to external input requests #3029

Closed

Description

@antero-lukkonen

Hi,

Trying to follow the documentation https://learn.microsoft.com/en-us/agent-framework/user-guide/workflows/as-agents?pivots=programming-language-csharp#handling-external-input-requests.

My intent is to get user input (just console right now) for my workflow that is converted to Agent.

The document above stops with a statement: "Provide response in the next message".
The docs don't cover how to do it.

The expectation for the docs from me would be to give complete guidance how to achieve a described outcome. In this case how to provide response in the next message.

I assumed that i must ensure the following things:

  1. get a thread from the agent and use it in all calls
  2. configure checkpointing
  3. In a second call to agent.RunStreamingAsync, provide a new ChatMessage(ChatRole.User, [new FunctionResultContent(callId, userInput)]). Since the ExternalRequest is handled as FunctionCallContent.

I failed to progress past my RequestPort.

Stepping through code with a debugger and searching in repo i was expecting that something converts the FunctionResultContent into a different type, such as ExternalResponse, that is used by Workflow to work with responses to requests. I could not find such a place.

It is also not obvious how to create an ExternalResponse myself or if this is the right idea.

Please advise, Regards, Antero

Activity

  1. added
    .NETUsage: [Issues, PRs], Target: .Net
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Dec 23, 2025
  2. added
    workflowsUsage: [Issues, PRs], Target: Workflows
    and removed
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Jan 5, 2026
  3. nca-pel commented on Jan 26, 2026

    @nca-pel

    I run in the same problems. AsyncRunHandle checks within EnqueueMessageAsync whether the message is ExternalResponse, but from the WorkflowHostAgent it is always ChatMessage. Thus the Workflow cannot start from a stored Checkpoint after a HitL request. It always starts from the beginning.

  4. lokitoth commented on Feb 4, 2026

    @lokitoth
    Contributor

    There is an additional bit of work to do here: We need to check the incoming messages and properly unwrap incoming responses (whether FunctionCall or user input)

  5. moved this from Planned to In Progress in Agent Frameworkon Feb 26, 2026
  6. VladislavAntonyuk commented on Feb 26, 2026

    @VladislavAntonyuk

    antero-lukkonen have you found a solution how to pass user input back to the conversation?

  7. moved this from In Progress to In Review in Agent Frameworkon Mar 5, 2026
  8. markwallace-microsoft commented on Mar 20, 2026

    @markwallace-microsoft
    Contributor

    antero-lukkonen, friendly reminder — this issue is waiting on your response. Please share any updates when you get a chance. (This is an automated message.)

  9. moved this from In Review to Done in Agent Frameworkon Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions