Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6dcf241
Move packages
rogerbarreto Oct 23, 2025
f19c68c
Merge branch 'feature-foundry-agents' of https://github.com/microsoft…
rogerbarreto Oct 23, 2025
f98ddc0
Update nuget.config
rogerbarreto Oct 23, 2025
41d3ae4
Address Xmldoc
rogerbarreto Oct 23, 2025
292238f
Remove format from branches checks
rogerbarreto Oct 23, 2025
04b5cc9
Address Xmldocs
rogerbarreto Oct 23, 2025
698c859
Add more details to the implementation
rogerbarreto Oct 23, 2025
37d44cf
Moving Agent logic to ChatClient
rogerbarreto Oct 23, 2025
959361e
Adding Name and Id overrides to AzureAIAgent
rogerbarreto Oct 23, 2025
2225418
Updating extensions
rogerbarreto Oct 23, 2025
ae8eceb
Merge branch 'feature-foundry-agents' into features/feature-foundry-a…
rogerbarreto Oct 23, 2025
74de27a
Merge branch 'features/feature-foundry-agent/add-new-extensions' of h…
rogerbarreto Oct 23, 2025
fd19888
Merge branch 'feature-foundry-agents' into features/feature-foundry-a…
rogerbarreto Oct 24, 2025
0a4dd8a
Merge branch 'feature-foundry-agents' into features/feature-foundry-a…
crickman Oct 28, 2025
34ac7dd
Add GetAiAgent extensions
rogerbarreto Oct 29, 2025
4a10881
Adding support for version as name can conflict 409 using the Agents …
rogerbarreto Oct 29, 2025
f28fdef
Addressing more updates to the extensions
rogerbarreto Oct 29, 2025
45cffb8
Merge branch 'feature-foundry-agents' into features/feature-foundry-a…
crickman Oct 29, 2025
9b0f064
More improvements
rogerbarreto Oct 29, 2025
1376d2a
Merge branch 'features/feature-foundry-agent/add-new-extensions' of h…
rogerbarreto Oct 29, 2025
dc4dd2e
Remove debugging code from sample
rogerbarreto Oct 29, 2025
d6ee1b7
Address copilot feedback
rogerbarreto Oct 29, 2025
60b9ad3
Apply suggestions from co-pilot code review
rogerbarreto Oct 29, 2025
ff71122
Merge branch 'features/feature-foundry-agent/add-new-extensions' of h…
rogerbarreto Oct 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: dotnet-format
on:
workflow_dispatch:
pull_request:
branches: ["main", "feature*"]
branches: ["main"]
paths:
- dotnet/**
- '.github/workflows/dotnet-format.yml'
Expand Down
4 changes: 2 additions & 2 deletions dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<PackageVersion Include="Aspire.Microsoft.Azure.Cosmos" Version="$(AspireAppHostSdkVersion)" />
<PackageVersion Include="CommunityToolkit.Aspire.OllamaSharp" Version="9.8.0" />
<!-- Azure.* -->
<PackageVersion Include="Azure.AI.Agents" Version="2.0.0-alpha.20251016.2" />
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.2.0-beta.7" />
<PackageVersion Include="Azure.AI.Agents" Version="2.0.0-alpha.20251024.3" />
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.2.0-beta.6" />
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Azure.AI.Agents.Persistent package version is being downgraded from 1.2.0-beta.7 to 1.2.0-beta.6. Downgrading package versions can introduce bugs or remove fixes that were present in the newer version. This should be 1.2.0-beta.7 or higher unless there's a specific reason for the downgrade.

Suggested change
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.2.0-beta.6" />
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.2.0-beta.7" />

Copilot uses AI. Check for mistakes.
<PackageVersion Include="Azure.AI.OpenAI" Version="2.5.0-beta.1" />
<PackageVersion Include="Azure.Identity" Version="1.17.0" />
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.4.0" />
Expand Down
2 changes: 2 additions & 0 deletions dotnet/agent-framework-dotnet.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<Folder Name="/Samples/GettingStarted/AgentProviders/">
<File Path="samples/GettingStarted/AgentProviders/README.md" />
<Project Path="samples/GettingStarted/AgentProviders/Agent_With_A2A/Agent_With_A2A.csproj" />
<Project Path="samples/GettingStarted/AgentProviders/Agent_With_AzureAIAgent/Agent_With_AzureAIAgent.csproj" />
<Project Path="samples/GettingStarted/AgentProviders/Agent_With_AzureFoundryAgent/Agent_With_AzureFoundryAgent.csproj" />
<Project Path="samples/GettingStarted/AgentProviders/Agent_With_AzureFoundryModel/Agent_With_AzureFoundryModel.csproj" />
<Project Path="samples/GettingStarted/AgentProviders/Agent_With_AzureOpenAIChatCompletion/Agent_With_AzureOpenAIChatCompletion.csproj" />
Expand Down Expand Up @@ -263,6 +264,7 @@
<Project Path="src/Microsoft.Agents.AI.A2A/Microsoft.Agents.AI.A2A.csproj" />
<Project Path="src/Microsoft.Agents.AI.Abstractions/Microsoft.Agents.AI.Abstractions.csproj" />
<Project Path="src/Microsoft.Agents.AI.AzureAI/Microsoft.Agents.AI.AzureAI.csproj" />
<Project Path="src/Microsoft.Agents.AI.AzureAIAgents/Microsoft.Agents.AI.AzureAIAgents.csproj" />
<Project Path="src/Microsoft.Agents.AI.CopilotStudio/Microsoft.Agents.AI.CopilotStudio.csproj" />
<Project Path="src/Microsoft.Agents.AI.Hosting.A2A.AspNetCore/Microsoft.Agents.AI.Hosting.A2A.AspNetCore.csproj" />
<Project Path="src/Microsoft.Agents.AI.Hosting.A2A/Microsoft.Agents.AI.Hosting.A2A.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions dotnet/nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="local" value="C:\localpackages" />
<add key="azure-sdk-for-net-pr" value="https://pkgs.dev.azure.com/azure-sdk/internal/_packaging/azure-sdk-for-net-pr/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="local">
<package pattern="*" />
<packageSource key="azure-sdk-for-net-pr">
<package pattern="Azure.AI.Agents" />
</packageSource>
</packageSourceMapping>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>

<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);IDE0059</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.AI.Agents" />
<PackageReference Include="Azure.Identity" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Microsoft.Agents.AI.AzureAIAgents\Microsoft.Agents.AI.AzureAIAgents.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) Microsoft. All rights reserved.

// This sample shows how to create and use a simple AI agent with Azure Foundry Agents as the backend.

using Azure.AI.Agents;
using Azure.Identity;
using Microsoft.Agents.AI;

var endpoint = Environment.GetEnvironmentVariable("AZURE_FOUNDRY_PROJECT_ENDPOINT") ?? throw new InvalidOperationException("AZURE_FOUNDRY_PROJECT_ENDPOINT is not set.");
var deploymentName = Environment.GetEnvironmentVariable("AZURE_FOUNDRY_PROJECT_DEPLOYMENT_NAME") ?? "gpt-4o-mini";

const string JokerInstructions = "You are good at telling jokes.";
const string JokerName = "JokerAgent";

// Get a client to create/retrieve server side agents with.
var agentsClient = new AgentsClient(new Uri(endpoint), new AzureCliCredential());

// Define the agent you want to create.
var agentDefinition = new PromptAgentDefinition(model: deploymentName) { Instructions = JokerInstructions };

// You can create a server side agent with the Azure.AI.Agents SDK.
var agentVersion = agentsClient.CreateAgentVersion(agentName: JokerName, definition: agentDefinition).Value;

// You can retrieve an already created server side agent as an AIAgent.
AIAgent existingAgent = await agentsClient.GetAIAgentAsync(deploymentName, agentVersion.Name);

// You can also create a server side persistent agent and return it as an AIAgent directly.
var createdAgent = agentsClient.CreateAIAgent(deploymentName, name: JokerName, instructions: JokerInstructions);

// You can then invoke the agent like any other AIAgent.
AgentThread thread = existingAgent.GetNewThread();
Console.WriteLine(await existingAgent.RunAsync("Tell me a joke about a pirate.", thread));

// Cleanup by agent name (removes both agent versions created by existingAgent + createdAgent).
await agentsClient.DeleteAgentAsync(agentVersion.Name);
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Prerequisites

Before you begin, ensure you have the following prerequisites:

- .NET 8.0 SDK or later
- Azure Foundry service endpoint and deployment configured
- Azure CLI installed and authenticated (for Azure credential authentication)

**Note**: This demo uses Azure CLI credentials for authentication. Make sure you're logged in with `az login` and have access to the Azure Foundry resource. For more information, see the [Azure CLI documentation](https://learn.microsoft.com/cli/azure/authenticate-azure-cli-interactively).

Set the following environment variables:

```powershell
$env:AZURE_FOUNDRY_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Azure Foundry resource endpoint
$env:AZURE_FOUNDRY_PROJECT_DEPLOYMENT_NAME="gpt-4o-mini" # Optional, defaults to gpt-4o-mini
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(ProjectsTargetFrameworks)</TargetFrameworks>
Expand All @@ -11,9 +11,7 @@

<ItemGroup>
<PackageReference Include="Azure.AI.Agents.Persistent" />
<PackageReference Include="Azure.AI.Agents" />
<PackageReference Include="Microsoft.Extensions.AI" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading