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
Copilot finished reviewing on behalf of jeffhandley November 11, 2025 04:38
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants