Author: Business Analysis & Technical Decision Framework
Date: January 2025
Version: 1.0
Purpose: Executive and technical decision-making guide for choosing among Microsoft's agent SDK ecosystem
Microsoft offers four complementary SDKs for building AI agents, each targeting different business needs, deployment channels, and developer skill levels. This document provides a strategic framework for understanding when to use each SDK, their business value propositions, and how they work together.
Microsoft's Recommended Approach: Start with Azure AI Foundry Agent Service for production-grade infrastructure and enterprise governance. For client-side agent logic, use Microsoft Agent Framework (the unified evolution of Semantic Kernel and AutoGen). Deploy to multiple channels with Microsoft 365 Agents SDK.
Important: Microsoft Agent Framework represents the consolidation and evolution of Semantic Kernel and AutoGen—it's not a separate SDK to combine with them, but rather the unified future of Microsoft's agent development.
| If You Need... | Recommended SDK | Primary Value | Languages |
|---|---|---|---|
| Production agent infrastructure (managed runtime, enterprise features) | Azure AI Foundry Agent Service + client SDK | Hosted orchestration + built-in governance | Python, C#, JavaScript, Java |
| Client-side agent development (fast development, orchestration patterns) | Microsoft Agent Framework (Preview) | Unified evolution of SK + AutoGen; built-in workflows + AI-agnostic | C#, Python |
| Multi-channel deployment (Teams, Copilot, Web, Custom Apps) | Microsoft 365 Agents SDK | Channel flexibility + AI-agnostic deployment | C#, JavaScript, Python |
| Azure-native production (compliance, Azure tools, observability) | Azure AI Foundry SDK | Official Agent Service client + Azure integration | Python, C#, JavaScript, Java |
Note: Semantic Kernel and AutoGen are being consolidated into Microsoft Agent Framework—use Agent Framework for new development.
- Azure AI Foundry Agent Service: The Foundation
- The Four SDKs: Overview
- Microsoft Agent Framework (Preview)
- Azure AI Foundry SDK
- Semantic Kernel SDK
- Microsoft 365 Agents SDK
- When They Complement vs. Segregate
- Business Value Propositions
- Decision Framework
- Integration Patterns
- Cost Considerations
Status: Generally Available (GA - May 2025)
What It Is: A fully managed, server-side runtime service that hosts and orchestrates agents in production
Where It Lives: Azure cloud infrastructure (part of Azure AI Foundry platform)
Azure AI Foundry Agent Service ≠ Azure AI Foundry SDK
- Agent Service = The hosted platform (runtime, infrastructure, orchestration)
- Azure AI Foundry SDK = The client libraries (Python, C#, JavaScript, Java) to interact with Agent Service
Think of it like this:
- Agent Service = Azure Kubernetes Service (the platform)
- Foundry SDK = kubectl or Azure CLI (the tools to use the platform)
Azure AI Foundry Agent Service is the central orchestration runtime that powers production agents. It provides:
- Thread management: Automatic conversation history storage (up to 100,000 messages per thread)
- Run lifecycle: Manages queued → in_progress → completed/failed states
- Tool calling: Server-side retry logic, structured logging, automatic error handling
- Message persistence: Stores user ↔ agent and agent ↔ agent messages in Cosmos DB or your own storage
Business Impact: You don't write orchestration code—the service handles it. Your code just creates agents, sends messages, and retrieves results.
| Capability | What It Means | Why It Matters |
|---|---|---|
| Visibility into conversations | Full access to structured threads, messages, and tool calls | Build UIs showing chat history, debug agent behavior, export training data |
| Multi-agent coordination | Built-in agent-to-agent messaging via "Connected Agents" with LLM-driven delegation | Decompose work into specialized agents—main agent uses natural language to route tasks without hardcoded orchestration logic |
| Tool orchestration | 12 built-in Microsoft tools (Azure AI Search, Azure Functions, Browser Automation, Code Interpreter, Deep Research, File Search, Function calling, Bing Search, Bing Custom Search, MCP, Fabric, OpenAPI) + 6 third-party partner tools (LEGALFLY, LexisNexis, MiHCM, Morningstar, Trademo, Tripadvisor) | No need to implement web scraping, file processing, or API calling logic |
| Trust and safety | Integrated content filters (Microsoft Responsible AI) | Block jailbreaks, hate speech, XPIA attacks—policy-governed by default |
| Enterprise integration | BYO storage (Cosmos DB), search indexes, VNets | Meet compliance: data residency, network isolation, audit trails |
| Observability | Application Insights integration, thread-level tracing | Monitor performance, debug failures, track token usage for cost |
| Identity and policy | Microsoft Entra ID, RBAC, conditional access | Control who can create/run agents, enforce MFA, audit access |
The Agent Service implements a 6-stage production pipeline:
1. MODELS 2. CUSTOMIZATION 3. TOOLS
(GPT-4o, Llama) (Fine-tuning, (Bing, Azure AI Search,
distillation, Logic Apps, Functions,
prompts) OpenAPI tools)
↓ ↓ ↓
4. ORCHESTRATION 5. OBSERVABILITY 6. TRUST
(Thread mgmt, (App Insights, (Content filters,
tool retry, tracing, Entra ID, RBAC,
state) evaluations) encryption, VNets)
↓ ↓ ↓
PRODUCTION-READY AGENT
Business Impact: The service provides a repeatable, governed process for moving agents from prototype to production.
Agent Service's Connected Agents feature enables multi-agent systems through intelligent, natural language-based delegation:
How It Works:
- A main agent acts as coordinator and delegates tasks to specialized connected agents
- Routing is LLM-driven: the main agent uses its model to decide which connected agent to invoke based on task requirements
- No code-based orchestration patterns: delegation happens through natural language instructions, not deterministic workflows
Example: A contract review assistant (main agent) that routes to specialized agents:
- "Summarize clauses" → delegates to Clause Summarizer agent
- "Check compliance" → delegates to Compliance Validator agent
- Routing determined by LLM interpretation, not hardcoded logic
Key Difference from SDK Orchestration Patterns:
- Connected Agents = Nondeterministic, LLM interprets which agent to call
- Agent Framework/Semantic Kernel patterns = Deterministic, code defines exact flow (Sequential, Concurrent, Handoff, Group Chat, Magentic)
When to Use Connected Agents:
- Need specialized agents without writing routing logic
- Acceptable for LLM to decide delegation (nondeterministic)
- Want simplified multi-agent setup via portal or SDK
When to Use SDK Orchestration Patterns Instead:
- Need deterministic, reproducible workflows
- Require specific sequencing (e.g., Writer → Editor → Publisher must happen in order)
- Complex patterns like Group Chat debates or Magentic task planning
- Full control over agent coordination logic
| Aspect | Azure AI Foundry Agent Service | Agent Framework / Semantic Kernel / M365 SDKs |
|---|---|---|
| Type | Server-side hosted runtime | Client-side libraries |
| Runs Where | Azure cloud infrastructure | Your application code |
| Conversation Storage | Managed (Cosmos DB or BYO) | You implement it |
| Tool Retry Logic | Built-in server-side | You implement it |
| Content Filtering | Automatic (Responsible AI) | You implement it |
| Thread Management | Automatic (up to 100K messages) | You implement it |
| Deployment Model | Serverless (pay per run) | Your compute (VMs, App Service, Kubernetes) |
| Multi-Agent | Connected Agents (LLM-driven delegation) | You orchestrate (Semantic Kernel, Agent Framework) |
✅ Use Agent Service when:
-
You need production-grade infrastructure without managing it
- Don't want to build thread storage, retry logic, or conversation history
- Need automatic scaling (handles 1 user or 1 million users)
-
Enterprise governance is required
- Content filtering must be policy-governed
- Data must stay in specific Azure regions (compliance)
- Need audit trails for agent actions
-
Multi-agent coordination is needed
- Want specialized agents (research, writing, review) to collaborate
- Don't want to write orchestrator code
-
Azure tooling is your ecosystem
- Already use Azure AI Search, Logic Apps, Azure Functions
- Want hosted code interpreter (Python sandbox)
What Are Connected Agents?
Connected Agents is a feature of Azure AI Foundry Agent Service that enables LLM-driven multi-agent coordination without writing custom orchestration code. Instead of programmatically defining how agents interact, the main agent uses natural language to route tasks to specialized agents.
Two Orchestration Paradigms:
| Approach | How It Works | When to Use |
|---|---|---|
| Connected Agents (LLM-driven) | Main agent decides routing via natural language; nondeterministic | Complex, context-dependent decisions; exploratory workflows |
| SDK Patterns (Code-driven) | Developer defines routing logic in code; deterministic | Predictable workflows; regulatory compliance requiring auditability |
Key Characteristics:
- No custom orchestration required: Main agent uses natural language to route tasks
- Nondeterministic: Agent Service makes routing decisions based on context
- Built into Agent Service: Available automatically when using Azure AI Foundry Agent Service
- Agent-to-agent messaging: Specialized agents collaborate seamlessly
Example Use Cases:
- Research workflows where routing depends on query complexity
- Customer service with dynamic escalation based on conversation tone
- Content creation with context-dependent specialist involvement
Complementary Approach: For deterministic, code-defined patterns (Sequential, Concurrent, Handoff, GroupChat, Magentic), use Microsoft Agent Framework or Semantic Kernel SDKs.
❌ Don't use Agent Service when:
-
You need non-Azure AI providers
- Agent Service requires Azure OpenAI or Azure Model Catalog models
- Can't use OpenAI.com directly, GitHub Models, or Ollama
-
You want local/on-prem deployment
- Agent Service is cloud-only (no on-prem or air-gapped deployments)
-
You're building non-Azure deployments
- If deploying to AWS, GCP, or Kubernetes outside Azure, use Microsoft Agent Framework or Semantic Kernel
Azure AI Foundry SDK is the primary way to use Agent Service:
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential
# SDK connects TO Agent Service
project_client = AIProjectClient(
endpoint="https://<your-foundry>.services.ai.azure.com/api/projects/<project>",
credential=DefaultAzureCredential()
)
# Create agent (runs ON Agent Service)
agent = project_client.agents.create_agent(
model="gpt-4o",
name="my-agent",
instructions="You are helpful"
)
# Create thread (managed BY Agent Service)
thread = project_client.agents.threads.create()
# Send message (stored IN Agent Service)
message = project_client.agents.messages.create(
thread_id=thread.id,
role="user",
content="Hello!"
)
# Run agent (orchestrated BY Agent Service)
run = project_client.agents.runs.create_and_process(
thread_id=thread.id,
agent_id=agent.id
)Microsoft Agent Framework can consume Agent Service agents:
using Azure.AI.Agents.Persistent;
using Microsoft.Agents.AI;
// Connect to Agent Service
var persistentAgentsClient = new PersistentAgentsClient(
"https://<your-foundry>.services.ai.azure.com/api/projects/<project>",
new AzureCliCredential()
);
// Retrieve agent created in Agent Service
AIAgent agent = await persistentAgentsClient.GetAIAgentAsync("<agent-id>");
// Use Agent Framework workflows with Agent Service-hosted agent
// (Agent still runs ON Agent Service, but Framework provides workflow patterns)- Agent Service is the managed platform that provides infrastructure, orchestration, and enterprise capabilities
- SDKs are clients that let you create/manage agents running on Agent Service (or run agents locally)
- Agent Service = Azure-hosted, production-grade runtime with built-in governance
- Agent Framework/Semantic Kernel/M365 SDK = client-side libraries you embed in your applications
- They complement each other: Use Agent Service for production + SDKs for local dev, complex orchestration, or multi-channel deployment
┌─────────────────────────────────────────────────────────────────┐
│ CHANNEL DEPLOYMENT LAYER │
│ Microsoft 365 Agents SDK │
│ (Teams, Copilot, Web, Custom Apps) │
└─────────────────┬───────────────────────────────────────────────┘
│ Uses for agent logic ▼
┌─────────┴─────────┬──────────────┬─────────────┐
│ │ │ │
┌───────▼────────┐ ┌────────▼───────┐ ┌───▼──────┐ ┌───▼─────────┐
│ Microsoft │ │ Azure AI │ │ Semantic │ │ Custom │
│ Agent │ │ Foundry SDK │ │ Kernel │ │ Orchestrator│
│ Framework │ │ │ │ (Legacy) │ │ │
│ (Unified) │ │ │ │ │ │ │
└────────────────┘ └────────────────┘ └──────────┘ └─────────────┘
AGENT LOGIC/ORCHESTRATION LAYER
↑
Consolidates
┌────┴─────┐
│ SK + AG │ (Semantic Kernel + AutoGen merge into Agent Framework)
└──────────┘
┌─────────────────────────────────────────────────────────────────┐
│ AI SERVICES & MODELS │
│ Azure OpenAI, OpenAI, GitHub Models, Ollama, Foundry Local │
└─────────────────────────────────────────────────────────────────┘
These SDKs represent layered architecture + framework evolution:
- Microsoft 365 Agents SDK = Channel deployment (where your agent runs)
- Microsoft Agent Framework = Unified agent logic (consolidates Semantic Kernel + AutoGen)
- Azure AI Foundry SDK = Azure-hosted services and tools
- Semantic Kernel = Legacy/transitional (use Agent Framework for new projects)
- AI Services = Intelligence layer (what models power your agent)
All SDKs support multiple programming languages, enabling teams to use their existing skills:
| SDK | C# | Python | JavaScript | Java | Notes |
|---|---|---|---|---|---|
| Azure AI Foundry Agent Service | ✅ | ✅ | ✅ | ✅ | Client SDKs in all major languages |
| Azure AI Foundry SDK | ✅ | ✅ | ✅ | ✅ | Official client library for Agent Service |
| Microsoft Agent Framework | ✅ | ✅ | ❌ | ❌ | C# (NuGet) and Python (pip) supported |
| Semantic Kernel SDK | ✅ | ✅ | ❌ | ✅ | C#, Python, and Java supported |
| Microsoft 365 Agents SDK | ✅ | ✅ | ✅ | ❌ | C#, JavaScript, and Python supported |
Throughout this document:
- Code examples are provided in both C# and Python where both are supported
- .NET-only features (Microsoft Agent Framework) show C# examples only
- Language-specific patterns are called out explicitly
Status: Preview (available on NuGet and PyPI)
Target Audience: C# and Python developers building agents quickly
Core Value: Simplifies agent creation with minimal boilerplate
Microsoft Agent Framework is a standalone SDK (C# packages: Microsoft.Agents.AI.OpenAI, Python package: agent-framework) that provides a simplified developer experience for building AI agents. It's designed for developers who want to create agents quickly without deep AI expertise.
The Developer Pain Points It Solves:
According to industry research and Microsoft's own analysis, developers face significant friction when building AI agents:
- Tool Fragmentation: 50% of developers lose more than 10 hours per week due to inefficiencies like fragmented tools and incompatible frameworks
- Prototype-to-Production Gap: Local development patterns rarely map cleanly to cloud deployments—agents that work locally often fail in production
- Missing Enterprise Readiness: Most open-source agent frameworks lack critical production features:
- Observability and tracing for debugging
- Compliance hooks for governance
- Security controls (content filtering, RBAC)
- Durability for long-running processes
The Solution:
Microsoft Agent Framework addresses these problems by:
- Unifying Innovation + Stability: Combines Semantic Kernel's enterprise-ready foundations (thread-based state management, telemetry, compliance) with AutoGen's innovative multi-agent orchestration
- Eliminating Trade-offs: No longer choose between experimentation (AutoGen) and production readiness (Semantic Kernel)—get both
- Accelerating Development: Developers can build agents in minutes, not days, with minimal boilerplate
Key Characteristics:
- Standalone SDK: The unified evolution of Semantic Kernel and AutoGen
- Built on Microsoft.Extensions.AI: Uses standardized .NET AI abstractions for provider flexibility (C#)
- Python support: Available via
pip install agent-frameworkfor Python developers - Consolidation of Best Practices: Merges the best orchestration patterns from Semantic Kernel with AutoGen's multi-agent capabilities
- Agent Service Integration: Can consume agents hosted on Azure AI Foundry Agent Service via
PersistentAgentsClient
AgentThread is the state management mechanism for multi-turn conversations. Agents in Agent Framework are stateless by default—threads provide persistent context across multiple interactions.
Key Characteristics:
- Create once, reuse across multiple calls to maintain conversation history
- Supports external storage backends (Redis, Cosmos DB, file system) for persistence
- Enables context-aware responses where agents "remember" previous interactions
C# Example:
// Create a thread to maintain conversation state
var thread = agent.GetNewThread();
// First interaction
var result1 = await agent.RunAsync("What's 2+2?", thread);
Console.WriteLine(result1.Text); // "4"
// Second interaction - agent remembers context
var result2 = await agent.RunAsync("What about that number times 10?", thread);
Console.WriteLine(result2.Text); // "40" (understands "that number" refers to 4)Python Example:
# Create a thread to maintain conversation state
thread = agent.get_new_thread()
# First interaction
result1 = await agent.run("What's 2+2?", thread=thread)
print(result1.text) # "4"
# Second interaction - agent remembers context
result2 = await agent.run("What about that number times 10?", thread=thread)
print(result2.text) # "40" (understands "that number" refers to 4)Without Threads (Stateless):
# Each call is independent - no shared context
result1 = await agent.run("What's 2+2?")
print(result1.text) # "4"
result2 = await agent.run("What about that number times 10?")
print(result2.text) # Ambiguous - agent doesn't know what "that number" meansMiddleware allows intercepting agent actions to implement cross-cutting concerns like security, observability, and performance optimization.
Common Use Cases:
- Security: Input validation, content filtering, authentication
- Observability: Logging, metrics, distributed tracing
- Performance: Caching, rate limiting, request throttling
- Error Handling: Graceful degradation, retry logic
C# Example:
using Microsoft.Agents.AI;
// Function-based middleware for logging
async Task LoggingMiddleware(AgentRunContext context, Func<AgentRunContext, Task> next)
{
Console.WriteLine($"Agent {context.Agent.Name} starting");
await next(context);
Console.WriteLine($"Agent {context.Agent.Name} completed");
}
// Function-based middleware for security
async Task SecurityMiddleware(FunctionInvocationContext context, Func<FunctionInvocationContext, Task> next)
{
if (context.Arguments.ToString().Contains("password"))
{
Console.WriteLine("Blocking function call with sensitive data");
return; // Don't call next()
}
await next(context);
}
// Create agent with middleware
var agent = new ChatAgent(
name: "SecureAgent",
chatClient: client,
middleware: new[] { LoggingMiddleware, SecurityMiddleware }
);Python Example:
from agent_framework import ChatAgent, AgentRunContext, FunctionInvocationContext
from typing import Callable, Awaitable
# Function-based middleware for logging
async def logging_middleware(
context: AgentRunContext,
next: Callable[[AgentRunContext], Awaitable[None]]
) -> None:
print(f"Agent {context.agent.name} starting")
await next(context)
print(f"Agent {context.agent.name} completed")
# Function-based middleware for security
async def security_middleware(
context: FunctionInvocationContext,
next: Callable[[FunctionInvocationContext], Awaitable[None]]
) -> None:
if "password" in str(context.arguments):
print("Blocking function call with sensitive data")
return # Don't call next()
await next(context)
# Create agent with middleware
agent = ChatAgent(
name="secure_agent",
chat_client=client,
middleware=[logging_middleware, security_middleware]
)| Feature | Description | Business Impact |
|---|---|---|
| Simple by Design | Create agents in minutes with minimal code | Faster prototyping → shorter time-to-market |
| Built-in Workflows | Sequential, Concurrent, Handoff, Magentic patterns (code-based orchestration) | No custom orchestration code needed |
| Tool Integration | Easy function calling, MCP servers, hosted tools | Rapid integration with existing systems |
| Production Hosting | Native ASP.NET Core integration, DI, middleware | Use existing .NET deployment knowledge |
| OpenTelemetry | Out-of-the-box observability with Aspire/Azure Monitor | Production monitoring without custom instrumentation |
Workflows in Agent Framework use a graph-based architecture where executors (nodes) are connected via typed edges representing data flow.
Key Concepts:
| Concept | Description | Example |
|---|---|---|
| Executors | Nodes in workflow graph (agents, functions, or sub-workflows) | ResearchAgent, DataTransformFunction, ApprovalSubWorkflow |
| Graph-based | Data flows along typed edges between executors | ResearchAgent.output → SummaryAgent.input |
| Checkpointing | Pause/resume workflows, recover from failures | Save after each step, resume from last checkpoint |
| Request/Response Pattern | Human-in-the-loop approval gates | Workflow pauses, waits for approval, continues execution |
Workflow Patterns:
| Pattern | Description | Use Case |
|---|---|---|
| Sequential | Execute executors in order, pass output to next | Document generation: draft → review → publish |
| Concurrent | Execute multiple executors in parallel, merge results | Analysis: run 5 different models, aggregate predictions |
| Handoff | Dynamic routing based on context/conditions | Support escalation: basic agent → specialist agent |
| Magentic | Adaptive multi-agent with iterative refinement | Research assistant: plan → search → synthesize → verify |
Example: Checkpointing for Resilience
// Create workflow with checkpointing enabled
var workflow = AgentWorkflowBuilder
.BuildSequential(dataFetcher, transformer, validator)
.WithCheckpointing(checkpointStore); // Save state after each executor
// Run workflow - recovers from last checkpoint on failure
var result = await workflow.RunAsync("Process customer data");
// If transformer fails, workflow resumes from transformer (skips dataFetcher)Example: Human-in-the-Loop (Request/Response)
from agent_framework import AgentWorkflowBuilder, RequestExecutor
# Create workflow with approval gate
workflow = (
AgentWorkflowBuilder()
.add_executor(expense_analyzer)
.add_executor(RequestExecutor(prompt="Approve expense?")) # Pauses here
.add_executor(expense_processor)
.build()
)
# Run workflow - pauses at RequestExecutor
result = await workflow.run_async("Process $5000 expense")
# User sees: "Approve expense?" → clicks "Yes"
# Workflow resumes at expense_processor✅ Use Microsoft Agent Framework when:
- Building a .NET console app, API, or service with agent capabilities
- Need quick prototyping with simple agents (chatbots, assistants)
- Team has strong .NET skills and wants familiar patterns
- Want minimal dependencies and straightforward deployment
Example Scenarios:
- Internal chatbot for employee HR queries
- Data analysis agent running in a background service
- Code generation assistant integrated into Visual Studio extension
🔗 Combine with Microsoft 365 Agents SDK when:
- Agent needs to deploy to Teams, Copilot, or multiple channels
- Example: HR chatbot needs to run in Teams AND a web portal
🔗 Combine with Azure AI Foundry when:
- Need Azure AI Search, hosted code interpreter, or Azure-managed tools
- Example: Agent requires document search via Azure AI Search index
Note: Microsoft Agent Framework includes orchestration patterns from Semantic Kernel and AutoGen—there's no need to "combine" with these as Agent Framework represents their evolution.
using Microsoft.Extensions.AI;
using Microsoft.Agents.AI;
using OpenAI;
// 1. Create chat client (model-agnostic via Microsoft.Extensions.AI)
IChatClient chatClient = new ChatClient("gpt-4o-mini", apiKey, options)
.AsIChatClient();
// 2. Create agent with instructions
AIAgent writer = new ChatClientAgent(
chatClient,
new ChatClientAgentOptions
{
Name = "Writer",
Instructions = "Write engaging, creative stories."
});
// 3. Run agent
AgentRunResponse response = await writer.RunAsync("Write a short story about AI.");
Console.WriteLine(response.Text);// Create specialized agents
AIAgent editor = new ChatClientAgent(chatClient, new ChatClientAgentOptions
{
Name = "Editor",
Instructions = "Make stories more engaging, fix grammar, enhance plot."
});
// Build workflow connecting writer → editor
Workflow workflow = AgentWorkflowBuilder.BuildSequential(writer, editor);
AIAgent workflowAgent = await workflow.AsAgentAsync();
// Run workflow (writer creates, editor refines)
AgentRunResponse result = await workflowAgent.RunAsync("Write a short story about AI.");- Preview status: API surface may change before GA
- No JavaScript/Java support: Use Semantic Kernel for Java or M365 Agents SDK for JavaScript
- No built-in channel deployment: Requires Microsoft 365 Agents SDK for Teams/Copilot
Maturity: Generally Available
Target Audience: Enterprise developers building production-grade agents in Azure
Core Value: Unified Azure platform with enterprise-grade governance and observability
Azure AI Foundry SDK provides agent development capabilities under a unified Azure AI SDK. It's not a separate product—it's the "Azure Agents" feature within the broader Azure AI Foundry platform.
The SDK includes 4 API layers offering different levels of capability:
- Multi-agent API - Complex multi-agent coordination
- Assistants API - OpenAI Assistants-compatible agents
- Responses API - Streaming agent responses
- Completion API - Basic chat completion
| Capability | Description | Business Impact |
|---|---|---|
| 1. Conversation Visibility | Structured threads showing user↔agent and agent↔agent messages | Debugging, UIs, training data collection |
| 2. Multi-Agent Coordination | Built-in agent-to-agent messaging (A2A protocol) | No manual orchestration for multi-agent systems |
| 3. Tool Orchestration | Server-side tool execution, retry logic, structured logging, 1,400+ Logic Apps connectors | Reduced client complexity, massive integration surface |
| 4. Trust & Safety | Integrated Azure AI Content Safety filters (XPIA protection) | Compliance with safety standards, mitigate prompt injection |
| 5. Enterprise Integration | Bring your own storage (Cosmos DB with BCDR), Azure AI Search, VNet support | Meet data residency, business continuity, networking requirements |
| 6. Observability | Full thread/tool/message tracing + Application Insights | Production troubleshooting without custom telemetry |
| 7. Identity & Policy | Microsoft Entra integration, RBAC, audit logs, conditional access | Enterprise security controls |
A2A Protocol is Microsoft's standardized agent-to-agent communication protocol enabling cross-framework collaboration. Agents from different ecosystems (Microsoft Agent Framework, AutoGen, LangChain, custom frameworks) can communicate seamlessly.
Key Benefits:
| Benefit | Description | Use Case |
|---|---|---|
| Cross-Framework Interoperability | Agents built with different SDKs can collaborate | Python AutoGen agent calls C# Agent Framework agent |
| Standardized Messages | Consistent message format (request/response, streaming) | Multi-vendor agent teams communicate reliably |
| Discovery & Routing | Agents discover capabilities and route messages automatically | Dynamic agent selection based on task requirements |
| Transport Agnostic | Works over HTTP, gRPC, message queues | Choose transport based on performance needs |
Example: Agent Framework → AutoGen Communication
from agent_framework import ChatAgent, A2AClient
from autogen import ConversableAgent
# Agent Framework agent
af_agent = ChatAgent(name="DataAnalyst", instructions="Analyze datasets")
# AutoGen agent
ag_agent = ConversableAgent(name="Visualizer", llm_config={...})
# Connect via A2A protocol
a2a_client = A2AClient()
a2a_client.register_agent(af_agent, endpoint="http://localhost:5000/agent")
a2a_client.register_agent(ag_agent, endpoint="http://localhost:5001/agent")
# Agents communicate across frameworks
result = await a2a_client.send_message(
from_agent="DataAnalyst",
to_agent="Visualizer",
message="Create chart from analysis results",
context={"data": analysis_results}
)Azure AI Foundry Agent Service supports multiple grounding sources for Retrieval-Augmented Generation (RAG):
| Grounding Source | Description | Use Cases |
|---|---|---|
| Bing Search | Real-time web search results | Current events, latest information, external knowledge |
| SharePoint | Internal organizational documents | Corporate policies, internal wikis, team documentation |
| Microsoft Fabric | Structured data insights from data lakes | Analytics, business intelligence queries, data exploration |
| Azure AI Search | Custom vector/keyword search over your data | Product catalogs, support documentation, legal archives |
Example: RAG with Azure AI Search
from azure.ai.projects import AIProjectClient
from azure.ai.agents.models import AzureAISearchTool
# Create agent with grounding over Azure AI Search index
project = AIProjectClient(endpoint="...", credential=DefaultAzureCredential())
agent = project.agents.create_agent(
model="gpt-4",
name="KnowledgeAgent",
instructions="Answer questions using the product catalog.",
tools=[AzureAISearchTool(
search_service_endpoint="https://mysearch.search.windows.net",
index_name="product-catalog"
)]
)Azure AI Foundry includes built-in responsible AI safeguards:
| Capability | Description | Protection |
|---|---|---|
| Task Adherence | Keeps agents aligned with their assigned tasks | Prevents scope creep, off-topic responses |
| Prompt Shields with Spotlighting | Protects against cross-domain prompt injection attacks (XPIA) | Blocks malicious instructions embedded in user content |
| PII Detection | Identifies personally identifiable information in conversations | Data loss prevention, compliance monitoring |
Example: Enabling Responsible AI
from azure.ai.projects import AIProjectClient
from azure.ai.agents.models import ResponsibleAIConfig
project = AIProjectClient(endpoint="...", credential=DefaultAzureCredential())
agent = project.agents.create_agent(
model="gpt-4",
name="SafeAgent",
instructions="You are a customer support agent.",
responsible_ai_config=ResponsibleAIConfig(
task_adherence=True,
prompt_shields=True,
pii_detection=True
)
)Cosmos DB State Persistence:
- Customer-Provisioned: Bring your own Cosmos DB account for agent state storage
- Regional Failover: Automatic failover across Azure regions
- State Preservation: Conversation threads survive service disruptions
- Compliance: Data residency control for regulated industries
✅ Use Azure AI Foundry SDK when:
- Building production-grade agents that require enterprise governance
- Need Azure-native tools (Azure AI Search, hosted code interpreter, Logic Apps, Bing Search)
- Require compliance features (content safety, audit logs, RBAC, VNet isolation)
- Want unified observability with Application Insights and Azure Monitor
- Team already works within Azure ecosystem (Azure Functions, App Service, AKS)
Example Scenarios:
- Customer support agent with RAG over SharePoint via Azure AI Search
- Financial services agent requiring audit logs and data residency in specific region
- Healthcare agent needing HIPAA compliance with VNet-isolated deployment
🔗 Combine with Microsoft Agent Framework when:
- Want to use Agent Framework's simplified .NET API while leveraging Foundry's hosted tools
- Example: .NET agent using Agent Framework's workflows + Foundry's hosted code interpreter
🔗 Combine with Microsoft 365 Agents SDK when:
- Agent needs to deploy to Teams or Copilot while using Azure AI Search for RAG
- Example: Legal assistant in Teams using Azure-hosted document search
Note: For custom orchestration patterns, use Microsoft Agent Framework which consolidates Semantic Kernel and AutoGen capabilities.
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential
from azure.ai.agents.models import FileSearchTool
# 1. Create project client
project = AIProjectClient(
endpoint="https://your-foundry.ai.azure.com/api/projects/your-project",
credential=DefaultAzureCredential()
)
# 2. Upload file and create vector store (Azure-managed)
file = project.agents.files.upload(file_path="./product_info.md", purpose="agents")
vector_store = project.agents.vector_stores.create_and_poll(
file_ids=[file.id],
name="my_vectorstore"
)
# 3. Create agent with file search tool
file_search = FileSearchTool(vector_store_ids=[vector_store.id])
agent = project.agents.create_agent(
model="gpt-4o",
name="my-assistant",
instructions="You are a helpful assistant that searches uploaded files.",
tools=file_search.definitions,
tool_resources=file_search.resources
)
# 4. Create thread and run agent
thread = project.agents.threads.create()
project.agents.messages.create(
thread_id=thread.id,
role="user",
content="What products do you know about?"
)
run = project.agents.runs.create_and_process(thread_id=thread.id, agent_id=agent.id)
# 5. Get response messages
messages = project.agents.messages.list(thread_id=thread.id)
for message in messages:
if message.run_id == run.id and message.text_messages:
print(f"{message.role}: {message.text_messages[-1].text.value}")C# Example:
using agent_framework.azure;
using Azure.Identity;
// Use Agent Framework's simplified API with Azure AI Foundry backend
async with (
new AzureCliCredential() as credential,
await AzureAIAgentClient(async_credential=credential).CreateAgentAsync(
name="HelperAgent",
instructions="You are a helpful assistant.",
tools=new HostedCodeInterpreterTool() // Azure-hosted tool
) as agent
)
{
var result = await agent.RunAsync("Calculate factorial of 100.");
Console.WriteLine(result.Text);
}Python Example:
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
from agent_framework import HostedCodeInterpreterTool
# Use Agent Framework's simplified API with Azure AI Foundry backend
async with (
AzureCliCredential() as credential,
AzureAIAgentClient(async_credential=credential).create_agent(
name="HelperAgent",
instructions="You are a helpful assistant.",
tools=HostedCodeInterpreterTool() # Azure-hosted tool
) as agent
):
result = await agent.run("Calculate factorial of 100.")
print(result.text)- Azure-specific: Tied to Azure cloud (not portable to other clouds without changes)
- Cost: Azure hosting, storage, and AI service costs (see Cost section)
- Learning curve: Requires understanding Azure resource management, identity, networking
Status: Generally Available (Legacy/Transitional)
Target Audience: Existing SK users migrating to Microsoft Agent Framework
Core Value: Mature orchestration framework being consolidated into Agent Framework
Semantic Kernel is an open-source orchestration SDK that integrates AI models (OpenAI, Azure OpenAI, Hugging Face) with conventional programming languages (C#, Python, Java).
Semantic Kernel and AutoGen are being consolidated into Microsoft Agent Framework—they are not separate SDKs to combine, but rather sources feeding into the evolved, unified framework:
Semantic Kernel ─┐
├──→ Microsoft Agent Framework (Unified Evolution)
AutoGen ─┘
↓
Microsoft.Extensions.AI (Foundation)
Migration Guidance:
- For new projects: Use Microsoft Agent Framework (includes SK's best patterns + AutoGen's multi-agent capabilities)
- For existing SK projects: Microsoft provides migration guides to transition to Agent Framework
- Agent Framework Benefits: Simplified API, unified patterns, continued innovation focus
Semantic Kernel's Built-in Agent Framework: SK includes its own agent packages (Microsoft.SemanticKernel.Agents.*) which are transitioning to the standalone Microsoft Agent Framework. These represent intermediate steps in the consolidation process.
| Feature | Description | Business Impact |
|---|---|---|
| Connections | Abstracts AI service integration (OpenAI, Azure OpenAI, Gemini, Bedrock) | Swap AI providers without rewriting code |
| Plugins | Encapsulate functions (semantic + native) for reuse | Build library of reusable AI capabilities |
| Planner | Orchestrate multi-step tasks dynamically | Automate complex workflows without hardcoding |
| Memory | Context management for stateful conversations | Maintain conversation history across sessions |
| Multi-Agent Orchestration | 5 built-in patterns (Sequential, Concurrent, Handoff, Group Chat, Magentic) | Coordinate specialized agents without custom code |
| Pattern | Description | Use Case |
|---|---|---|
| Sequential | Pass result from one agent to next in order | Step-by-step workflows, pipelines |
| Concurrent | Broadcast task to all agents, collect results independently | Parallel analysis, ensemble decision-making |
| Handoff | Dynamically pass control between agents based on context | Escalation, expert handoff, fallback |
| Group Chat | All agents in group conversation coordinated by manager | Brainstorming, collaborative problem-solving |
| Magentic | Dynamic task planning with iterative refinement inspired by MagenticOne | Complex, open-ended problems requiring adaptive approaches |
✅ Use Semantic Kernel when:
- Maintaining existing SK projects (stable, working codebase)
- Short-term projects where migration isn't justified
- Gradual migration strategy (coexist SK with Agent Framework during transition)
- Includes all SK orchestration patterns (Sequential, Concurrent, Handoff, Group Chat, Magentic)
- Simplified API with less boilerplate
- Unified with AutoGen capabilities
- Built on Microsoft.Extensions.AI for provider flexibility
- Active development and innovation focus
Example Scenarios (Legacy SK):
- Research assistant using concurrent pattern (Researcher + Fact-checker + Summarizer)
- Content pipeline using sequential pattern (Writer → Editor → SEO Optimizer → Publisher)
- Customer service using handoff pattern (Intent Triage → Specialist Agent → Quality Reviewer)
For existing Semantic Kernel projects, Microsoft Agent Framework provides:
- Simplified API: Less boilerplate, clearer intent
- Unified patterns: Best of SK orchestration + AutoGen multi-agent
- Built-in workflows: Sequential, Concurrent, Handoff, Group Chat, Magentic patterns included
- Microsoft.Extensions.AI foundation: Standard abstractions for AI services
Migration Resources:
- Agent Framework Release Candidate Migration Guide
- Microsoft Agent Framework documentation for pattern equivalents
- Gradual migration path: SK and Agent Framework can coexist during transition
For new projects: Start with Microsoft Agent Framework—it includes SK's capabilities in a more modern, unified package.
C# Example:
using Microsoft.SemanticKernel;
// 1. Create specialized agents
var researcher = new ChatCompletionAgent
{
Name = "Researcher",
Instructions = "Find information without analysis.",
Kernel = kernel
};
var analyst = new ChatCompletionAgent
{
Name = "Analyst",
Instructions = "Analyze data and provide insights.",
Kernel = kernel
};
// 2. Create sequential orchestration (Researcher → Analyst)
var orchestration = new SequentialOrchestration()
.AddAgent(researcher)
.AddAgent(analyst);
// 3. Run orchestration
var result = await orchestration.InvokeAsync("Research market trends and provide analysis.");Python Example:
import asyncio
from semantic_kernel import Kernel
from semantic_kernel.agents import ChatCompletionAgent
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
# 1. Create kernel and add service
kernel = Kernel()
kernel.add_service(AzureChatCompletion())
# 2. Create specialized agents
researcher = ChatCompletionAgent(
kernel=kernel,
name="Researcher",
instructions="Find information without analysis."
)
analyst = ChatCompletionAgent(
kernel=kernel,
name="Analyst",
instructions="Analyze data and provide insights."
)
# 3. Create sequential orchestration (Researcher → Analyst)
# Using AgentGroupChat with selection strategy
async def run_orchestration():
async for response in researcher.invoke(messages="Research market trends"):
print(f"{response.name}: {response.content}")
# Pass researcher's response to analyst
async for analysis in analyst.invoke(messages=response.content):
print(f"{analysis.name}: {analysis.content}")
asyncio.run(run_orchestration())- Complexity: More complex API than Agent Framework (steeper learning curve)
- No built-in channel deployment: Requires Microsoft 365 Agents SDK for Teams/Copilot
- No built-in governance: Needs Azure AI Foundry for enterprise features (content safety, audit logs)
Maturity: Generally Available
Target Audience: Developers building multi-channel agents (Teams, Copilot, Web, Custom Apps)
Core Value: Deployment layer enabling agents to run across Microsoft 365 ecosystem and beyond
Microsoft 365 Agents SDK is a comprehensive framework for building full-stack, multi-channel agents. It's the "container" or deployment layer that handles communication, state management, storage, and channel-specific behaviors.
Critical Insight: This SDK is AI-agnostic—it provides the infrastructure to deploy agents built with any AI stack (Agent Framework, Foundry, Semantic Kernel, LangChain, or custom).
| Feature | Description | Business Impact |
|---|---|---|
| Multi-Channel Deployment | Deploy once, run in Teams, Copilot, Web, Custom Apps, Email, SMS | Reach users wherever they work |
| State & Storage | Built-in state management and conversation storage | No custom session management code |
| Activity & Event Handling | Scaffolding for channel-specific events (Teams meetings, Copilot actions) | Tailor behavior per channel |
| AI-Agnostic | Use any AI service (Azure Foundry, OpenAI, custom models) | Freedom to choose best AI for task |
| Orchestration Integration | Easy integration with Semantic Kernel or LangChain | Combine channel deployment with orchestration |
✅ Use Microsoft 365 Agents SDK when:
- Agent needs to run in multiple channels (Teams + Copilot + Web)
- Building Microsoft 365 Copilot extension (declarative or custom engine agent)
- Need Teams-specific features (meetings, adaptive cards, messaging extensions)
- Want to bring your own AI (AI-agnostic - works with any provider)
- Have existing Bot Framework experience (familiar patterns)
Example Scenarios:
- Legal assistant available in Teams, Microsoft 365 Copilot, and law firm's web portal
- Sales agent in Copilot that also runs in Dynamics 365 custom app
- HR chatbot deployed to Teams for employees and web portal for contractors
🔗 Combine with Microsoft Agent Framework when:
- Want Agent Framework's unified API and orchestration patterns for agent logic deployed to Teams/Copilot
- Example: Story writer agent (Agent Framework) exposed in Teams for content team
🔗 Combine with Azure AI Foundry when:
- Copilot agent requires Azure AI Search, hosted code interpreter, or enterprise features
- Example: Compliance agent in Copilot using Azure AI Search over regulatory documents
Note: For orchestration patterns (Sequential, Concurrent, Handoff, etc.), use Microsoft Agent Framework which consolidates capabilities from Semantic Kernel and AutoGen.
┌────────────────────────────────────────────────────────────────┐
│ USER CHANNELS │
│ [Teams] [Copilot] [Web] [Custom Apps] [Email] [SMS] │
└───────────┬────────────────────────────────────────────────────┘
│ Channel-specific protocols (Teams Activity, Copilot Messages)
┌───────────▼────────────────────────────────────────────────────┐
│ MICROSOFT 365 AGENTS SDK │
│ • State management & storage │
│ • Activity/event routing │
│ • Channel-specific adapters │
└───────────┬────────────────────────────────────────────────────┘
│ Agent invocation
┌───────────▼────────────────────────────────────────────────────┐
│ YOUR AGENT LOGIC (Choose One or Combine) │
│ [Agent Framework] [Azure AI Foundry] [Semantic Kernel] [Custom]│
└───────────┬────────────────────────────────────────────────────┘
│ AI model calls
┌───────────▼────────────────────────────────────────────────────┐
│ AI SERVICES │
│ [Azure OpenAI] [OpenAI] [GitHub Models] [Ollama] [Custom] │
└────────────────────────────────────────────────────────────────┘
C# Example:
// Create agent "container" with state and storage
builder.AddAgent(sp =>
{
var agent = new AgentApplication(sp.GetRequiredService<AgentApplicationOptions>());
// Listen for message activity
agent.OnActivity(ActivityTypes.Message, async (turnContext, turnState, cancellationToken) =>
{
var text = turnContext.Activity.Text;
// YOUR AGENT LOGIC HERE (use Agent Framework, Foundry, Semantic Kernel, etc.)
var response = await myAgentFrameworkAgent.RunAsync(text);
await turnContext.SendActivityAsync(MessageFactory.Text(response.Text), cancellationToken);
});
return agent;
});Python Example:
from microsoft_agents.hosting.core import (
AgentApplication,
TurnContext,
TurnState,
MemoryStorage,
)
from microsoft_agents.hosting.aiohttp import CloudAdapter
# Create agent application with storage
storage = MemoryStorage()
agent_app = AgentApplication(storage=storage)
# Listen for message activity
@agent_app.activity(ActivityTypes.MESSAGE)
async def on_message(turn_context: TurnContext, turn_state: TurnState):
text = turn_context.activity.text
# YOUR AGENT LOGIC HERE (use Semantic Kernel, Azure AI Foundry, etc.)
response = await my_agent.run(text)
await turn_context.send_activity(MessageFactory.text(response.text))
# Start the server
adapter = CloudAdapter()
# Server setup code here (see Microsoft 365 Agents SDK docs for full server setup)- Requires Azure Bot Service: Uses Azure Bot Service for channel connectivity (cost implications)
- Microsoft-centric: Optimized for Microsoft channels (Teams, Copilot)—custom channels require adapters
- Complexity for simple agents: Overhead if agent only needs to run in one channel
Microsoft's SDK Consolidation Strategy:
┌─────────────────────┐
│ Semantic Kernel │────┐
│ (Orchestration) │ │
└─────────────────────┘ │
├──→ Microsoft Agent Framework (Unified Future)
┌─────────────────────┐ │
│ AutoGen │────┘
│ (Multi-Agent) │
└─────────────────────┘
↓
Microsoft.Extensions.AI (Foundation)
Key Architectural Insights:
- Microsoft Agent Framework = The unified evolution, not a separate tool to combine with SK/AutoGen
- Semantic Kernel & AutoGen = Legacy/transitional frameworks being consolidated into Agent Framework
- New Development = Start with Agent Framework (includes best of both predecessors)
- Existing Projects = Migration paths available from SK/AutoGen to Agent Framework
These scenarios show genuine complementary relationships (deployment + logic + services):
Problem: Need agent in Teams/Copilot that uses Azure AI Search for RAG.
Solution: Microsoft 365 Agents SDK (deployment) + Azure AI Foundry SDK (Azure tools)
Teams/Copilot ← [Microsoft 365 Agents SDK] ← [Azure AI Foundry SDK] ← Azure AI Search
Why This Works:
- Microsoft 365 Agents SDK handles channel deployment and state
- Azure AI Foundry SDK provides Azure AI Search vector store and hosted tools
- Complementary layers: deployment infrastructure + Azure enterprise capabilities
Problem: Need .NET agent with orchestration patterns for internal service.
Solution: Microsoft Agent Framework (includes unified patterns from SK + AutoGen)
.NET Service ← [Microsoft Agent Framework] ← OpenAI/Azure OpenAI
Why This Works:
- Agent Framework provides all orchestration patterns (Sequential, Concurrent, Handoff, GroupChat, Magentic)
- No need to combine with SK/AutoGen—Agent Framework IS the evolution
- Built on Microsoft.Extensions.AI for provider flexibility
Problem: Customer service bot in Teams with specialist agent handoffs.
Solution: Microsoft 365 Agents SDK (Teams deployment) + Microsoft Agent Framework (orchestration)
Teams ← [Microsoft 365 Agents SDK] ← [Agent Framework Handoff Pattern] ← [Triage Agent, Specialist Agents]
Why This Works:
- Microsoft 365 Agents SDK handles Teams-specific features (adaptive cards, meeting integration)
- Agent Framework coordinates handoff between triage agent and specialists
- Combined: channel-aware deployment + sophisticated orchestration
Problem: Background service analyzing logs and generating reports (internal tool, no UI).
Solution: Microsoft Agent Framework (standalone)
Why No Other SDKs Needed:
- No multi-channel deployment needed (just .NET service)
- No Azure-specific tools required (uses OpenAI directly)
- No complex orchestration (single agent task)
Problem: Healthcare agent requiring HIPAA compliance, audit logs, VNet isolation.
Solution: Azure AI Foundry SDK (standalone)
Why No Other SDKs Needed:
- Single channel (web app hosted in Azure)
- Requires Azure enterprise features (RBAC, VNet, audit logs, content safety)
- No .NET simplification needed (team comfortable with Python Azure SDK)
Problem: Sales agent in Teams, Copilot, and web portal using proprietary LLM.
Solution: Microsoft 365 Agents SDK (standalone)
Why No Other SDKs Needed:
- Multi-channel deployment required
- Custom AI model (not Azure/OpenAI)—SDK is AI-agnostic
- No need for Agent Framework (.NET simplification) or Semantic Kernel (simple agent logic)
Primary Value: Production-Grade Infrastructure Without DevOps Overhead
| Business Metric | Impact | Justification |
|---|---|---|
| Infrastructure Cost | 40-60% reduction | No VM/Kubernetes management → eliminate DevOps toil |
| Time-to-Production | 70% faster | Pre-built orchestration, thread storage, tool retry → skip months of engineering |
| Compliance Risk | 90% reduction | Built-in content filtering, Entra ID, audit logs, VNet → policy-governed by default |
| Scalability | Infinite (serverless) | Handles 1 to 1M users without capacity planning |
| Observability Setup | 80% faster | Application Insights integration → no custom instrumentation |
When ROI is Highest:
- Need production-grade agents without building orchestration infrastructure
- Compliance/governance required (healthcare, financial services, government)
- Variable load (seasonal traffic, unpredictable demand)
- Small team—can't dedicate engineers to infrastructure
Executive Pitch:
"Deploy production agents in weeks, not months. Let Microsoft manage the infrastructure, storage, and security—we focus on business logic."
Key Differentiator:
- Agent Service is the only hosted runtime—all other SDKs require you to manage infrastructure
- Serverless model = pay only for agent runs (no idle compute costs)
- Enterprise features out-of-the-box (content filters, audit logs, RBAC)—don't build from scratch
Primary Value: Client Libraries to Use Agent Service + Direct Model Access
| Business Metric | Impact | Justification |
|---|---|---|
| Development Velocity | 50% faster | Unified SDK across Assistants API, Responses API, Completion API, Evaluations |
| Multi-Language Teams | 100% coverage | Python, C#, JavaScript, Java—use same API patterns |
| Security Risk | 70% reduction | Microsoft Entra integration, zero trust architecture |
| Agent Service Integration | Seamless | Official client for Agent Service—create agents, threads, messages, runs |
When ROI is Highest:
- Regulated industries (healthcare, finance, government) requiring compliance
- Using Azure AI Foundry Agent Service (this SDK is the official client)
- Existing Azure investment (App Service, AKS, Functions) → leverage existing skills
- Need for enterprise-grade observability and troubleshooting
Executive Pitch:
"Access Azure AI Foundry Agent Service's production infrastructure through official client libraries. Meet compliance out-of-the-box while leveraging our Azure investment."
Relationship to Agent Service:
- This SDK is the primary way to use Agent Service
- Creates agents that run on Agent Service infrastructure
- Agent Service handles orchestration, thread storage, tool calling
- SDK handles agent creation, message sending, result retrieval
Primary Value: Developer Velocity for .NET Teams (Can Use Agent Service OR Run Locally)
| Business Metric | Impact | Justification |
|---|---|---|
| Time-to-Market | 50-70% faster prototyping | Minimal boilerplate → agents in minutes vs. hours |
| Development Cost | 30-40% reduction | Less custom code → fewer bugs, faster testing |
| Onboarding Time | 50% faster for .NET devs | Familiar .NET patterns (DI, middleware, hosting) |
| Maintenance Cost | 20-30% reduction | Standardized patterns → easier handoffs, less tribal knowledge |
| Agent Service Integration | Optional | Can consume Agent Service agents OR run agents locally in .NET |
When ROI is Highest:
- Team has strong .NET skills but limited AI experience
- Need to build multiple similar agents quickly (e.g., department-specific chatbots)
- Budget constraints requiring rapid prototyping before full investment
- Want option to use Agent Service but need local dev/testing
Executive Pitch:
"Enable our .NET developers to build AI agents without becoming AI experts. Ship 3 agents in the time it used to take for 1. Use Agent Service for production or run locally."
Relationship to Agent Service:
- Can consume Agent Service agents via
PersistentAgentsClient - Agent still runs ON Agent Service, but Framework provides simplified .NET API
- Can also run agents locally (no Agent Service required) for dev/testing
- Flexibility: start local, migrate to Agent Service for production
Primary Value: Orchestration Flexibility + AI Provider Freedom (Independent of Agent Service)
| Business Metric | Impact | Justification |
|---|---|---|
| AI Cost Optimization | 20-50% reduction | Swap AI providers (Azure OpenAI ↔ OpenAI ↔ cheaper alternatives) without rewrite |
| Technical Debt | 40% reduction | Plugin ecosystem → reusable components, less duplication |
| Innovation Speed | 30-50% faster | Pre-built orchestration patterns → focus on business logic, not plumbing |
| Provider Flexibility | High | Open-source, multi-language, AI-agnostic abstractions |
When ROI is Highest:
- Uncertain about long-term AI provider (want flexibility to switch)
- Building complex workflows requiring dynamic orchestration
- Need for cross-language support (C#, Python, Java teams in same company)
- Not using Agent Service (want full control over orchestration)
Executive Pitch:
"Future-proof AI investments with provider flexibility. Build once, swap AI providers without rewriting code. Meet customers where they are—Azure, multi-cloud, or on-premises."
Relationship to Agent Service:
- Runs independently of Agent Service—you manage infrastructure
- Provides orchestration patterns Agent Service doesn't (Magentic)
- Can use alongside Agent Service (e.g., Semantic Kernel coordinates Agent Service-hosted agents)
- Choose based on: Agent Service for hosted runtime, Semantic Kernel for DIY orchestration
Primary Value: User Reach + Channel Flexibility
| Business Metric | Impact | Justification |
|---|---|---|
| User Adoption | 50-80% increase | Meet users where they work (Teams, Copilot, Web) → lower friction |
| Development Cost | 40-60% reduction | Build once, deploy to multiple channels → avoid per-channel rewrites |
| Maintenance Cost | 30-50% reduction | Single codebase for all channels → unified updates, fewer bugs |
| Competitive Advantage | High | Microsoft 365 Copilot integration → differentiation for M365 customers |
When ROI is Highest:
- Organization heavily invested in Microsoft 365 (Teams, Copilot, SharePoint)
- Need to reach users across multiple touchpoints (mobile, desktop, web)
- Competitive differentiation via Microsoft 365 Copilot integration
Executive Pitch:
"Build once, reach users everywhere they work. Increase adoption by 50-80% by meeting users in Teams, Copilot, and web portals."
Infrastructure Requirements
- Want managed runtime (no DevOps overhead) → Azure AI Foundry Agent Service
- Need full control over infrastructure → Run locally (Agent Framework)
- Variable/unpredictable load → Agent Service (serverless scaling)
- Steady predictable load → Self-hosted (cost optimization)
Channel Requirements
- Single channel (API, web app, console) → Agent Framework or Foundry SDK (with or without Agent Service)
- Teams only → Microsoft 365 Agents SDK (consider Teams AI Library for simpler needs)
- Microsoft 365 Copilot integration → Microsoft 365 Agents SDK
- Multiple channels (Teams + Web + Custom App) → Microsoft 365 Agents SDK
AI Services Requirements
- Azure OpenAI with Azure tools (AI Search, Logic Apps) → Agent Service + Foundry SDK or Foundry SDK standalone
- Any AI provider (OpenAI, GitHub Models, Ollama) → Agent Framework (no Agent Service)
- Custom/proprietary LLM → Microsoft 365 Agents SDK (AI-agnostic) or Agent Framework
Orchestration Complexity
- Simple single-agent chat → Agent Framework or Agent Service + Foundry SDK
- LLM-driven multi-agent delegation (natural language routing) → Agent Service Connected Agents
- Code-based orchestration patterns (Sequential, Concurrent, Handoff, Magentic) → Agent Framework (includes all patterns)
- Existing Semantic Kernel projects → Migrate to Agent Framework (consolidation path available)
Enterprise Features
- Content safety, audit logs, RBAC → Agent Service (built-in) or Foundry SDK (via Azure services)
- VNet isolation, data residency → Agent Service (BYO storage, VNets) or Foundry SDK
- Microsoft Entra integration → Agent Service or Foundry SDK
- None required → Agent Framework or Microsoft 365 Agents SDK
Team Skills
- Strong .NET or Python skills, limited AI experience → Agent Framework
- Python/Java skills (existing SK projects) → Migrate to Agent Framework (SK consolidating)
- Bot Framework experience → Microsoft 365 Agents SDK
- Azure experience → Agent Service + Foundry SDK
START: What are you building?
├─ QUESTION 1: Need managed runtime (no infrastructure management)?
│ ├─ YES → Azure AI Foundry Agent Service
│ │ └─ THEN: Choose client SDK:
│ │ ├─ Multi-language teams → Foundry SDK (Python, C#, JS, Java)
│ │ ├─ .NET/Python teams → Agent Framework + PersistentAgentsClient
│ │ └─ Multi-channel → Microsoft 365 Agents SDK + Foundry SDK
│ │
│ └─ NO → Self-hosted agents (continue to Question 2)
│
├─ QUESTION 2: Multi-channel deployment (Teams, Copilot, Web)?
│ ├─ YES → Microsoft 365 Agents SDK
│ │ └─ THEN: Choose agent logic layer:
│ │ ├─ Agent orchestration → Combine with Agent Framework (includes all patterns)
│ │ ├─ Azure tools (AI Search, Logic Apps) → Combine with Foundry SDK
│ │ └─ Custom AI/orchestration → Build custom logic
│ │
│ └─ NO → Continue ▼
│
├─ NEED: Enterprise features (compliance, RBAC, content safety, VNet)?
│ ├─ YES → Azure AI Foundry SDK
│ │ └─ THEN: Optionally combine with:
│ │ ├─ Agent Framework for orchestration patterns
│ │ └─ Microsoft 365 Agents SDK if multi-channel needed later
│ └─ NO → Continue ▼
│
├─ NEED: Complex multi-agent orchestration or plugin ecosystem?
│ ├─ YES → Microsoft Agent Framework (unified evolution)
│ │ └─ Includes: Sequential, Concurrent, Handoff, Group Chat, Magentic patterns
│ │ └─ THEN: Optionally combine with:
│ │ ├─ Microsoft 365 Agents SDK for channel deployment
│ │ └─ Azure AI Foundry SDK for Azure tools
│ └─ NO → Continue ▼
│
└─ DEFAULT: Simple agent with minimal setup
└─ Microsoft Agent Framework
└─ Optionally combine with:
├─ Microsoft 365 Agents SDK for multi-channel later
└─ Azure AI Foundry SDK for Azure tools later
NOTE: Semantic Kernel is legacy/transitional—use Agent Framework for new projects.
Requirements:
- Deploy to Teams (employees) and web portal (contractors)
- Answer HR policy questions (no external tools needed)
- .NET team
Decision: Microsoft 365 Agents SDK + Agent Framework
- Microsoft 365 Agents SDK: Teams + web deployment
- Agent Framework: Simple .NET agent logic
Requirements:
- Microsoft 365 Copilot integration
- RAG over 10,000+ legal documents in SharePoint
- RBAC (partners see only their documents)
- Audit logs for compliance
Decision: Microsoft 365 Agents SDK + Azure AI Foundry SDK
- Microsoft 365 Agents SDK: Copilot deployment
- Azure AI Foundry SDK: Azure AI Search for RAG, RBAC, audit logs
Requirements:
- API endpoint (no Teams/Copilot needed)
- Workflow: Researcher finds info → Fact-checker validates → Summarizer creates report
- Python team
- Flexibility to swap AI providers
Decision: Semantic Kernel SDK (standalone)
- Sequential orchestration pattern (Researcher → Fact-checker → Summarizer)
- Provider-agnostic (can use Azure OpenAI today, switch to OpenAI tomorrow)
Requirements:
- .NET background service (no UI)
- Analyze logs, generate insights, send email reports
- OpenAI GPT-4o-mini (cost-effective)
Decision: Agent Framework (standalone)
- Simple .NET service with minimal dependencies
- Direct OpenAI integration (no Azure needed)
Architecture:
[Your Application Layer]
↓
[Azure AI Foundry SDK] ← Core agent logic
↓
[Azure Services: AI Search, OpenAI, Logic Apps]
When to Use:
- Existing Azure investment
- Need enterprise features (RBAC, content safety, audit logs)
- Single or limited channels
Example Technologies:
- ASP.NET Core API using Azure AI Foundry SDK
- Azure App Service or AKS for hosting
- Azure AI Search for RAG
- Application Insights for observability
Architecture:
[Teams, Copilot, Web] ← Microsoft 365 Agents SDK
↓
[Microsoft Agent Framework OR Custom] ← Agent logic
↓
[Any AI Service: Azure OpenAI, OpenAI, GitHub Models]
When to Use:
- Need to reach users across multiple channels
- AI-agnostic abstractions (provider flexibility)
- Flexible orchestration needs
Example Technologies:
- Microsoft 365 Agents SDK for channel deployment
- Agent Framework for simple .NET agent logic
- Semantic Kernel for complex orchestration
- OpenAI or GitHub Models for cost-effective AI
Architecture:
[Microsoft 365 Agents SDK] ← Channel deployment (outer layer)
↓
[Semantic Kernel] ← Orchestration (middle layer)
↓
[Azure AI Foundry Tools OR Custom APIs] ← Services (inner layer)
When to Use:
- Multi-channel deployment (Teams, Copilot, Web)
- Complex multi-agent workflows
- Mix of Azure and non-Azure services
Example Technologies:
- Microsoft 365 Agents SDK for Teams/Copilot deployment
- Semantic Kernel handoff pattern for specialist agents
- Azure AI Search for RAG + custom REST APIs for business logic
Architecture:
[ASP.NET Core API]
↓
[Agent Framework] ← Simple .NET agent API
↓
[Azure AI Foundry Hosted Tools] ← Code Interpreter, Azure Functions, Logic Apps
When to Use:
- .NET team with Azure experience
- Need Azure hosted tools (code interpreter, Azure Functions)
- Single channel (API or web app)
Example Technologies:
- Agent Framework for minimal .NET boilerplate
- Azure AI Foundry's HostedCodeInterpreterTool
- Azure OpenAI for LLM
Direct Costs:
- None (open-source, free SDK)
Indirect Costs:
- AI service costs (OpenAI API, Azure OpenAI, etc.) → $0.0001-0.01/1K tokens (or $0.10-10/1M tokens) depending on model:
- GPT-4.1-nano: $0.0001-0.0004/1K tokens (most cost-effective)
- GPT-4o-mini: $0.00015-0.0006/1K tokens
- GPT-4.1: $0.002-0.008/1K tokens
- GPT-4o: $0.0025-0.01/1K tokens
- Hosting costs (Azure App Service, VMs, AKS) → $10-500+/month depending on scale
Total Monthly Cost (Small Deployment):
- $20-100/month (AI services + small App Service)
Cost Optimization:
- Use cheaper models (GPT-4o-mini instead of GPT-4o)
- Batch requests to reduce API calls
- Cache responses for common queries
Direct Costs:
- Azure AI Foundry Agent Service: Based on usage (API calls, storage, compute)
- Azure AI Search: $75-2,000+/month (Basic to Standard tier)
- Azure OpenAI: $0.0001-0.01/1K tokens (or $0.10-10/1M tokens) depending on model:
- GPT-4.1-nano: $0.0001-0.0004/1K tokens
- GPT-4o-mini: $0.00015-0.0006/1K tokens
- GPT-4.1: $0.002-0.008/1K tokens
- GPT-4o: $0.0025-0.01/1K tokens
- Cosmos DB (thread storage): $25-500+/month if using your own storage
- Application Insights: $2.88/GB ingested
Indirect Costs:
- Virtual Network (VNet) costs for isolation: $0.10/hour/gateway (~$75/month)
- Data egress: $0.087/GB after first 5GB free
Total Monthly Cost (Medium Deployment):
- $200-1,000/month (AI services + AI Search Basic + observability)
Cost Optimization:
- Use Azure AI Search Basic tier initially ($75/month)
- Leverage free tier of Application Insights (5GB/month free)
- Use managed identity (free) instead of separate authentication services
Direct Costs:
- None (open-source, free SDK)
Indirect Costs:
- AI service costs (same as Agent Framework): $0.0001-0.01/1K tokens (or $0.10-10/1M tokens) depending on model
- Hosting costs: $10-500+/month depending on scale
Total Monthly Cost (Small Deployment):
- $20-100/month (same as Agent Framework)
Cost Advantage:
- Provider flexibility: Swap to cheaper AI providers without code changes
- Example: GitHub Models (free quota), Ollama (local/free), Azure OpenAI (pay-per-use)
Direct Costs:
- Azure Bot Service:
- Free tier: 10,000 messages/month (adequate for prototyping)
- Standard tier: $0.50/1,000 messages after free tier
- AI service costs: $0.0001-0.01/1K tokens (or $0.10-10/1M tokens) depending on model
Indirect Costs:
- Hosting costs (Azure App Service, Functions): $10-200+/month
- Storage costs (conversation state): $0.15/GB for Azure Table Storage (minimal)
Total Monthly Cost (Small Deployment):
- $10-150/month (free Bot Service tier + AI services + small hosting)
Cost Optimization:
- Stay under 10,000 messages/month for free Bot Service tier
- Use Azure Functions consumption plan (pay-per-execution) instead of App Service
- Use lightweight AI models for simple queries
| SDK | Small Deployment | Medium Deployment | Enterprise Deployment | Key Cost Drivers |
|---|---|---|---|---|
| Agent Framework | $20-100/month | $200-500/month | $1,000-5,000/month | AI service usage, hosting scale |
| Azure AI Foundry | $200-500/month | $500-2,000/month | $2,000-10,000+/month | AI Search, Cosmos DB, VNet, telemetry |
| Semantic Kernel | $20-100/month | $200-500/month | $1,000-5,000/month | AI service usage, hosting scale (lower if using free models) |
| M365 Agents SDK | $10-150/month | $150-800/month | $800-3,000/month | Bot Service messages, AI service usage |
Notes:
- Small: <1,000 users, <10,000 queries/month
- Medium: 1,000-10,000 users, 10,000-100,000 queries/month
- Enterprise: 10,000+ users, 100,000+ queries/month, compliance requirements
Primary SDK: Microsoft Agent Framework
- Why: Low cost, fast iteration, flexibility to pivot, unified patterns from SK + AutoGen
- When to Add: Add Microsoft 365 Agents SDK when need to reach enterprise customers via Teams/Copilot
Primary SDK: Azure AI Foundry SDK
- Why: Leverage existing Azure investment, built-in compliance, unified observability
- When to Add: Add Microsoft 365 Agents SDK for multi-channel reach, Agent Framework for orchestration patterns
Primary SDK: Microsoft 365 Agents SDK
- Why: Direct integration with Teams/Copilot, meet users where they work
- When to Add: Combine with Agent Framework (.NET/Python teams), Azure AI Foundry (Azure tools) for enhanced capabilities
Primary Strategy: Gradual Migration to Agent Framework
- Why: Agent Framework consolidates SK + AutoGen with simplified API and unified patterns
- Migration Path:
- Short-term: Maintain stable SK projects (no urgent migration needed)
- Medium-term: New features/modules → implement with Agent Framework (coexistence)
- Long-term: Gradual migration of SK modules to Agent Framework as they require updates
- Resources: Agent Framework RC Migration Guide
- Benefits: Unified development experience, active innovation, simplified maintenance
| Feature | Agent Service | Agent Framework | Foundry SDK | Semantic Kernel | M365 Agents SDK |
|---|---|---|---|---|---|
| Type | Hosted Runtime | Client Library | Client Library | Client Library | Client Library |
| Maturity | GA (May 2025) | Preview | GA | GA | GA |
| Languages | N/A (REST API) | C#, Py | Py, C#, JS, Java | C#, Py, Java | C#, JS, Py |
| Runs Where | Azure Cloud | Your code | Your code | Your code | Your code |
| Thread Storage | ✅ (Built-in) | ❌ (You manage) | ❌ (You manage) | ||
| Multi-Channel | ❌ | ❌ | ❌ | ❌ | ✅ |
| Azure Tools | ✅ (12 built-in + 6 partner) | ❌ | ✅ (Native) | ||
| AI-Agnostic | ❌ (Azure models) | ✅ | ✅ | ✅ | |
| Orchestration | ✅ (4 patterns) | ✅ (5 patterns) | ❌ (Bring own) | ||
| Enterprise Features | ✅ (All 7) | ❌ | ✅ (via Service) | ❌ | |
| Content Filtering | ✅ (Automatic) | ❌ (You implement) | ✅ (via Service) | ❌ (You implement) | |
| Scalability | ✅ (Serverless) | Your infra | Your infra | Your infra | Your infra |
| Learning Curve | Low-Medium | Low | Medium | Medium-High | Medium |
| Cost | Medium-High | Low | Low-Medium | Low | Low-Medium |
Legend:
- ✅ = First-class support / Built-in
⚠️ = Supported via integration/workarounds- ❌ = Not supported or not primary use case
| Technology | One-Line Summary |
|---|---|
| Azure AI Foundry Agent Service | "Managed runtime for production agents with enterprise governance built-in." |
| Microsoft Agent Framework | "Build .NET agents fast with minimal code, run locally or on Agent Service." |
| Azure AI Foundry SDK | "Client libraries to use Agent Service + direct Azure AI model access." |
| Semantic Kernel SDK | "Orchestrate complex multi-agent workflows, swap AI providers freely." |
| Microsoft 365 Agents SDK | "Deploy agents to Teams, Copilot, and web from single codebase." |
❌ Mistake 1: Confusing Agent Service with Azure AI Foundry SDK
- Why Wrong: Agent Service is the hosted runtime; SDK is the client library
- Correct Understanding: SDK creates agents that run ON Agent Service
❌ Mistake 2: Building thread storage when using Agent Service
- Why Wrong: Agent Service provides built-in thread management (Cosmos DB)
- Better Choice: Use Agent Service's thread APIs, don't duplicate storage
❌ Mistake 3: Choosing Azure AI Foundry SDK for simple prototype
- Why Wrong: Over-engineering, high cost (if using Agent Service), slow iteration
- Better Choice: Agent Framework for fast local prototyping
❌ Mistake 4: Using Agent Framework for Teams-only agent
- Why Wrong: Agent Framework has no channel deployment—need Microsoft 365 Agents SDK
- Better Choice: Microsoft 365 Agents SDK + Agent Framework
❌ Mistake 5: Building custom orchestration when Agent Framework has pattern
- Why Wrong: Reinventing the wheel, more bugs, harder maintenance
- Better Choice: Use Agent Framework's built-in patterns (Sequential, Concurrent, Handoff, GroupChat, Magentic)
❌ Mistake 6: Using Agent Service when you need non-Azure AI providers
- Why Wrong: Agent Service only supports Azure OpenAI and Azure Model Catalog
- Better Choice: Run agents locally with Agent Framework + OpenAI.com, GitHub Models, or Ollama
❌ Mistake 7: Not using provider-agnostic abstractions when multi-cloud is a requirement
- Why This Matters: Different deployment environments (Azure, AWS, GCP, on-prem) require flexibility
- Better Choice: Use Microsoft Agent Framework with Microsoft.Extensions.AI abstractions; can deploy anywhere while maintaining option to use Azure services when beneficial
❌ Mistake 8: Starting new projects with Semantic Kernel
- Why Wrong: Semantic Kernel is legacy/transitional—being consolidated into Agent Framework
- Better Choice: Use Agent Framework (includes all SK patterns + AutoGen capabilities); migrate existing SK projects gradually
❌ Mistake 9: Ignoring enterprise features until production
- Why Wrong: Retrofitting compliance is expensive
- Better Choice: Start with Azure AI Foundry if compliance known requirement
| Version | Date | Changes |
|---|---|---|
| 1.0 | January 2025 | Initial release: Comprehensive comparison of 4 Microsoft agent SDKs |
For Questions or Updates:
- Microsoft Agent Framework Docs: https://learn.microsoft.com/agent-framework/
- Azure AI Foundry Docs: https://learn.microsoft.com/azure/ai-foundry/
- Semantic Kernel Docs: https://learn.microsoft.com/semantic-kernel/
- Microsoft 365 Agents SDK Docs: https://learn.microsoft.com/microsoft-365/agents-sdk/
Last Updated: January 2025