Skip to content

[dotnet-ai] Agent stack (agentic-workflow + copilot-sdk-integration) #232

Description

@luisquintanilla

Parent Issue

Part of the dotnet-ai plugin proposal: #225

Summary

Add the agentic-workflow and copilot-sdk-integration skills to the dotnet-ai plugin.

These two skills are tightly coupled — they represent adjacent layers of the .NET agent stack (Runtime vs Harness) and include a Bridge Pattern that shows how to prototype with Copilot SDK and deploy with MAF + Azure OpenAI. Their cross-references are integral, so they are submitted together.

The .NET Agent Stack

┌──────────────┬───────────────────────────────────────┐
│  Harness     │ GitHub Copilot SDK (CopilotClient)    │  copilot-sdk-integration
├──────────────┼───────────────────────────────────────┤
│  Runtime     │ Microsoft Agent Framework (AIAgent)   │  agentic-workflow
├──────────────┼───────────────────────────────────────┤
│  Framework   │ Microsoft.Extensions.AI (IChatClient) │  meai-chat-integration
└──────────────┴───────────────────────────────────────┘

The Bridge Pattern connects these layers: CopilotClient.AsAIAgent() produces a MAF AIAgent backed by Copilot. In production, swap to azureClient.AsAIAgent() — same agent code, different backend.

Skills in This Issue

agentic-workflow

Guides developers through building multi-step agent applications using Microsoft Agent Framework (MAF).

Covers:

  • AIAgent creation via chatClient.AsAIAgent() — the ChatClientAgent pattern
  • Tool definition with [Description] attributes and AIFunctionFactory.Create()
  • AgentSession for multi-turn conversation state management
  • Multi-agent composition via AsAIFunction() — expose agents as tools for a supervisor
  • Durable agents for production (Azure Functions + Durable Task, external storage, horizontal scaling, human-in-the-loop)
  • A2A protocol via MapA2A() for remote agent-to-agent communication
  • Guardrails — timeouts, token limits, tool count per agent
  • Observability — log role and tool name only, never message content (PII risk)
  • Provider flexibility — works with any IChatClient (OpenAI, Azure OpenAI, Ollama, CopilotClient)

Does NOT cover:

  • Simple prompt/response LLM calls (use meai-chat-integration)
  • Building Copilot platform extensions (use copilot-sdk-integration)

copilot-sdk-integration

Guides developers through using the GitHub Copilot SDK with three distinct paths.

Path A — CopilotClient as LLM Backend:

  • Zero-config auth via gh CLI (no API keys)
  • SessionConfig and model selection
  • MAF integration via CopilotClient.AsAIAgent() (bridge package)
  • BYOK (Bring Your Own Key) for OpenAI, Azure OpenAI, Anthropic, Ollama

Path B — Agent Harness Features:

  • Session persistence (~/.copilot/session-state/)
  • MCP server integration
  • Infinite-session context compaction
  • Safe outputs for CI/CD

Path C — Platform Extensions:

  • ASP.NET Core hosting for Copilot agents
  • Tool registration with the Copilot runtime
  • GitHub App authentication
  • Testing with gh copilot CLI

Bridge Pattern:

  • Prototype with CopilotClient (zero-config) → deploy with Azure.AI.OpenAI (Entra ID, horizontal scaling)
  • Same AIAgent abstraction — agent code unchanged across backends

Limitations section:

  • Technical Preview status
  • CLI binary dependency (50-80MB external process)
  • BYOK: static credentials only (no Entra ID, no managed identity)
  • Local filesystem session state (no horizontal scaling)
  • No .NET WASM transport
  • Opaque agent runtime inside CLI binary

Files

plugins/dotnet-ai/skills/agentic-workflow/SKILL.md
plugins/dotnet-ai/skills/copilot-sdk-integration/SKILL.md
tests/dotnet-ai/agentic-workflow/eval.yaml
tests/dotnet-ai/copilot-sdk-integration/eval.yaml

Eval Scenarios

agentic-workflow:

  1. Build agent with tool calling using MAF — expects AIAgent via AsAIAgent(), AgentSession, UseFunctionInvocation()
  2. Multi-agent orchestration with AsAIFunction — expects supervisor pattern with specialist agents as tools
  3. Recommend durable agents for production — expects MAF durable agents for persistence/scaling, NOT Copilot SDK

copilot-sdk-integration:

  1. Use CopilotClient as LLM backend — expects CopilotClient with zero-config auth
  2. Build a Copilot platform extension — expects ASP.NET Core hosting with GitHub App auth
  3. Redirect to MAF for enterprise production — expects redirect when Entra ID or horizontal scaling needed
  4. BYOK with Azure OpenAI — expects ProviderConfig with type azure

Key Packages

  • Microsoft.Extensions.AI (foundation)
  • Microsoft.Agents.AI (MAF — prerelease)
  • GitHub.Copilot.SDK (Copilot SDK — prerelease)
  • Microsoft.Agents.AI.GitHub.Copilot (bridge — prerelease)

Dependencies

Requires the plugin scaffold (sub-issue #1) to be merged first. Ideally meai-chat-integration is merged first since both skills reference IChatClient as the foundation.

Acceptance Criteria

  • agentic-workflow centers on MAF AIAgent patterns (not just IChatClient function calling)
  • AsAIAgent(), AgentSession, AsAIFunction() are all covered with code examples
  • Durable agents and A2A protocol are documented for production scenarios
  • copilot-sdk-integration covers all three dimensions (LLM backend, harness, platform extension)
  • Bridge Pattern is documented with side-by-side code showing Copilot vs Azure OpenAI backends
  • Limitations section is present and accurate
  • eval.yaml files cover positive scenarios and redirect scenarios

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions