-
Notifications
You must be signed in to change notification settings - Fork 849
Add a new Microsoft.Agents.AI.Templates package with an aiagent-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 aiagent-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 <[email protected]>
|
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.
Introduces the new
Microsoft.Agents.AI.Templatespackage that includes anaiagent-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