Skip to content

Add dotnet-agent-framework skill for production-ready AI agent development#32

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-dotnet-agent-framework-authoring
Draft

Add dotnet-agent-framework skill for production-ready AI agent development#32
Copilot wants to merge 2 commits intomainfrom
copilot/add-dotnet-agent-framework-authoring

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

Addresses the gap between basic LLM chat completions and production-ready .NET agent services by providing end-to-end guidance for the Microsoft Agent Framework (dotnet/extensions).

Skill Overview

Name: dotnet-agent-framework
Structure: 364-line SKILL.md + 4 reference files (1,325 lines of examples)

Coverage

  • Scenario selection: Chat, tool-calling, multi-agent orchestration, RAG pipelines with decision guidance
  • Framework selection: .NET 8 LTS vs 9 vs 10 tradeoffs, support lifecycle considerations
  • Project scaffolding: Package selection (Microsoft.Extensions.AI, Microsoft.Extensions.AI.Abstractions), template guidance
  • Dependency injection: IChatClient registration patterns, middleware pipelines (function invocation, OpenTelemetry, rate limiting), keyed services for multi-model scenarios
  • Configuration: Options pattern, user secrets, Azure Key Vault integration
  • Observability: ILogger with LoggerMessage source generators, OpenTelemetry tracing, metrics collection
  • Tool authoring: [Description] attributes, parameter binding, async patterns, error handling
  • Provider configuration: Azure OpenAI, OpenAI, Ollama with provider-agnostic abstractions

Structure

skills/dotnet-agent-framework/
├── SKILL.md (364 lines)
└── references/
    ├── dependency-injection-examples.md
    ├── configuration-examples.md
    ├── tool-authoring-examples.md
    └── observability-examples.md

Detailed code examples moved to reference files to maintain <500 line limit per repository conventions.

Example: Tool Authoring Pattern

public class WeatherTools
{
    [Description("Gets the current weather for a city")]
    public async Task<string> GetWeatherAsync(
        [Description("The city name")] string city,
        [Description("Temperature unit: celsius or fahrenheit")] string unit = "celsius")
    {
        // Tool implementation with error handling
    }
}

// Registration
builder.Services.AddSingleton<IChatClient>(services =>
{
    var baseClient = /* create base client */;
    var tools = services.GetRequiredService<WeatherTools>();
    return baseClient.AsBuilder()
        .UseFunctionInvocation()
        .UseTools(tools)
        .Build();
});

Validation

10-step validation checklist covering build, DI resolution, configuration loading, chat roundtrips, tool invocation, logging, health checks, and graceful shutdown.

Original prompt

This section details on the original issue you should resolve

<issue_title>Skill: .NET Agent Framework Authoring</issue_title>
<issue_description>## Problem

The Microsoft Agent Framework (built from dotnet/extensions) provides first-party abstractions for building AI agents in .NET. However, going from "I want to build an agent" to a well-structured, production-ready agent application involves a long series of decisions: which scenario template to start from, which AI provider to target, how to wire up dependency injection, how to configure logging for observability, and how to follow modern .NET patterns throughout. AI models today don't reliably know these patterns because the framework is new and evolving.

What expert .NET knowledge would this encode?

  • Scenario selection guidance: Chat agents, tool-calling agents, multi-agent orchestration, RAG pipelines — which template fits which use case, with decision tree
  • Target framework selection: .NET 8 LTS vs .NET 9 vs .NET 10 tradeoffs for agent applications (hosting model, IChatClient availability, support lifecycle)
  • Project scaffolding: Correct packages (Microsoft.Extensions.AI, Microsoft.Extensions.AI.OpenAI, Microsoft.Extensions.AI.Abstractions), project structure based on the dotnet/extensions templates
  • Dependency injection setup: Proper registration of IChatClient, middleware pipelines (function invocation, OpenTelemetry, rate limiting), keyed services for multi-model scenarios
  • Logging and observability: Structured logging with ILogger, OpenTelemetry integration for tracing agent calls, configuring LoggerMessage source generators for high-perf logging in hot paths
  • Modern .NET best practices: Options pattern for configuration, health checks, graceful shutdown, nullable reference types, top-level statements vs minimal hosting — applied specifically to agent applications
  • Tool authoring: Defining tools with [Description], proper parameter binding, async tool patterns, error handling in tool invocations
  • Provider configuration: Wiring up Azure OpenAI, OpenAI, Ollama, or other providers via the IChatClient abstraction

Skill concept

A guided skill that walks the developer through building a .NET AI agent application end-to-end:

  1. Understand the goal — What kind of agent? (Conversational, tool-calling, multi-step, multi-agent?) What's the deployment target? (Console app, ASP.NET service, Azure Function?)
  2. Guide scenario selection — Based on answers, recommend the right starting template and architecture
  3. Guide target framework and provider selection — Based on deployment needs, model provider, and support requirements
  4. Scaffold the project — Generate the project file, hosting setup, DI registration, and initial agent structure
  5. Wire up cross-cutting concerns — Logging, configuration, health checks, OpenTelemetry — following the same patterns used in dotnet/extensions itself
  6. Validate the result — Ensure the agent builds, DI resolves correctly, and a basic prompt/response roundtrip works

Why customers would value this

AI agent development in .NET is exploding, but the gap between "hello world chat completion" and "production agent service" is enormous. Customers need guidance on the full stack: not just calling an LLM, but structuring the application around it with proper DI, logging, configuration, error handling, and observability. This is exactly the kind of end-to-end guidance the .NET team is uniquely positioned to provide — it's the same patterns used internally in dotnet/extensions and ASP.NET.

Scope

In scope:

  • Agent scaffolding from dotnet/extensions templates
  • Scenario selection guidance (chat, tool-calling, multi-agent)
  • Target framework selection
  • DI setup with IChatClient and middleware
  • Logging, configuration (Options pattern), and OpenTelemetry
  • Tool authoring patterns
  • Provider-agnostic setup (Azure OpenAI, OpenAI, Ollama)

Out of scope:

  • Custom model provider implementation
  • Fine-tuning or model training
  • Semantic Kernel migration (separate skill)
  • Deployment/infrastructure (separate concern)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: artl93 <9855795+artl93@users.noreply.github.com>
Copilot AI changed the title [WIP] Add guidance for .NET agent framework authoring Add dotnet-agent-framework skill for production-ready AI agent development Feb 17, 2026
Copilot AI requested a review from artl93 February 17, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill: .NET Agent Framework Authoring

2 participants