Back to Blog
May 26, 2026

Microsoft Agent Framework Meets Durable Task Scheduler on Azure Functions

Share

Microsoft Agent Framework Meets Durable Task Scheduler on Azure Functions

Date: 2026-05-26

Discover how swapping Azure Durable Functions’ default backend for Durable Task Scheduler enhances Microsoft Agent Framework with richer observability and scalable orchestration.

Tags: ["Azure", "Microsoft Agent Framework", "Durable Task Scheduler", "Azure Functions", "Cloud Architecture"]

The evolution of building intelligent agents on Azure Functions just stepped up a notch. If you’re leveraging the Microsoft Agent Framework to build conversational AI assistants or automation agents hosted on Azure Durable Functions, you likely know how crucial the orchestration backend is for reliability and observability. Traditionally, Azure Durable Functions defaults to using Azure Storage as the state backend, but it lacks deep monitoring and scalability features that complex agents often need.

Jaliya Udagedara’s recent exploration brings Durable Task Scheduler (DTS) into the spotlight as a managed orchestration backend that replaces the Azure Storage backend for Durable Functions. This swap is more than just changing a config—it unlocks a dedicated task hub, higher throughput, built-in dashboards with live agent session inspection, and persistent conversational state. For developers working on agents, these improvements translate directly into smoother development, easier debugging, and more scalable, stateful agents.

In this post, we will unpack how integrating DTS with the Microsoft Agent Framework enhances agent orchestration within Azure Functions. You’ll see what changes are required, what benefits DTS adds, and how agent conversations are modeled and visualized through the DTS dashboard—offering a production-grade developer experience.

Architecture Overview

┌────────────────────────────────────────────┐
│Architecture                                │
├────────────────────────────────────────────┤
│• Enterprise data sources                   │
│• Foundry platform                          │
│• AI applications                           │
└────────────────────────────────────────────┘

Key Technical Observations

  • Seamless Agent Code Continuity — Switching from Azure Storage backend to DTS requires no changes to the agent business code or HTTP API surface. Only the hosting and configuration files (.csproj, host.json, local.settings.json) need updates, making migration low-friction.

  • Managed, High-Throughput Task Hub — DTS replaces the default storage provider with an Azure Managed backend, drastically improving orchestration concurrency and throughput. This is especially beneficial for agent workloads with multiple parallel conversations.

  • Persistent Conversation State as Durable Entities — Each agent session maps to a durable entity within DTS, enabling long-lived, resilient stateful conversations that persist transparently through restarts without developer boilerplate.

  • Rich Built-in Agent Session Dashboard — The new Agents tab in the DTS dashboard (in preview) gives developers live insights into token usage, timeline of prompts and responses, tool invocations (e.g., GetCurrentDate, GetWeather), and linear chat history — all critical for real-time debugging of conversational flows.

  • Dockerized Local DTS Emulator — For local development, the DTS backend runs as a Docker container exposing an endpoint (default http://localhost:8080), providing a realistic local runtime that mirrors cloud behavior closely, accelerating development iterations.

  • Durable Functions Orchestrations Enable Extensibility — Modeling conversations as Durable Functions orchestrations lets the Microsoft Agent Framework leverage all Durable Functions features and improvements automatically, extending agent reliability and observability with DTS advancements.

DTS Emulator local dashboard showing Entities and orchestrations
DTS Emulator dashboard showing durable entities and orchestrations (source: Jaliya Udagedara)

How It Works: Under the Hood of DTS-Powered Agents

Step 1: Agent Invocation via HTTP Endpoint

Clients send an HTTP POST request to the Azure Function endpoint, specifying the agent name and providing user input as JSON.

POST http://localhost:7099/api/agents/weekend-planner/run
Content-Type: application/json

{
  "message": "What should I do this weekend in Auckland?"
}

The function triggers an orchestrator function representing the agent.

Step 2: Durable Task Scheduler Manages Orchestration

Instead of storing orchestration state in Azure Storage queues and blobs, the backend delegates to DTS’s managed task hub. Here, the orchestration runs as a durable workflow with high throughput and reduced latency.

Each agent conversation is transparently persisted as a Durable Entity within DTS, combining state and message queueing to preserve the session context between user turns.

Step 3: Agent Logic, Tool Calls, and State Progression

The agent executes its programmed logic, such as querying external services (GetWeather, GetCurrentDate, GetActivities), and accumulates conversation state. DTS manages retries, checkpoints, and state consistency automatically.

Step 4: Observability via DTS Dashboard

Developers open the DTS dashboard to inspect:

  • Entities Tab: Showing each durable entity representing a conversation session with state details.
  • Agents Tab: Listing all active or completed agent sessions with token counts, timelines of prompts/responses, and tool interactions.
  • Agents Detail: A deep view including chat history and the exact sequence of tool calls marked as done.

This eliminates the need to build custom telemetry or logging for complex conversational workflows.

Step 5: Response Delivery

The orchestration returns the output message to the Azure Function HTTP layer, which responds to the client seamlessly.

// Example: Adding DurableTask AzureManaged package in .csproj
// host.json snippet to configure DTS
{
  "version": "2.0",
  "extensions": {
    "durableTask": {
      "hubName": "%TASKHUB_NAME%",
      "storageProvider": {
        "type": "azureManaged",
        "connectionStringName": "DTS_CONNECTION_STRING"
      }
    }
  }
}

Quick Tips & Tricks

  1. Always Use Configuration Parameters for DTS Setup
    Place connection strings and hub names in local.settings.json or Azure Function App settings to promote environment-agnostic deployments.

  2. Run DTS Emulator Locally via Docker
    Use the official DTS Docker image on port 8080 for development parity with production, minimizing surprises after deployment.

  3. Monitor Token Usage via DTS Dashboard
    Keep an eye on token counts per conversation to optimize prompt engineering and avoid exceeding LLM limits.

  4. Utilize Durable Entities for Conversation State
    Trust DTS’s durable entities feature to automatically persist session data; avoid rolling your own state persistence to reduce complexity.

  5. Leverage Agent Tabs in DTS for Debugging
    Use the preview Agents tab to debug live conversations and tool invocations instead of logging everything manually.

  6. Keep Agent Code Backend-Agnostic
    Maintain separation between agent business logic and orchestration backend; rely on Microsoft Agent Framework abstractions for future-proofing.

Conclusion

Switching Microsoft Agent Framework’s hosting on Azure Functions from the default Azure Storage backend to Durable Task Scheduler enriches the orchestration experience significantly. DTS offers better throughput, durable entity-based state persistence, and a powerful dashboard to visualize and debug agent sessions without additional engineering effort. For developers of AI agents and automated workflows, this means faster iteration, stronger reliability, and hands-on control over conversation threads.

The seamless migration process, involving only minor configuration tweaks, empowers teams to enhance their agent hosting backend without rewriting core logic. As DTS matures and its dashboard capabilities improve, expect deeper inspection and management tooling that can further accelerate intelligent agent development on Azure.

References

  1. Microsoft Agent Framework: Agents on Azure Functions with Durable Task Scheduler by Jaliya Udagedara — Original blog post analyzed in this article.

  2. GitHub Source Code: Microsoft Agent Framework DTS Sample — Complete sample code for agents using DTS.

  3. Durable Task Scheduler overview - Microsoft Docs — Official documentation on Durable Task Scheduler.

  4. Develop with Durable Task Scheduler - Microsoft Docs — Detailed development guide for DTS.

  5. Microsoft Agent Framework Documentation — Official documentation for Microsoft Agent Framework.

DTS dashboard Agents Detail view with timeline and tool calls
DTS dashboard showing conversation timeline and tool call details (source: Jaliya Udagedara)