mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
0c67dbbce5
* 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
Get Started with Microsoft Agent Framework for C# Developers
Samples
- Getting Started with Agents: basic agent creation and tool usage
- Agent Provider Samples: samples showing different agent providers
- Workflow Samples: advanced multi-agent patterns and workflow orchestration
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
- Getting Started with Agents: basic agent creation and tool usage
- Agent Provider Samples: samples showing different agent providers
- Workflow Samples: advanced multi-agent patterns and workflow orchestration