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
- Auto-generated HTTP endpoints per agent
- Built-in health checks
- Session management
- Multi-agent 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
- Durable orchestrations
- Checkpoint and resume
- Parallel agent execution
- External event handling
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
- Standard protocol compliance
- Agent discovery via AgentCard
- Streaming and non-streaming modes
- Background task handling
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, configurelocal.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:http://localhost:8082.
Authentication
The framework supports multiple authentication methods:Azure CLI (Development)
API Key (Testing)
Managed Identity (Production)
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 inhost.json:
DTS Dashboard
Monitor orchestrations athttp://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