Skip to content
Skills Library
AI & agents · Building & coding

agent-framework-builder-dotnet

/agent-framework-builder-dotnet

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
10
Scripts
0
HTML comments
0
URLs in SKILL.md
7
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

Original author description

Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.

How it works

  1. Workflow
  2. Core abstractions
  3. User interface options
  4. Choose the build path
  5. Defaults
  6. Current documentation lookup
Original SKILL.md headings · 106 lines, 981 words
SKILL.md preview
---
name: agent-framework-builder-dotnet
description: Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.
license: MIT
metadata:
  version: "0.1"
  project: agent-framework
  language: dotnet
---

# Agent Framework builder for .NET

Use this skill as the entry point for .NET Agent Framework application work. Choose the smallest framework pattern
that preserves the required behavior, load only the relevant references, and validate against current APIs instead of
relying on remembered preview-era syntax.

## Workflow

1. Inspect the existing solution: target frameworks, SDK version, package management (central package management or
   per-project), and installed `Microsoft.Agents.AI.*` packages and versions.
2. Choose the simplest matching path from the table below.
3. Resolve design questions only when they materially change the implementation.
4. Read only the linked reference for the selected path.
5. Implement the smallest coherent change and run the narrowest validation that exercises it.

## Core abstractions

- A **chat client** is a `Microsoft.Extensions.AI.IChatClient`. It sends messages and options to a model provider and
  returns chat responses or streaming updates. Agent Framework builds on `Microsoft.Extensions.AI` types such as
  `ChatMessage`, `AIFunction`, and `ChatOptions` instead of redefining them.
- An **agent** derives from `AIAgent` and exposes `RunAsync(...)` and `RunStreamingAsync(...)`. `ChatClientAgent` is the
  standard implementation: it wraps an `IChatClient` with instructions, tools, context providers, a chat history
  provider, and session handling. Provider packages usually create one through an `AsAIAgent(...)` extension method.
- A **harness agent** is a `HarnessAgent` from `Microsoft.Agents.AI.Harness`. It wraps a `ChatClientAgent` with an
  opinionated set of context providers and agent decorators; it is still an `AIAgent`.
- A **workflow** (`Microsoft.Agents.AI.Workflows`) coordinates explicit execution paths between executors and agents.
  `AgentWorkflowBuilder` provides standard sequential, concurrent, handoff, group-chat, and Magentic patterns over
  `AIAgent` participants. A workflow can be exposed as an `AIAgent` when callers need the agent contract.

## User interface options

- **DevUI** (`Microsoft.Agents.AI.DevUI`) is a local development, testing, and debugging tool for interacting with
  agents and workflows. Never run or deploy DevUI as a production application host.
- **AG-UI** is the application-facing protocol integration for connecting an agent or workflow to an AG-UI-compatible
  frontend. Use `Microsoft.Agents.AI.Hosting.AGUI.AspNetCore` (server) when the product needs streaming UI events,
  tool interactions, shared state, interrupts, or resume behavior.

## Choose the build path

| Path | Choose it when | Details |
| --- | --- | --- |
| Plain agent | One model-driven actor owns the task and tools, sessions, context, and middleware are sufficient. | [Plain agents](references/agent-builder.md) |
| Harness agent | The product needs an operating loop with todos, modes, memory, approvals, skills, optional file access, background agents, shell, compaction, or repeated execution. | [Harness agents](references/harness-agent-builder.md) |
| Workflow or orchestration | Explicit stages, routing, parallelism, multiple participants, checkpointing, human input, or intermediate outputs are central to correctness. | [Workflows](references/workflow-builder.md) |
| Declarative definition | YAML should be the source of truth for a supported agent or workflow. | [Declarative definitions](references/declarative.md) |
| Evaluation | Expected outputs, tool calls, failed runs, or quality regressions are the main concern. | [Evaluation](references/evaluation.md) |
| Observability | The task is diagnosing or monitoring runtime behavior with traces, logs, and metrics. | [Observability](references/observability.md) |
| Extensibility | The application needs a custom chat client, agent, context provider, chat history provider, or middleware. | [Extensibility](references/extensibility.md) |
| Integration | The task is choosing or wiring a provider, protocol, memory store, tool service, UI, or platform extension. | [Integrations](references/integrations.md) |
| Hosting and deployment | Working Agent Framework code needs a process host, protocol endpoint, identity contract, or deployment shape. | [Hosting and deployment](references/hosting-and-deployment.md) |

## Defaults

- Target a currently supported .NET release. The packages multi-target current and recent LTS .NET versions, and some
  also support .NET Standard 2.0 and .NET Framework 4.7.2. Prefer the latest supported SDK unless the project pins one.
- Add only the narrow packages the application needs (for example `Microsoft.Agents.AI` plus one provider package)
  instead of every `Microsoft.Agents.AI.*` package.
- Package maturity differs per package: some are released, others are `-preview` or `-alpha`. Check the package's
  current status before depending on it and allow prerelease versions only when required.
- Some APIs are marked `[Experimental]` and surface diagnostic IDs (for example `MAAI001`). Suppress a diagnostic only
  deliberately, scoped to the code that uses the API, after confirming the feature may change.
- Agent Framework does not read configuration on your behalf. Read endpoints, models, and keys through
  `IConfiguration`, user secrets, or environment variables and pass them to the client explicitly. Prefer a token
  credential such as `DefaultAzureCredential` over API keys, and never hard-code secrets.
- `DefaultAzureCredential` probes several credential sources, which adds latency and risk in production. When the
  hosting identity is known (for example managed identity), use that specific credential instead.

## Current documentation lookup

Use local guidance for stable decisions and common patterns. For provider matrices, package maturity, hosted tools,
deployment details, or unfamiliar APIs, consult current sources before generating code.

The reference pages intentionally describe selection rules, invariants, and non-obvious gotchas. Use XML docs or API
reference pages for signatures and option details, and use Learn or maintained samples for end-to-end procedures.

When the coding agent supports MCP, configure the Microsoft Learn MCP Server as a Streamable HTTP server:

```text
https://learn.microsoft.com/api/mcp
```

See [Microsoft Learn MCP Server setup](https://learn.microsoft.com/training/support/mcp-get-started) for client
configuration. The endpoint is for MCP clients and returns an error when opened directly in a browser.

1. Search Microsoft Learn with `microsoft_docs_search`.
2. Fetch the relevant page with `microsoft_docs_fetch`.
3. Use `microsoft_code_sample_search` when a current implementation example is needed.
4. If Learn MCP is unavailable and a trusted `mslearn` CLI is already installed, use the equivalent command:

| MCP tool | Preinstalled CLI |
| --- | --- |
| `microsoft_docs_search(query="...")` | `mslearn search "..."` |
| `microsoft_docs_fetch(url="...")` | `mslearn fetch "..."` |
| `microsoft_code_sample_search(query="...", language="csharp")` | `mslearn code-search "..." --language csharp` |

Do not fetch and execute an unpinned CLI package during a coding session. Use the
[official Microsoft Learn MCP/CLI setup](https://github.com/MicrosoftDocs/mcp) to install or update it intentionally.

Canonical starting points:

- [Agent Framework overview](https://learn.microsoft.com/agent-framework/overview/)
- [Your first agent](https://learn.microsoft.com/agent-framework/get-started/your-first-agent)
- [.NET SDK samples](https://github.com/microsoft/agent-framework/tree/main/dotnet/samples)
- [Foundry-hosted Agent Framework samples](https://github.com/microsoft-foundry/foundry-samples/tree/main/samples/csharp/hosted-agents/agent-framework)
Files in this package (10)
  • SKILL.md 8 KB
  • references/agent-builder.md 10 KB
  • references/declarative.md 3 KB
  • references/evaluation.md 2 KB
  • references/extensibility.md 11 KB
  • references/harness-agent-builder.md 5 KB
  • references/hosting-and-deployment.md 5 KB
  • references/integrations.md 4 KB
  • references/observability.md 2 KB
  • references/workflow-builder.md 4 KB

Versions

The database has no other skills named agent-framework-builder-dotnet.

Database snapshot: 13.11.2026 · package version 7983292b2c48 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100agent-framework-builder-python
    Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting Python applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware,…
  • 100microsoft-agent-framework
    Build .NET AI agents, harnesses, and multi-agent workflows with Microsoft Agent Framework using the right agent type, sessions, tools, workflows, hosting protocols, and enterprise guardrails. USE FOR: building or reviewing .NET code that uses Microsoft.Agents.*,…
  • 100microsoft-agent-framework
    Microsoft Agent Framework is an open-source framework for building AI agents and multi-agent workflows in Python and .NET, the successor to Semantic Kernel agents and AutoGen. Use this skill when a user asks to build an agent with tools, run sequential, concurrent, handoff or…
  • 100check-prereq-agent-dotnet
    Checks prerequisites for building durable AI agents in .NET with Microsoft Agent Framework on Dapr Workflow. Use for "check prerequisites for .NET agents" or "verify .NET agent environment".
  • 100bf-to-agents-sdk-dotnet-migration
    Use when migrating a Bot Framework .NET SDK bot to Microsoft 365 Agents SDK. Triggered by projects that depend on packages: Microsoft.Bot.Builder or Microsoft.Bot.Builder.Integration.AspNet.Core that want to migrate to Agents SDK.
  • 95declarative-agents-microsoft365
    Comprehensive development guidelines for Microsoft 365 Copilot declarative agents with schema v1.5, TypeSpec integration, and Microsoft 365 Agents Toolkit workflows Triggers on: **.json, **.ts, **.tsp, **manifest.json, **agent.json, **declarative-agent.json

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.