-
Notifications
You must be signed in to change notification settings - Fork 841
Add Agent Framework DevUI into the aiagent-webapi template #7026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Agent Framework DevUI into the aiagent-webapi template #7026
Conversation
...emplates/Microsoft.Agents.AI.Templates.IntegrationTests/WebApiAgentTemplateExecutionTests.cs
Outdated
Show resolved
Hide resolved
...Agents.AI.ProjectTemplates/src/WebApiAgent/WebApiAgent-CSharp/Properties/launchSettings.json
Show resolved
Hide resolved
...es.IntegrationTests/Snapshots/aiagent-webapi.GitHubModels.verified/aiagent-webapi/Program.cs
Outdated
Show resolved
Hide resolved
danroth27
left a comment
There was a problem hiding this 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.
7a1b0a2 to
874fa81
Compare
There was a problem hiding this 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
ExecutionTestSandboxare being both included and removed, which creates conflicting directives. Lines 27-28 includeContentandEmbeddedResourceitems forExecutionTestSandbox\**\*.*, while line 20 and 25 already remove all items fromExecutionTestSandbox\**. These include directives on lines 27-28 will have no effect since the items have already been excluded, and they should be removed.
...soft.Extensions.AI.Templates.IntegrationTests/Microsoft.Extensions.AI.Templates.Tests.csproj
Outdated
Show resolved
Hide resolved
MackinnonBuck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
* 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>
- 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)
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 theExecutionTestSandboxfolders 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.targetsMicrosoft Reviewers: Open in CodeFlow