-
Notifications
You must be signed in to change notification settings - Fork 841
Add a new Microsoft.Agents.AI.Templates package with an aiagents-webapi project template #7014
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 a new Microsoft.Agents.AI.Templates package with an aiagents-webapi project template #7014
Conversation
...ProjectTemplates/Microsoft.Agents.AI.Templates/src/WebApiAgent/WebApiAgent-CSharp/Program.cs
Show resolved
Hide resolved
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 introduces the new Microsoft.Agents.AI.Templates package containing an aiagents-webapi project template for creating AI Agents Web API applications. The template supports multiple AI service providers (GitHub Models, OpenAI, Azure OpenAI, Ollama) with configurable options for authentication and models. The PR also refactors shared project template testing infrastructure to support both the new Agents templates and existing Extensions.AI templates.
Key changes:
- New
aiagents-webapitemplate package with multi-provider support and managed identity authentication - Refactored shared test infrastructure from
Microsoft.Extensions.AI.Templates.Testsnamespace toMicrosoft.Shared.ProjectTemplates.Testsfor reusability - Comprehensive snapshot and execution tests validating all template configuration options
Reviewed Changes
Copilot reviewed 72 out of 81 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
test/Shared/ProjectTemplates/*.cs |
Namespace refactoring from Extensions.AI to shared namespace for test infrastructure reusability |
test/ProjectTemplates/Microsoft.Agents.AI.Templates.IntegrationTests/* |
New integration test project with snapshot and execution tests for aiagents-webapi template |
src/ProjectTemplates/Microsoft.Agents.AI.Templates/* |
New template package containing aiagents-webapi template with multi-provider support |
src/ProjectTemplates/GeneratedContent.targets |
Build configuration for generating template content with package version variables |
test/Shared/ProjectTemplates/TemplateExecutionTestCollectionFixture.cs
Outdated
Show resolved
Hide resolved
test/Shared/ProjectTemplates/TemplateExecutionTestCollection.cs
Outdated
Show resolved
Hide resolved
...Templates/Microsoft.Agents.AI.Templates.IntegrationTests/WebApiAgentTemplateSnapshotTests.cs
Show resolved
Hide resolved
...mplates/Microsoft.Agents.AI.Templates.IntegrationTests/WebApiAgentsTemplateExecutionTests.cs
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Microsoft.Agents.AI.Templates/src/WebApiAgent/WebApiAgent-CSharp/README.md
Show resolved
Hide resolved
...Templates.IntegrationTests/Snapshots/aiagent-webapi.Ollama.verified/aiagent-webapi/README.md
Show resolved
Hide resolved
...ests/Snapshots/aiagent-webapi.AzureOpenAI_ManagedIdentity.verified/aiagent-webapi/Program.cs
Show resolved
Hide resolved
...soft.Agents.AI.Templates/src/WebApiAgents/WebApiAgents-CSharp/.template.config/template.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Should this have an option to attach to Aspire? Aspire helps to nicely define for example integration with AzureOpenAI / Foundry like here |
We'll add the Aspire option in a follow-up; might not land this week though. |
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 so far - just some initial thoughts about the template infrastructure.
...emplates/Microsoft.Agents.AI.Templates.IntegrationTests/WebApiAgentTemplateExecutionTests.cs
Show resolved
Hide resolved
|
If it's only in one AI template, that would be even better. |
…ming change. Fix snapshots
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!
…pi project template (dotnet#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 (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)
Introduces the new
Microsoft.Agents.AI.Templatespackage that includes anaiagents-webapiproject template. Snapshot tests and execution tests are added for verifying all of the currently supported options in the template.Microsoft Reviewers: Open in CodeFlow