Uh oh!
There was an error while loading. Please reload this page.
.NET: Add foundry extension samples for dotnet - #4359
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new Azure AI Foundry “hosted agent” samples (Python + .NET) to support local development and Foundry deployment scenarios, including a single-agent hotel assistant and a multi-agent writer/reviewer workflow.
Changes:
- Introduces Python hosted-agent samples:
foundry_single_agent(Seattle hotel tool) andfoundry_multiagent(writer/reviewer workflow), with Dockerfiles + Foundryagent.yamlmanifests. - Introduces .NET hosted-agent samples: single-agent hotel assistant and multi-agent writer/reviewer workflow, with Dockerfiles +
agent.yaml+ request examples. - Adds end-to-end sample documentation for running locally and deploying via the Foundry VS Code extension.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/05-end-to-end/hosted_agents/foundry_single_agent/requirements.txt | Python dependencies for the Foundry single-agent sample |
| python/samples/05-end-to-end/hosted_agents/foundry_single_agent/main.py | Seattle hotel agent implementation + local tool |
| python/samples/05-end-to-end/hosted_agents/foundry_single_agent/agent.yaml | Foundry hosted-agent manifest for Python single-agent |
| python/samples/05-end-to-end/hosted_agents/foundry_single_agent/README.md | Run/deploy documentation for Python single-agent |
| python/samples/05-end-to-end/hosted_agents/foundry_single_agent/Dockerfile | Container build/run for Python single-agent |
| python/samples/05-end-to-end/hosted_agents/foundry_multiagent/requirements.txt | Python dependencies for the multi-agent workflow sample |
| python/samples/05-end-to-end/hosted_agents/foundry_multiagent/main.py | Writer/Reviewer workflow + hosted server/CLI mode |
| python/samples/05-end-to-end/hosted_agents/foundry_multiagent/agent.yaml | Foundry hosted-agent manifest for Python multi-agent |
| python/samples/05-end-to-end/hosted_agents/foundry_multiagent/README.md | Run/deploy documentation for Python multi-agent |
| python/samples/05-end-to-end/hosted_agents/foundry_multiagent/Dockerfile | Container build/run for Python multi-agent |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_single_agent/run-requests.http | Sample HTTP requests for local testing |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_single_agent/dotnetsingle.csproj | .NET project definition and package references |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_single_agent/agent.yaml | Foundry hosted-agent manifest for .NET single-agent |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_single_agent/README.md | Run/deploy documentation for .NET single-agent |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_single_agent/Program.cs | Seattle hotel agent implementation + local tool |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_single_agent/Dockerfile | Container build/run for .NET single-agent |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_multiagent/dotnetmultiagent.csproj | .NET multi-agent project definition and package references |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_multiagent/appsettings.Development.json | Local dev config file for the multi-agent sample |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_multiagent/agent.yaml | Foundry hosted-agent manifest for .NET multi-agent |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_multiagent/README.md | Run/deploy documentation for .NET multi-agent |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_multiagent/Program.cs | Writer/Reviewer workflow implementation + hosting |
| dotnet/samples/05-end-to-end/HostedAgents/foundry_multiagent/Dockerfile | Container build/run for .NET multi-agent |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Fix Python multiagent indentation bug (from_agent_framework ran in both modes) - Remove hardcoded personal endpoint from appsettings.Development.json - Rename .NET folders/projects to PascalCase (FoundryMultiAgent, FoundrySingleAgent) - Upgrade .NET multiagent from net9.0 to net10.0 - Add ManagePackageVersionsCentrally=false and analyzer blocks to .csproj files - Replace wildcard package versions with fixed versions - Use alpine Docker images and standard build pattern - Align agent.yaml structure (template nesting, displayName, resources, authors) - Convert .NET multiagent from namespace/class to top-level statements - Add run-requests.http for multiagent sample - Fix Python requirements.txt (remove dev deps, add agent-framework) - Add proper copyright headers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix TargetFrameworks (plural) to override inherited net472 from Directory.Build.props - Upgrade Azure.AI.AgentServer.AgentFramework to 1.0.0-beta.8 (latest) - Bump OpenTelemetry packages to 1.12.0 (required by beta.8) - Fix Roslynator/format errors (imports ordering, BOM, sealed record, target-typed new) - Verified with docker dotnet format (matching CI pipeline) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace PersistentAgentsClient and manual AzureOpenAIClient setup with AIProjectClient.CreateAIAgentAsync() from Microsoft.Agents.AI.AzureAI. - FoundryMultiAgent: Remove Azure.AI.Agents.Persistent, use CreateAIAgentAsync for Writer and Reviewer agents with cleanup in finally block - FoundrySingleAgent: Remove manual GetConnection/AzureOpenAIClient chain, use CreateAIAgentAsync with hotel search tool - Update csproj: add Microsoft.Agents.AI.AzureAI, remove unused packages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Reference Microsoft.Agents.AI.AzureAI and Microsoft.Agents.AI.Workflows packages - Add Azure AI Developer role requirement for agents/write data action - Replace PersistentAgentsClient references Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create dotnet/samples/05-end-to-end/HostedAgents/README.md with sample index - Create python/samples/05-end-to-end/hosted_agents/README.md with sample index - Add FoundryMultiAgent and FoundrySingleAgent to agent-framework-dotnet.slnx Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ng whitespace Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Motivation and Context
Description
This pull request introduces a new multi-agent workflow sample (
foundry_multiagent) for Azure AI Foundry using the Microsoft Agent Framework. Both samples are designed for local development and deployment to Microsoft Foundry.Multi-Agent Workflow Sample (
foundry_multiagent):Introduces a new sample in
foundry_multiagentthat creates and orchestrates two agents (Writer and Reviewer) using the AgentServer SDKSingle-Agent Sample (
foundry_single_agent):Adds a new sample agent that provides hotel recommendations in Seattle, including a tool function for simulated hotel availability.
Contribution Checklist