Skip to content

Conversation

@jeffhandley
Copy link
Member

@jeffhandley jeffhandley commented Nov 7, 2025

The Microsoft.Agents.AI.DevUI package will soon be published, and it will be enabled by default in the aiagent-webapi project template, with the option to disable it. When DevUI is enabled, the OpenAI Responses and Conversations need to be added into the app.

This PR also improves the project template execution test output to emit the stdout and stderr when not empty, as well as an expanded test description that does not get truncated (like the [Theory] args do). As part of that, an issue is fixed in the project template projects where the ExecutionTestSandbox folders were being included in the projects, causing build errors in the projects after execution tests had been run.

This cannot be merged until DevUI is published and the package versions are updated in src/ProjectTemplates/GeneratedContent.targets

Microsoft Reviewers: Open in CodeFlow

@jeffhandley jeffhandley self-assigned this Nov 7, 2025
@jeffhandley jeffhandley added * NO MERGE * Do not merge this PR as long as this label is present. area-ai-templates Microsoft.Extensions.AI.Templates labels Nov 7, 2025
Copy link
Member

@danroth27 danroth27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a couple of minor comments.

@jeffhandley jeffhandley force-pushed the jeffhandley/aiagent-webapi-devui branch from 7a1b0a2 to 874fa81 Compare November 11, 2025 04:35
@jeffhandley jeffhandley marked this pull request as ready for review November 11, 2025 04:37
Copilot AI review requested due to automatic review settings November 11, 2025 04:37
@jeffhandley jeffhandley requested a review from a team as a code owner November 11, 2025 04:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates the Agent Framework DevUI into the aiagent-webapi template and addresses several template-related improvements. The main changes rename the project template package from Microsoft.Agents.AI.Templates to Microsoft.Agents.AI.ProjectTemplates, add DevUI support with browser launch configuration, update API configuration keys for better simplicity, and fix issues with test project file exclusions.

Key changes:

  • Adds DevUI package reference and endpoint mapping to all aiagent-webapi template variants
  • Updates configuration keys from nested format (e.g., OpenAI:Key) to simple environment variable format (e.g., OPENAI_KEY)
  • Renames project template package and updates all references throughout the codebase
  • Fixes ExecutionTestSandbox folder inclusion issues in test projects

Reviewed Changes

Copilot reviewed 42 out of 55 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/ProjectTemplates/Microsoft.Agents.AI.ProjectTemplates.IntegrationTests/Microsoft.Agents.AI.ProjectTemplates.Tests.csproj Adds ExecutionTestSandbox exclusions with conflicting include directives
test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj Similar ExecutionTestSandbox exclusions with incorrect include directives
src/ProjectTemplates/Microsoft.Agents.AI.ProjectTemplates/src/WebApiAgent/WebApiAgent-CSharp/Program.cs Adds DevUI integration, updates to use ChatClient directly, and simplifies configuration
src/ProjectTemplates/Microsoft.Agents.AI.ProjectTemplates/src/WebApiAgent/WebApiAgent-CSharp/README.md Updates documentation for simplified configuration keys and DevUI
Multiple snapshot files Regenerated snapshots reflecting template changes
src/ProjectTemplates/GeneratedContent.targets Updates package versions and template paths
Comments suppressed due to low confidence (1)

test/ProjectTemplates/Microsoft.Agents.AI.ProjectTemplates.IntegrationTests/Microsoft.Agents.AI.ProjectTemplates.Tests.csproj:28

  • The items for ExecutionTestSandbox are being both included and removed, which creates conflicting directives. Lines 27-28 include Content and EmbeddedResource items for ExecutionTestSandbox\**\*.*, while line 20 and 25 already remove all items from ExecutionTestSandbox\**. These include directives on lines 27-28 will have no effect since the items have already been excluded, and they should be removed.

@jeffhandley jeffhandley removed the * NO MERGE * Do not merge this PR as long as this label is present. label Nov 11, 2025
Copy link
Member

@MackinnonBuck MackinnonBuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@jeffhandley jeffhandley merged commit a4b3d62 into dotnet:main Nov 11, 2025
6 checks passed
@jeffhandley jeffhandley deleted the jeffhandley/aiagent-webapi-devui branch November 11, 2025 06:18
joperezr pushed a commit to joperezr/extensions that referenced this pull request Nov 11, 2025
* Integrate DevUI into the aiagent-webapi project template

* Improve aiagent-webapi Program.cs per feedback.

* Remove --no-devui. Fix OpenAI clients. Augment execution test sandbox ignores.

* Rename to Microsoft.Agents.AI.ProjectTemplates

* Set Microsoft.Agents.AI package versions

* Simplify the GitHub and OpenAI key config vars for aiagent-webapi

* Sort package references

* Fix troubleshooting section in READMEs

* Revert MEAI.Templates change. Make launchSettings .gitignore more specific.

---------

Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>
joperezr pushed a commit to joperezr/extensions that referenced this pull request Nov 11, 2025
- Use `Microsoft.Extensions.DataIngestion` in AI Chat Web template (dotnet#7023)
- Add a new Microsoft.Agents.AI.Templates package with an aiagents-webapi project template (dotnet#7014)
- Add Agent Framework DevUI into the aiagent-webapi template (dotnet#7026)
joperezr added a commit that referenced this pull request Nov 14, 2025
* Merged PR 54952: Getting ready for the 10.0 stable release. Flowing .NET Servicing

#### AI description  (iteration 1)
#### PR Classification
This PR updates dependency versions and build pipeline configurations to prepare for the .NET 10.0 stable release.

#### PR Summary
The changes update dependency and LTS versions (upgrading many from 9.0.10 to 9.0.11), enable release-specific flags, and streamline the build pipelines for servicing.
- **`eng/Version.Details.xml` and `eng/Versions.props`**: Upgraded various dependency versions and LTS numbers and set stabilization flags (e.g., `StabilizePackageVersion` to true, `DotNetFinalVersionKind` to release).
- **`azure-pipelines.yml`**: Removed the code coverage stage to simplify the CI pipeline.
- **`eng/pipelines/templates/BuildAndTest.yml`**: Added tasks to set up private feed credentials and commented out integration tests that require authentication.
- **`NuGet.config`**: Revised package source configuration by removing package source mapping and adding new internal feed URLs.
- **`Directory.Build.props`**: Suppressed NU1507 warnings to accommodate internal branch configuration.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->

* [MEDI] start producing NuGet packages (#7016)

* remove IsPackable=false, provide all mandatory properties for each package we want to ship

* add basic READMEs

* Update version numbers in AI changelogs (#7008)

* [MEDI] Don't stop document processing on enricher error (#7005)

* introduce EnricherOptions option bag

* implement batching

* don't validate results returned by IChatClient

* don't expose FileInfo as source via IngestionResult, as it could be Stream in the future. Just expose the document id

* Enricher failures should not fail the whole ingestion pipeline, as they are best-effort enhancements

* [MEDI] add PackageTags (#7022)

* Add MarkItDownMcpReader for MCP server support (#7025)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>

* Image generation tool (#6749)

* Prototype of using ImageGenerationTool

* Handle DataContent returned from ImageGen

* React to rename and improve metadata

* Handle image_generation tool content from streaming

* Add handling for combining updates with images

* Add tests for new ChatResponseUpdateExtensions

* Rename ImageGenerationTool to HostedImageGenerationTool

* Remove ChatResponseUpdateCoalescingOptions

* Add ImageGeneratingChatClient

* Fix namespace of tool

* Replace traces of function calling

* More namepsace fix

* Enable editing

* Update to preview OpenAI with image tool support

* Temporary OpenAI feed

* Fix tests

* Add integration tests for ImageGeneratingChatClient

* Remove ChatRole.Tool -> Assistant workaround

* Remove use of private reflection for Image results

* Add ChatResponseUpdate.Clone

* Move all mutable state into RequestState object

* Adjust prompt to improve integration test reliability

* Refactor tool initialization

I verified that the tool creation is cached by ReflectionAIFunctionDescriptor

This change includes a small optimization to avoid additional allocation
around inserting tools into the options.

* Add integration tests for streaming

Fixes the removal of tool content - this was broken for streaming when
I changed removal to be based on callId.  We don't have the CallId yet
in the streaming case so we have to remove by name.

* React to changes and fix tests

* Address feedback

* Fix SkipTestException from ConditionalTheory

* Fix formatting

* Add back image replacement coalescing (removed in merge)

* Fix template tests and use new OpenAI

* Remove use of temporary staging nuget feed

* Address feedback

* Make ImageGeneratingChatClient use ImageGenerationTool*Content

* Remove ApplyUpdates and Coalesce ImageResults instead of DataContent.

* Workaround OpenAI issue where image data is not read for partial images.

openai/openai-dotnet#809

* Improved workaround

* Return ImageGenerationToolCallContent from OpenAI

* Add OpenAI image tool tests with representation of real traffic

* Correct the event sequence for streaming single image

* Fix some docs and refactor for clarity

* Make MEAI packages use 10.0 runtime packages (#7028)

* Make MEAI packages use 10.0 runtime packages

* Add back MEAI.Abstractions JsonSchemaExporter tests

* Address feedback

* Remove unneeded trimming suppression

* When using latest .NET packages, force System.Numerics.Tensors to 10.0 (for MEAI) (#7031)

* Add a new Microsoft.Agents.AI.Templates package with an aiagents-webapi project template (#7014)

* Initial Microsoft.Agents.AI.Templates structure

* Refine Microsoft.Agents.AI.Templates infrastructure

* Move project template infrastructure utilities into a shared folder

* Add the webapi-agents project template content with GitHub models

* Support parameterized AI Service Provider

* Rename to aiagents-webapi

* Support parameterized chatmodel and update docs with renames

* Add Snapshot tests

* Add aiagents-webapi snapshot tests

* Add aiagents-webapi execution tests (and component governance)

* Improve aiagents-webapi template parameters

* Apply suggestions from copilot code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Move shared ProjectTemplate infrastructure to not get included in Shared.Tests

* Fix the template sandbox / execution tests after moving infrastructure

* Ignore CA1716 warning about 'Shared' namespace in template tests

* Clean up template sandbox source/output

* Rename to "aiagent-webapi" and favor singular "Agent". Docs cleanup.

* Update templates dev doc to cover Microsoft.Agents.AI.Templates too

* Fix remaining template sandbox references with new paths

* Add a tool call in aiagent-webapi. Update workflow API usage for upcoming change.

Fix snapshots

* Exclude csproj.in file from template package

* Add a survey link to the aiagent-webapi template's generated readme

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Use `Microsoft.Extensions.DataIngestion` in AI Chat Web template (#7023)

* Add Markdown support

* Remove PDF support

* Revert "Remove PDF support"

This reverts commit e1d066034962c9686bf8150984b6adf0e25846c8.

* Add 'Example_GPS_Watch.md'

* Add MEDI dependencies

* Revert "[MEDI] Remove collection key type workaround (#7010)"

This reverts commit a369be9.

* MEDI integration into chat template

* Remove PdfPig dependency

* Fix citation + normalize identifier path

* Undo changes to `M.E.DI.csproj`

* Update snapshots

* Update DataIngestion unit tests to handle keys as either strings or guids

* Update SK and fix MEDI version

* Remove SK workaround

* Fix sandbox paths to allow running tests multiple times

* Reliable data ingestion

* Enable MEDI tracing

* Simplify log message

* Add `PdfPigReader` for non-Aspire template

* Invert PdfPigReader exclusion condition

* Use Markitdown MCP

* Update snapshots

* Undo changes to `IngestionPipelineTests.cs`

* Update src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/Services/Ingestion/DocumentReader.cs

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>

* Update snapshots

* Improve template execution test failure output

* Support .NET 10 in aichatweb, using it by default

* Show a message when loading documents by loading docs as a separate tool

* disable the incremental ingestion

* map every PDF page to a single section

* drop SK dependency

* Add system prompt instructions for calling the LoadDocuments tool. Fix code formatting.

---------

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>

* Add Agent Framework DevUI into the aiagent-webapi template (#7026)

* Integrate DevUI into the aiagent-webapi project template

* Improve aiagent-webapi Program.cs per feedback.

* Remove --no-devui. Fix OpenAI clients. Augment execution test sandbox ignores.

* Rename to Microsoft.Agents.AI.ProjectTemplates

* Set Microsoft.Agents.AI package versions

* Simplify the GitHub and OpenAI key config vars for aiagent-webapi

* Sort package references

* Fix troubleshooting section in READMEs

* Revert MEAI.Templates change. Make launchSettings .gitignore more specific.

---------

Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>

* Fix display of target frameworks in agents template. Hide the chat model textbox from the IDE template UI.

---------

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Co-authored-by: Jeff Handley <Jeff.Handley@microsoft.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ai-templates Microsoft.Extensions.AI.Templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants