Skip to main content
The Microsoft Agent Framework supports multiple AI providers through a unified interface. Each provider offers chat clients that can be used to create agents.

Azure OpenAI

Microsoft’s Azure-hosted OpenAI models with enterprise features.

Installation

Azure OpenAI Responses Client

Recommended for new applications:

Azure OpenAI Chat Client

Standard chat completions:

Azure OpenAI Assistants Client

Persistent assistants with threads:

Authentication Options

OpenAI

Direct access to OpenAI’s models.

Installation

OpenAI Responses Client

OpenAI Chat Client

OpenAI Assistants Client

Anthropic

Claude models from Anthropic.

Installation

Anthropic Client

Streaming Example

Azure AI Foundry

Azure AI Foundry Agent Service (V2) with project-based agents.

Installation

Azure AI Agent Client

With Hosted MCP Tools

AWS Bedrock

AWS-hosted foundation models.

Installation

Bedrock Chat Client

Ollama

Local open-source models.

Installation

Ollama Chat Client

Not all Ollama models support function calling. Models like llama3.2 and qwen2.5 support tools, while others may not.

Provider Comparison

Provider Features

Common Features

All providers support:
  • Non-streaming and streaming responses
  • Function/tool calling (model-dependent)
  • Session management
  • Middleware
  • Chat options (temperature, max_tokens, etc.)

Provider-Specific Features

Azure OpenAI & OpenAI

  • Code Interpreter: Execute Python code
  • File Search: RAG over uploaded files
  • Structured Output: JSON schema-based responses
  • Web Search: Bing search integration (OpenAI only)

Anthropic

  • Extended Thinking: Claude’s reasoning mode
  • Prompt Caching: Reduce costs for repeated prompts

Azure AI Foundry

  • Hosted MCP Tools: Pre-configured MCP integrations
  • Project-Scoped Agents: Agents tied to Azure AI projects
  • Memory Integration: Built-in Azure AI Search memory

Client Options

Common Options

All clients support these options:

Runtime Options

Override options per-run:

Custom Chat Clients

Create your own provider by implementing BaseChatClient:

Best Practices

Store API keys and endpoints in environment variables:
For Azure:
  • Local development: Use AzureCliCredential
  • Production: Use ManagedIdentityCredential or DefaultAzureCredential
Configure timeouts based on your use case:
Check if your model supports function calling before using tools. Not all models or providers support tools.
Azure OpenAI and Azure AI Foundry provide:
  • Enterprise-grade security
  • Data residency
  • SLAs
  • Managed identity authentication

Provider Selection Guide

Choose Azure OpenAI if you need:

  • Enterprise security and compliance
  • Data residency requirements
  • Azure ecosystem integration
  • Managed identity authentication

Choose OpenAI if you need:

  • Latest model releases
  • Web search capabilities
  • Simpler setup for development

Choose Anthropic if you need:

  • Claude’s advanced reasoning
  • Extended context windows
  • Strong safety features

Choose Azure AI Foundry if you need:

  • Managed agent infrastructure
  • Built-in memory and search
  • Project-based organization

Choose Bedrock if you need:

  • AWS ecosystem integration
  • Multiple model providers (Anthropic, Meta, etc.)
  • AWS security and compliance

Choose Ollama if you need:

  • Local, offline operation
  • Open-source models
  • No API costs
  • Full data privacy

Environment Setup

Azure OpenAI

OpenAI

Anthropic

Azure AI Foundry

AWS Bedrock

Ollama

  • Agents - Using providers with agents
  • Tools - Provider-specific tool support
  • Workflows - Multi-provider workflows