Skip to main content

Overview

The Microsoft Agent Framework provides multiple hosting options for deploying agents to production environments. Whether you need stateless HTTP endpoints, durable orchestrations, or agent-to-agent communication, the framework offers flexible deployment patterns.

Hosting Options

Azure Functions

Host agents as HTTP-accessible services using Azure Functions with built-in scaling, monitoring, and Azure integration. Best for:
  • Stateless request/response patterns
  • HTTP API endpoints
  • Serverless deployments
  • Azure ecosystem integration
Key Features:
  • Auto-generated HTTP endpoints per agent
  • Built-in health checks
  • Session management
  • Multi-agent hosting
Learn more about Azure Functions hosting →

DurableTask Integration

Leverage Durable Functions and DurableTask for long-running workflows, orchestrations, and stateful agent execution. Best for:
  • Long-running workflows
  • Multi-agent orchestrations
  • Human-in-the-loop patterns
  • Reliable state management
Key Features:
  • Durable orchestrations
  • Checkpoint and resume
  • Parallel agent execution
  • External event handling
Learn more about DurableTask →

A2A Protocol

Connect agents across systems using the Agent-to-Agent (A2A) protocol for standardized inter-agent communication. Best for:
  • Distributed agent systems
  • Cross-framework communication
  • Agent discovery
  • Standardized interfaces
Key Features:
  • Standard protocol compliance
  • Agent discovery via AgentCard
  • Streaming and non-streaming modes
  • Background task handling
Learn more about A2A Protocol →

Deployment Patterns

Single Agent Hosting

Deploy a single agent with dedicated endpoints:

Multi-Agent Hosting

Host multiple specialized agents in a single application:

Orchestrated Workflows

Create complex workflows with multiple agents:

Configuration

Environment Variables

All hosting patterns require Azure OpenAI configuration:

Azure Functions Configuration

For Azure Functions, configure local.settings.json:

Prerequisites

Development Tools

  • Azure Functions Core Tools: Install v4.x
  • Azure CLI: For authentication (az login)
  • Docker: For local emulators (Azurite, DTS)

Azure Services

  • Azure OpenAI Service: Deploy a chat model (gpt-4o-mini or better)
  • Azure Storage: Required for Azure Functions state
  • Durable Task Scheduler (optional): For orchestrations

Local Emulators

Start Azurite for Azure Storage emulation:
Start Durable Task Scheduler emulator:
The DTS dashboard will be available at http://localhost:8082.

Authentication

The framework supports multiple authentication methods:

Azure CLI (Development)

API Key (Testing)

Managed Identity (Production)

Production Considerations: DefaultAzureCredential is convenient for development but may cause latency in production due to credential probing. Use specific credentials like ManagedIdentityCredential for production deployments.

Testing Deployed Agents

Test HTTP endpoints using curl, REST clients, or HTTP files:

Monitoring and Observability

Azure Application Insights

Enable Application Insights for production monitoring:

Logging

Configure logging levels in host.json:

DTS Dashboard

Monitor orchestrations at http://localhost:8082 (local) or your DTS endpoint (Azure).

Next Steps

Azure Functions

Deploy agents as serverless functions

DurableTask

Build long-running workflows

A2A Protocol

Connect distributed agents