Files
agent-framework/dotnet
T
Chandramouleswaran 0c67dbbce5 .NET: Update GitHub.Copilot.SDK to 0.1.23 and copy new session config prope… (#3788)
* Update GitHub.Copilot.SDK to 0.1.23 and copy new session config properties

- Bump GitHub.Copilot.SDK from 0.1.18 to 0.1.23
- Add new SessionConfig properties: ReasoningEffort, Hooks, OnUserInputRequest,
  WorkingDirectory, ConfigDir, InfiniteSessions
- Add missing ResumeSessionConfig properties: Model, SystemMessage,
  AvailableTools, ExcludedTools, ReasoningEffort, Hooks, OnUserInputRequest,
  WorkingDirectory, ConfigDir, InfiniteSessions
- Fix UserMessageDataAttachmentsItem -> UserMessageDataAttachmentsItemFile
  for new polymorphic attachment API
- Add unit tests for new session config properties

* Address PR review: centralize config mapping and improve test coverage

- Extract CopySessionConfig/CopyResumeSessionConfig as internal static helpers
  to eliminate duplicated mapping logic between RunCoreStreamingAsync and
  CreateResumeConfig (addresses reviewer comment on drift risk)
- Add InternalsVisibleTo for unit test project
- Replace shallow constructor tests with comprehensive property-verification
  tests that validate every config property is correctly copied, including
  OnUserInputRequest (addresses reviewer comments on test coverage)

* Remove accidentally committed git-lfs hooks
0c67dbbce5 · 2026-02-12 18:31:20 +00:00
History
..
2026-02-12 15:37:17 +00:00
2025-11-22 04:14:15 +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)
    .AsAIAgent(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