Files
agent-framework/dotnet
T
Copilot 62854197aa .NET: Fix A2A conversion routines to ignore unknown content types instead of throwing exceptions (#1154)
* Initial plan

* Update A2A conversion routines to ignore unknown content types

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Fix dotnet format

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
62854197aa ยท 2025-10-06 10:29:43 +00:00
History
..
2025-10-02 21:03:55 +01:00
2025-10-06 07:43:04 +00:00
2025-10-01 16:43:17 +00:00

Get Started with Microsoft Agent Framework for C# Developers

Samples

Quickstart

Basic Agent - .NET

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

var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT")!;
var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME")!;

var agent = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
    .GetOpenAIResponseClient(deploymentName)
    .CreateAIAgent(name: "HaikuBot", instructions: "You are an upbeat assistant that writes beautifully.");

Console.WriteLine(await agent.RunAsync("Write a haiku about Microsoft Agent Framework."));

Examples & Samples

Agent Framework Documentation