.NET: Include workflow outputs in hosted agent responses - #8020
Open
宇宙的山峰 (UniversePeak) wants to merge 1 commit into
Open
.NET: Include workflow outputs in hosted agent responses#8020宇宙的山峰 (UniversePeak) wants to merge 1 commit into
宇宙的山峰 (UniversePeak) wants to merge 1 commit into
Conversation
宇宙的山峰 (UniversePeak)
requested review from
SergeyMenshykh,
chetantoshniwal,
Peter Ibekwe (peibekwe),
Roger Barreto (rogerbarreto) and
westey (westey-m)
as code owners
September 2, 2026 22:04
宇宙的山峰 (UniversePeak)
temporarily deployed
to
github-app-auth
September 2, 2026 22:04 — with
GitHub Actions
Inactive
宇宙的山峰 (UniversePeak)
temporarily deployed
to
github-app-auth
September 2, 2026 22:04 — with
GitHub Actions
Inactive
宇宙的山峰 (UniversePeak)
temporarily deployed
to
github-app-auth
September 2, 2026 22:05 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation, regression test, and documentation consistently address the reported missing output.
Pull request overview
Enables hosted .NET workflows to return chat-message workflow outputs in completed agent responses.
Changes:
- Enables workflow-output inclusion for
AddAsAIAgent(). - Adds regression coverage for chat-message output.
- Documents hosted and direct workflow behavior.
File summaries
| File | Description |
|---|---|
HostedWorkflowBuilderExtensions.cs |
Enables workflow outputs in hosted responses. |
HostApplicationBuilderWorkflowExtensionsTests.cs |
Tests completed response output. |
ChatMessageOutputWorkflow.cs |
Provides the regression-test workflow. |
README.md |
Documents output behavior and direct opt-in. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Author
|
@microsoft-github-policy-service agree |
宇宙的山峰 (UniversePeak)
force-pushed
the
issue-8013-workflow-output
branch
from
September 3, 2026 04:49
c0af951 to
bb25715
Compare
宇宙的山峰 (UniversePeak)
temporarily deployed
to
github-app-auth
September 3, 2026 04:49 — with
GitHub Actions
Inactive
宇宙的山峰 (UniversePeak)
force-pushed
the
issue-8013-workflow-output
branch
from
September 3, 2026 11:23
bb25715 to
d76af3a
Compare
宇宙的山峰 (UniversePeak)
deployed
to
github-app-auth
September 3, 2026 11:23 — with
GitHub Actions
Active
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
When a workflow is registered with
IHostedWorkflowBuilder.AddAsAIAgent()and exposed through the OpenAI Responses or Conversations endpoints, workflow outputs represented as chat messages were not included in the completed agent response. The stream could show the workflow event while the completed response contained no output items, making the hosting sample unclear and requiring users to discover the lower-levelWorkflow.AsAIAgentoption.Description & Review Guide
AddAsAIAgent()to include workflow outputs in the hostedAIAgentresponse.ChatMessageworkflow output and verifies the hosted agent response contains it.Workflow.AsAIAgent.Workflow.AsAIAgentbehavior remains unchanged.Related Issue
Fixes #8013
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.Validation:
dotnet test tests/Microsoft.Agents.AI.Hosting.UnitTests/Microsoft.Agents.AI.Hosting.UnitTests.csproj --no-restore -f net10.0(200 passed);dotnet format agent-framework-dotnet.slnx whitespace --no-restore --verify-no-changespassed;git diff --checkpassed.