microsoft-agent-framework
Microsoft Agent Framework
Trigger On
- building or reviewing
.NETcode that usesMicrosoft.Agents.*,Microsoft.Extensions.AI,AIAgent,AgentThread,AgentSession, or Agent Framework hosting packages - choosing between
ChatClientAgent, Responses agents, hosted agents, custom agents, Anthropic agents, workflows, or durable agents - authoring preview-era
Microsoft.Agents.AI.Workflows.Declarative*packages or wrapping a workflow withworkflow.AsAIAgent() - adding tools, MCP, A2A, OpenAI-compatible hosting, AG-UI, DevUI, background responses, or OpenTelemetry
- migrating from Semantic Kernel agent APIs or aligning AutoGen-style multi-agent patterns to Agent Framework
- using Anthropic Claude models (haiku, sonnet, opus) via
AnthropicClientor through Azure Foundry withAnthropicFoundryClient
Workflow
- Decide whether the problem should stay deterministic. If plain code or a typed workflow without LLM autonomy is enough, do that instead of adding an agent.
- Choose the execution shape first: single
AIAgent, explicit programmaticWorkflow, workflow-as-agent wrapper, declarative workflow when YAML portability is explicitly required, Azure Functions durable agent, ASP.NET Core hosted agent, AG-UI remote UI, or DevUI local debugging. - Choose the agent type and provider intentionally. Prefer the simplest agent that satisfies the threading, tooling, and hosting requirements.
- Keep agents stateless and keep conversation or long-lived state in provider-owned session objects. Most persistence guidance still centers on
AgentThread, while newer middleware and background-response examples may surfaceAgentSession. Treat both as opaque provider-specific state. - Add only the tools and middleware that the scenario needs. Narrow the tool surface, require approval for side effects, and treat MCP, A2A, and third-party services as trust boundaries.
- For workflows, model executors, edges, request-response ports, checkpoints, shared state, and human-in-the-loop explicitly rather than hiding control flow in prompts.
More from managedcode/dotnet-skills
dotnet
Primary router skill for broad .NET work. Classify the repo by app model and cross-cutting concern first, then switch to the narrowest matching .NET skill instead of staying at a generic layer.
18dotnet-aspnet-core
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.
13dotnet-entity-framework-core
Design, tune, or review EF Core data access with proper modeling, migrations, query translation, performance, and lifetime management for modern .NET applications.
12dotnet-code-review
Review .NET changes for bugs, regressions, architectural drift, missing tests, incorrect async or disposal behavior, and platform-specific pitfalls before you approve or merge them.
11dotnet-architecture
Design or review .NET solution architecture across modular monoliths, clean architecture, vertical slices, microservices, DDD, CQRS, and cloud-native boundaries without over-engineering.
11dotnet-signalr
Implement or review SignalR hubs, streaming, reconnection, transport, and real-time delivery patterns in ASP.NET Core applications.
10