Skip to content
Development
Agent

features

Learn about advanced features of the durable task extension for Microsoft Agent Framework including orchestrations, tool calls, and human-in-the-loop workflows.

From plugin
dotnet-skills
46650 skills50 agents
Install
$ npx -y skills add managedcode/dotnet-skills --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Learn about advanced features of the durable task extension for Microsoft Agent Framework including orchestrations, tool calls, and human-in-the-loop workflows.

Agent definition

features.md
title: Durable Agent Features
description: Learn about advanced features of the durable task extension for Microsoft Agent Framework including orchestrations, tool calls, and human-in-the-loop workflows.
zone_pivot_groups: programming-languages
author: anthonychu
ms.topic: tutorial
ms.author: antchu
ms.date: 11/05/2025
ms.service: agent-framework

Durable Agent Features

When you build AI agents with Microsoft Agent Framework, the durable task extension for Microsoft Agent Framework adds advanced capabilities to your standard agents including automatic conversation state management, deterministic orchestrations, and human-in-the-loop patterns. The extension also makes it easy to host your agents on serverless compute provided by Azure Functions, delivering dynamic scaling and a cost-efficient per-request billing model.

Deterministic Multi-Agent Orchestrations

The durable task extension supports building deterministic workflows that coordinate multiple agents using [Azure Durable Functions](/azure/azure-functions/durable/durable-functions-overview) orchestrations.

**[Orchestrations](/azure/azure-functions/durable/durable-functions-orchestrations)** are code-based workflows that coordinate multiple operations (like agent calls, external API calls, or timers) in a reliable way. **Deterministic** means the orchestration code executes the same way when replayed after a failure, making workflows reliable and debuggable—when you replay an orchestration's history, you can see exactly what happened at each step.

Orchestrations execute reliably, surviving failures between agent calls, and provide predictable and repeatable processes. This makes them ideal for complex multi-agent scenarios where you need guaranteed execution order and fault tolerance.

Sequential Orchestrations

In the sequential multi-agent pattern, specialized agents execute in a specific order, where each agent's output can influence the next agent's execution. This pattern supports conditional logic and branching based on agent responses.

::: zone pivot="programming-language-csharp"

When using agents in orchestrations, you must use the `context.GetAgent()` API to get a `DurableAIAgent` instance, which is a special subclass of the standard `AIAgent` type that wraps one of your registered agents. The `DurableAIAgent` wrapper ensures that agent calls are properly tracked and checkpointed by the durable orchestration framework.

using Microsoft.Azure.Functions.Worker;
using Microsoft.DurableTask;
using Microsoft.Agents.AI.DurableTask;

[Function(nameof(SpamDetectionOrchestration))]
public static async Task<string> SpamDetectionOrchestration(
    [OrchestrationTrigger] TaskOrchestrationContext context)
{
    Email email = context.GetInput<Email>();

    // Check if the email is spam
    DurableAIAgent spamDetectionAgent = context.GetAgent("SpamDetectionAgent");
    AgentThread spamThread = await spamDetectionAgent.GetNewThreadAsync();

    AgentResponse<DetectionResult> spamDetectionResponse = await spamDetectionAgent.RunAsync<DetectionResult>(
        message: $"Analyze this email for spam: {email.EmailContent}",
        thread: spamThread);
    DetectionResult result = spamDetectionResponse.Result;

    if (result.IsSpam)
    {
        return await context.CallActivityAsync<string>(nameof(HandleSpamEmail), result.Reason);
    }

    // Generate response for legitimate email
    DurableAIAgent emailAssistantAgent = context.GetAgent("EmailAssistantAgent");
    AgentThread emailThread = await emailAssistantAgent.GetNewThreadAsync();

    AgentResponse<EmailResponse> emailAssistantResponse = await emailAssistantAgent.RunAsync<EmailResponse>(
        message: $"Draft a professional response to: {email.EmailContent}",
        thread: emailThread);

    return await context.CallActivityAsync<string>(nameof(SendEmail), emailAssistantResponse.Result.Response);
}

::: zone-end

::: zone pivot="programming-language-python"

When using agents in orchestrations, you must use the `app.get_agent()` method to get a durable agent instance, which is a special wrapper around one of your registered agents. The durable agent wrapper ensures that agent calls are properly tracked and checkpointed by the durable orchestration framework.

import azure.durable_functions as df
from typing import cast
from agent_framework.azure import AgentFunctionApp
from pydantic import BaseModel

class SpamDetectionResult(BaseModel):
    is_spam: bool
    reason: str

class EmailResponse(BaseModel):
    response: str

app = AgentFunctionApp(agents=[spam_detection_agent, email_assistant_agent])

@app.orchestration_trigger(context_name="context")
def spam_detection_orchestration(context: df.DurableOrchestrationContext):
    email = context.get_input()

    # Check if the email is spam
    spam_agent = app.get_agent(context, "SpamDetectionAgent")
    spam_thread = spam_agent.get_new_thread()

    spam_result_raw = yield spam_agent.run(
        messages=f"Analyze this email for spam: {email['content']}",
        thread=spam_thread,
        response_format=SpamDetectionResult
    )
    spam_result = cast(SpamDetectionResult, spam_result_raw.get("structured_response"))

    if spam_result.is_spam:
        result = yield context.call_activity("handle_spam_email", spam_result.reason)
        return result

    # Generate response for legitimate email
    email_agent = app.get_agent(context, "EmailAssistantAgent")
    email_thread = email_agent.get_new_thread()

    email_response_raw = yield email_agent.run(
        messages=f"Draft a professional response to: {email['content']}",
        thread=email_thread,
        response_format=EmailResponse
    )
    email_response = cast(EmailResponse, email_response_raw.get("structured_response"))

    result = yield context.call_activity("send_email", email_response.response)
    return result

::: zone-end

Orchestrations coordinate work across multiple agents, surviving failures betwe

Read more
Ships withdotnet-skills

Stop explaining .NET to your AI. Start building. We've all been there: asking Claude to use Entity Framework, only to get EF6 patterns in a .NET 8 project. Explaining to Copilot that Blazor Server and Blazor WebAssembly aren't the same thing.

Get the whole plugin